35 #include <boost/bind.hpp>
36 #include <QDomElement>
37 #include <ctkPluginContext.h>
51 mPluginContext(context),
54 this->initServiceListener();
62 void PatientModelServiceProxy::initServiceListener()
66 boost::bind(&PatientModelServiceProxy::onServiceAdded,
this, _1),
68 boost::bind(&PatientModelServiceProxy::onServiceRemoved,
this, _1)
70 mServiceListener->open();
73 void PatientModelServiceProxy::onServiceAdded(PatientModelService* service)
75 mPatientModelService.reset(service, null_deleter());
86 if(mPatientModelService->isNull())
87 reportWarning(
"PatientModelServiceProxy::onServiceAdded mPatientModelService->isNull()");
96 void PatientModelServiceProxy::onServiceRemoved(PatientModelService *service)
118 mPatientModelService->insertData(data);
123 return mPatientModelService->createData(type, uid, name);
128 return mPatientModelService->getData();
133 return mPatientModelService->getData(uid);
138 return mPatientModelService->getPatientLandmarks();
143 return mPatientModelService->getLandmarkProperties();
148 mPatientModelService->setLandmarkName(uid, name);
153 mPatientModelService->autoSave();
158 return mPatientModelService->isNull();
163 return mPatientModelService->getStreams();
168 return mPatientModelService->getActivePatientFolder();
173 return mPatientModelService->isPatientValid();
178 return mPatientModelService->importData(fileName, infoText);
183 return mPatientModelService->exportPatient(externalSpace);
188 return mPatientModelService->removeData(uid);
193 return mPatientModelService->getPresetTransferFunctions3D();
198 mPatientModelService->setCenter(center);
203 return mPatientModelService->getCenter();
208 return mPatientModelService->addLandmark();
213 mPatientModelService->setLandmarkActive(uid, active);
218 return mPatientModelService->get_rMpr_History();
223 return mPatientModelService->getActiveData();
228 return mPatientModelService->getClinicalApplication();
233 mPatientModelService->setClinicalApplication(application);
virtual void removeData(QString uid)
virtual RegistrationHistoryPtr get_rMpr_History() const
virtual QString addLandmark()
boost::shared_ptr< class RegistrationHistory > RegistrationHistoryPtr
virtual std::map< QString, VideoSourcePtr > getStreams() const
virtual void setCenter(const Vector3D ¢er)
void dataAddedOrRemoved()
virtual void exportPatient(PATIENT_COORDINATE_SYSTEM externalSpace)
void landmarkPropertiesChanged()
emitted when global info about a landmark changed
virtual void setClinicalApplication(CLINICAL_VIEW application)
boost::shared_ptr< class TransferFunctions3DPresets > PresetTransferFunctions3DPtr
static PatientModelServicePtr getNullObject()
virtual void setLandmarkActive(QString uid, bool active)
boost::shared_ptr< class ActiveData > ActiveDataPtr
virtual QString getActivePatientFolder() const
void centerChanged()
emitted when center is changed.
boost::shared_ptr< class Landmarks > LandmarksPtr
virtual void setLandmarkName(QString uid, QString name)
PatientModelServiceProxy(ctkPluginContext *context)
static PatientModelServicePtr create(ctkPluginContext *pluginContext)
boost::shared_ptr< class Data > DataPtr
virtual std::map< QString, DataPtr > getData() const
virtual DataPtr createData(QString type, QString uid, QString name="")
virtual std::map< QString, LandmarkProperty > getLandmarkProperties() const
virtual CLINICAL_VIEW getClinicalApplication() const
virtual PresetTransferFunctions3DPtr getPresetTransferFunctions3D() const
void reportWarning(QString msg)
virtual ActiveDataPtr getActiveData() const
virtual DataPtr importData(QString fileName, QString &infoText)
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
virtual LandmarksPtr getPatientLandmarks() const
landmark defined in patient space
void clinicalApplicationChanged()
void videoAddedToTrackedStream()
virtual ~PatientModelServiceProxy()
Helper class for listening to services being added, modified and removed.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
virtual Vector3D getCenter() const
current common center point for user viewing.
virtual bool isPatientValid() const
virtual void insertData(DataPtr data)