50 mAcquisitionData.reset(
new AcquisitionData(mServices, mUsReconstructService));
51 mAcquisition.reset(
new Acquisition(mAcquisitionData));
80 void AcquisitionImplService::duringClearPatientSlot()
83 mAcquisitionData->clear();
86 void AcquisitionImplService::duringSavePatientSlot(QDomElement& node)
88 XMLNodeAdder root(node);
89 QDomElement managerNode = root.descend(
"managers").node().toElement();
90 this->addXml(managerNode);
93 void AcquisitionImplService::duringLoadPatientSlot(QDomElement& node)
95 XMLNodeParser root(node);
96 QDomElement stateManagerNode = root.descend(
"managers/stateManager").node().toElement();
97 if (!stateManagerNode.isNull())
98 this->parseXml(stateManagerNode);
103 return mAcquisition->getLatestSession();
108 return mAcquisition->getPluginData()->getRecordSessions();
113 return mUsAcquisition->isReady(context)
114 && mAcquisition->isReady(context);
120 text = mAcquisition->getInfoText(context) +
"<br>" + mUsAcquisition->getInfoText(context);
123 QStringList list = text.split(
"<br>", QString::SkipEmptyParts);
124 text = list.join(
"<br>");
135 return mAcquisition->getState();
140 mAcquisition->startRecord(context, category, session);
145 mAcquisition->stopRecord();
150 mAcquisition->cancelRecord();
155 mAcquisition->startPostProcessing();
160 mAcquisition->stopPostProcessing();
165 return mUsAcquisition->getNumberOfSavingThreads();
168 void AcquisitionImplService::addXml(QDomNode &dataNode)
170 mAcquisitionData->addXml(dataNode);
173 void AcquisitionImplService::parseXml(QDomNode &dataNode)
175 mAcquisitionData->parseXml(dataNode);
AcquisitionImplService(ctkPluginContext *context)
void acquisitionStopped()
virtual bool isReady(TYPES context) const
void isLoading(QDomElement &root)
emitted while loading a session. Xml storage is available, getRootFolder() is set to loaded value...
void saveDataCompleted(QString mhdFilename)
emitted when data has been saved to file
virtual void stopRecord()
void saveDataCompleted(QString mhdFilename)
emitted when data has been saved to file
virtual void cancelRecord()
virtual int getNumberOfSavingThreads() const
virtual STATE getState() const
static VisServicesPtr create(ctkPluginContext *context)
virtual QString getInfoText(TYPES context) const
virtual void startRecord(TYPES context, QString category, RecordSessionPtr session)
boost::shared_ptr< class RecordSession > RecordSessionPtr
void recordedSessionsChanged()
virtual void startPostProcessing()
void cleared()
emitted when session is cleared, before isLoading is called
void acquisitionDataReady()
emitted when data is acquired and sent to the reconstruction module
virtual RecordSessionPtr getLatestSession()
void usReadinessChanged()
void recordedSessionsChanged()
virtual ~AcquisitionImplService()
void acquisitionStopped()
virtual void stopPostProcessing()
void acquisitionDataReady()
emitted when data is acquired and sent to the reconstruction module
void isSaving(QDomElement &root)
xml storage is available
Handles the us acquisition process.The USAcquisition object attaches itself to an input Acquisition o...
virtual std::vector< RecordSessionPtr > getSessions()