29 mAcquisitionData.reset(
new AcquisitionData(mServices, mUsReconstructService));
30 mAcquisition.reset(
new Acquisition(mAcquisitionData));
59 void AcquisitionImplService::duringClearPatientSlot()
62 mAcquisitionData->clear();
65 void AcquisitionImplService::duringSavePatientSlot(QDomElement& node)
68 QDomElement managerNode = root.
descend(
"managers").
node().toElement();
69 this->addXml(managerNode);
72 void AcquisitionImplService::duringLoadPatientSlot(QDomElement& node)
75 QDomElement stateManagerNode = root.
descend(
"managers/stateManager").
node().toElement();
76 if (!stateManagerNode.isNull())
77 this->parseXml(stateManagerNode);
82 return mAcquisition->getLatestSession();
87 return mAcquisition->getPluginData()->getRecordSessions();
92 return mUsAcquisition->isReady(context)
93 && mAcquisition->isReady(context);
99 text = mAcquisition->getInfoText(context) +
"<br>" + mUsAcquisition->getInfoText(context);
102 QStringList list = text.split(
"<br>", QString::SkipEmptyParts);
103 text = list.join(
"<br>");
114 return mAcquisition->getState();
119 mAcquisition->startRecord(context, category, session);
124 mAcquisition->stopRecord();
129 mAcquisition->cancelRecord();
134 mAcquisition->startPostProcessing();
139 mAcquisition->stopPostProcessing();
144 return mUsAcquisition->getNumberOfSavingThreads();
147 void AcquisitionImplService::addXml(QDomNode &dataNode)
149 mAcquisitionData->addXml(dataNode);
152 void AcquisitionImplService::parseXml(QDomNode &dataNode)
154 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()
XMLNodeAdder descend(QString path)
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()
XMLNodeParser descend(QString path)
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()
Namespace for all CustusX production code.