38 #include <QApplication>
67 this->initialize(this->createBackend(context));
94 this->fillDefaultSettings();
102 mWorkflowStateMachine->start();
187 return QString(
"%1").arg(CustusX_VERSION_STRING);
192 return mWorkflowStateMachine->getActionGroup();
197 return mWorkflowStateMachine;
202 mWorkflowStateMachine->setActiveState(uid);
211 void StateServiceImpl::fillDefault(QString name, T value)
219 void StateServiceImpl::fillDefaultSettings()
221 this->fillDefault(
"Automation/autoStartTracking",
true);
222 this->fillDefault(
"Automation/autoStartStreaming",
true);
223 this->fillDefault(
"Automation/autoReconstruct",
true);
224 this->fillDefault(
"Automation/autoSelectActiveTool",
true);
225 this->fillDefault(
"Automation/autoSave",
true);
226 this->fillDefault(
"Automation/autoLoadRecentPatient",
true);
227 this->fillDefault(
"Automation/autoLoadRecentPatientWithinHours", 8);
228 this->fillDefault(
"Automation/autoShowNewData",
false);
230 this->fillDefault(
"TrackingPositionFilter/enabled",
false);
232 this->fillDefault(
"renderingInterval", 33);
233 this->fillDefault(
"backgroundColor", QColor(
"black"));
234 this->fillDefault(
"vlcPath",
vlc()->getVLCPath());
235 this->fillDefault(
"globalPatientNumber", 1);
236 this->fillDefault(
"Ultrasound/acquisitionName",
"US-Acq");
237 this->fillDefault(
"Ultrasound/8bitAcquisitionData",
false);
238 this->fillDefault(
"Ultrasound/CompressAcquisition",
true);
239 this->fillDefault(
"View3D/sphereRadius", 1.0);
240 this->fillDefault(
"View3D/labelSize", 2.5);
241 this->fillDefault(
"View3D/showOrientationAnnotation",
true);
242 this->fillDefault(
"Navigation/anyplaneViewOffset", 0.25);
243 this->fillDefault(
"Navigation/followTooltip",
true);
244 this->fillDefault(
"Navigation/followTooltipBoundary", 0.1);
260 this->fillDefault(
"showSectorInRTView",
true);
262 this->fillDefault(
"View3D/eyeAngle", 4.0);
263 this->fillDefault(
"View/showDataText",
true);
264 this->fillDefault(
"View/showLabels",
true);
265 this->fillDefault(
"View/showMetricNamesInCorner",
false);
266 this->fillDefault(
"View3D/annotationModelSize", 0.2);
267 this->fillDefault(
"View3D/annotationModel",
"woman.stl");
268 this->fillDefault(
"View3D/depthPeeling",
false);
269 this->fillDefault(
"View3D/ImageRender3DVisualizer",
"vtkGPUVolumeRayCastMapper");
270 this->fillDefault(
"View3D/maxRenderSize", 10 * pow(10.0,6));
272 this->fillDefault(
"stillUpdateRate", 0.001);
275 this->fillDefault(
"useGPU2DRendering",
true);
277 this->fillDefault(
"useGPU2DRendering",
false);
279 this->fillDefault(
"useGPU2DRendering",
true);
282 this->fillDefault(
"optimizedViews",
true);
283 this->fillDefault(
"smartRender",
true);
285 this->fillDefault(
"IGSTKDebugLogging",
false);
286 this->fillDefault(
"giveManualToolPhysicalProperties",
false);
287 this->fillDefault(
"renderSpeedLogging",
false);
289 this->fillDefault(
"applyTransferFunctionPresetsToAll",
false);
291 this->fillDefault(
"USsimulation/type",
"Original data");
292 this->fillDefault(
"USsimulation/volume",
"");
293 this->fillDefault(
"USsimulation/gain", 0.70);
300 return parser.
getDesktop(mWorkflowStateMachine->getActiveUidState());
306 parser.
setDesktop(mWorkflowStateMachine->getActiveUidState(),
313 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)