36 #include <QApplication>
64 this->initialize(this->createBackend(context));
91 this->fillDefaultSettings();
96 mWorkflowStateMachine->start();
116 return QString(
"%1").arg(CustusX_VERSION_STRING);
121 return mWorkflowStateMachine->getActionGroup();
126 return mWorkflowStateMachine;
131 mWorkflowStateMachine->setActiveState(uid);
135 void StateServiceImpl::fillDefault(QString name, T value)
143 void StateServiceImpl::fillDefaultSettings()
145 this->fillDefault(
"Automation/autoStartTracking",
true);
146 this->fillDefault(
"Automation/autoStartStreaming",
true);
147 this->fillDefault(
"Automation/autoReconstruct",
true);
148 this->fillDefault(
"Automation/autoSelectActiveTool",
true);
149 this->fillDefault(
"Automation/autoSave",
true);
150 this->fillDefault(
"Automation/autoLoadRecentPatient",
true);
151 this->fillDefault(
"Automation/autoLoadRecentPatientWithinHours", 8);
152 this->fillDefault(
"Automation/autoShowNewData",
false);
154 this->fillDefault(
"TrackingPositionFilter/enabled",
false);
156 this->fillDefault(
"renderingInterval", 33);
157 this->fillDefault(
"backgroundColor", QColor(
"black"));
158 this->fillDefault(
"vlcPath",
vlc()->getVLCPath());
159 this->fillDefault(
"globalPatientNumber", 1);
160 this->fillDefault(
"Ultrasound/acquisitionName",
"US-Acq");
161 this->fillDefault(
"Ultrasound/8bitAcquisitionData",
false);
162 this->fillDefault(
"Ultrasound/CompressAcquisition",
true);
163 this->fillDefault(
"View3D/sphereRadius", 1.0);
164 this->fillDefault(
"View3D/labelSize", 2.5);
165 this->fillDefault(
"View3D/showOrientationAnnotation",
true);
166 this->fillDefault(
"Navigation/anyplaneViewOffset", 0.25);
167 this->fillDefault(
"Navigation/followTooltip",
true);
168 this->fillDefault(
"Navigation/followTooltipBoundary", 0.1);
170 this->fillDefault(
"showSectorInRTView",
true);
172 this->fillDefault(
"View3D/eyeAngle", 4.0);
173 this->fillDefault(
"View/showDataText",
true);
174 this->fillDefault(
"View/showLabels",
true);
175 this->fillDefault(
"View/showMetricNamesInCorner",
false);
176 this->fillDefault(
"View3D/annotationModelSize", 0.2);
177 this->fillDefault(
"View3D/annotationModel",
"woman.stl");
178 this->fillDefault(
"View3D/depthPeeling",
false);
179 this->fillDefault(
"View3D/ImageRender3DVisualizer",
"vtkGPUVolumeRayCastMapper");
180 this->fillDefault(
"View3D/maxRenderSize", 10 * pow(10.0,6));
182 this->fillDefault(
"stillUpdateRate", 0.001);
185 this->fillDefault(
"useGPU2DRendering",
true);
187 this->fillDefault(
"useGPU2DRendering",
false);
189 this->fillDefault(
"useGPU2DRendering",
true);
192 this->fillDefault(
"optimizedViews",
true);
193 this->fillDefault(
"smartRender",
true);
195 this->fillDefault(
"IGSTKDebugLogging",
false);
196 this->fillDefault(
"giveManualToolPhysicalProperties",
false);
197 this->fillDefault(
"renderSpeedLogging",
false);
199 this->fillDefault(
"applyTransferFunctionPresetsToAll",
false);
201 this->fillDefault(
"USsimulation/type",
"Original data");
202 this->fillDefault(
"USsimulation/volume",
"");
203 this->fillDefault(
"USsimulation/gain", 0.70);
210 return parser.
getDesktop(mWorkflowStateMachine->getActiveUidState());
216 parser.
setDesktop(mWorkflowStateMachine->getActiveUidState(),
223 parser.
resetDesktop(mWorkflowStateMachine->getActiveUidState());
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
void activeStateChanged()
virtual QActionGroup * getWorkflowActions()
void activeProfileChanged()
boost::shared_ptr< class VideoService > VideoServicePtr
virtual void setWorkFlowState(QString uid)
ProfilePtr activeProfile()
virtual void saveDesktop(Desktop desktop)
void applicationStateChanged()
void setDesktop(QString workflowName, Desktop desktop)
boost::shared_ptr< class TrackingService > TrackingServicePtr
virtual void resetDesktop()
virtual Desktop getActiveDesktop()
QStringList getProfiles()
static VideoServicePtr create(ctkPluginContext *pluginContext)
virtual QString getVersionName()
static TrackingServicePtr create(ctkPluginContext *pluginContext)
virtual QStringList getAllApplicationStateNames() const
void resetDesktop(QString workflowName)
static PatientModelServicePtr create(ctkPluginContext *pluginContext)
boost::shared_ptr< class StateServiceBackend > StateServiceBackendPtr
StateServiceImpl(ctkPluginContext *context)
void workflowStateAboutToChange()
static ProfileManager * getInstance()
returns the only instance of this class
virtual ~StateServiceImpl()
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
virtual QString getApplicationStateName() const
boost::shared_ptr< class WorkflowStateMachine > WorkflowStateMachinePtr
Settings * settings()
Shortcut for accessing the settings instance.
void activeStateAboutToChange()
void workflowStateChanged()
Data class for CustusX desktop.
State Machine for the Workflow Steps.
void fillDefault(QString name, T value)
VLCRecorder * vlc()
Shortcut for accessing the vlc recorder.
Desktop getDesktop(QString workflowName)