Esempio n. 1
0
SliceProxy::SliceProxy(PatientModelServicePtr dataManager) :
	mCutplane(new SliceComputer())
{
	mDataManager = dataManager;
	mAlwaysUseDefaultCenter = false;
	mUseTooltipOffset = true;
	connect(mDataManager.get(), SIGNAL(centerChanged()),this, SLOT(centerChangedSlot()) ) ;
	connect(mDataManager.get(), SIGNAL(clinicalApplicationChanged()), this, SLOT(clinicalApplicationChangedSlot()));
	//TODO connect to toolmanager rMpr changed
	mDefaultCenter = mDataManager->getCenter();
	this->centerChangedSlot();

	this->initCutplane();
}
WorkflowStateMachine::WorkflowStateMachine(StateServiceBackendPtr backend) : mBackend(backend)
{
	mStarted = false;
	connect(this, SIGNAL(started()), this, SLOT(startedSlot()));
	mActionGroup = new QActionGroup(this);

	mParentState = new ParentWorkflowState(this, mBackend);

	WorkflowState* patientData = this->newState(new PatientDataWorkflowState(mParentState, mBackend));
	this->newState(new RegistrationWorkflowState(mParentState, mBackend));
	this->newState(new PreOpPlanningWorkflowState(mParentState, mBackend));
	this->newState(new NavigationWorkflowState(mParentState, mBackend));
	this->newState(new IntraOpImagingWorkflowState(mParentState, mBackend));
	this->newState(new PostOpControllWorkflowState(mParentState, mBackend));

	//set initial state on all levels
	this->setInitialState(mParentState);
	mParentState->setInitialState(patientData);

	connect(mBackend->getPatientService().get(), SIGNAL(clinicalApplicationChanged()), this, SLOT(clinicalApplicationChangedSlot()));
}