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);
158 this->fillDefault(
"backgroundColor", QColor(30,60,70));
159 this->fillDefault(
"vlcPath",
vlc()->getVLCPath());
160 this->fillDefault(
"globalPatientNumber", 1);
161 this->fillDefault(
"Ultrasound/acquisitionName",
"US-Acq");
162 this->fillDefault(
"Ultrasound/8bitAcquisitionData",
false);
163 this->fillDefault(
"Ultrasound/CompressAcquisition",
true);
164 this->fillDefault(
"View3D/sphereRadius", 1.0);
165 this->fillDefault(
"View3D/labelSize", 2.5);
166 this->fillDefault(
"View3D/showOrientationAnnotation",
true);
167 this->fillDefault(
"Navigation/anyplaneViewOffset", 0.25);
168 this->fillDefault(
"Navigation/followTooltip",
true);
169 this->fillDefault(
"Navigation/followTooltipBoundary", 0.1);
171 this->fillDefault(
"showSectorInRTView",
true);
173 this->fillDefault(
"View3D/eyeAngle", 4.0);
174 this->fillDefault(
"View/showDataText",
true);
175 this->fillDefault(
"View/showLabels",
true);
176 this->fillDefault(
"View/showMetricNamesInCorner",
false);
177 this->fillDefault(
"View3D/annotationModelSize", 0.2);
178 this->fillDefault(
"View3D/annotationModel",
"woman.stl");
179 this->fillDefault(
"View3D/depthPeeling",
false);
180 this->fillDefault(
"View3D/ImageRender3DVisualizer",
"vtkGPUVolumeRayCastMapper");
181 this->fillDefault(
"View3D/maxRenderSize", 10 * pow(10.0,6));
183 this->fillDefault(
"stillUpdateRate", 0.001);
186 this->fillDefault(
"useGPU2DRendering",
true);
188 this->fillDefault(
"useGPU2DRendering",
false);
190 this->fillDefault(
"useGPU2DRendering",
true);
193 this->fillDefault(
"optimizedViews",
true);
194 this->fillDefault(
"smartRender",
true);
196 this->fillDefault(
"IGSTKDebugLogging",
false);
197 this->fillDefault(
"giveManualToolPhysicalProperties",
false);
198 this->fillDefault(
"renderSpeedLogging",
false);
200 this->fillDefault(
"applyTransferFunctionPresetsToAll",
false);
202 this->fillDefault(
"USsimulation/type",
"Original data");
203 this->fillDefault(
"USsimulation/volume",
"");
204 this->fillDefault(
"USsimulation/gain", 0.70);
211 return parser.
getDesktop(mWorkflowStateMachine->getActiveUidState());
217 parser.
setDesktop(mWorkflowStateMachine->getActiveUidState(),
224 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)