33 #ifndef CXPATIENTMODELSERVICE_H_
34 #define CXPATIENTMODELSERVICE_H_
36 #include "cxResourceExport.h"
40 #include "boost/shared_ptr.hpp"
51 typedef boost::shared_ptr<class Data>
DataPtr;
52 typedef boost::shared_ptr<class Image>
ImagePtr;
55 #define PatientModelService_iid "cx::PatientModelService"
59 class RegistrationTransform;
60 class LandmarkProperty;
90 virtual void insertData(
DataPtr data) = 0;
91 virtual std::map<QString, DataPtr> getData()
const = 0;
98 virtual DataPtr createData(QString type, QString uid, QString name=
"") = 0;
99 virtual void removeData(QString uid) = 0;
102 template <
class DATA>
103 std::map<QString, boost::shared_ptr<DATA> > getDataOfType()
const;
104 DataPtr getData(
const QString& uid)
const;
105 template <
class DATA>
106 boost::shared_ptr<DATA> getData(
const QString& uid)
const;
108 boost::shared_ptr<DATA> createSpecificData(QString uid, QString name=
"");
111 virtual std::map<QString, VideoSourcePtr> getStreams()
const = 0;
126 virtual std::map<QString, LandmarkProperty> getLandmarkProperties()
const = 0;
127 virtual void setLandmarkName(QString uid, QString name) = 0;
128 virtual void setLandmarkActive(QString uid,
bool active) = 0;
129 virtual QString addLandmark() = 0;
131 virtual void updateRegistration_rMpr(
const QDateTime& oldTime,
const RegistrationTransform& newTransform,
bool continuous);
133 virtual QString getActivePatientFolder()
const = 0;
134 QString generateFilePath(QString folderName, QString ending);
136 virtual bool isPatientValid()
const = 0;
137 virtual DataPtr importData(QString fileName, QString &infoText) = 0;
138 virtual void exportPatient(PATIENT_COORDINATE_SYSTEM externalSpace) = 0;
142 virtual void setCenter(
const Vector3D& center) = 0;
143 virtual Vector3D getCenter()
const = 0;
145 virtual CLINICAL_VIEW getClinicalApplication()
const = 0;
146 virtual void setClinicalApplication(CLINICAL_VIEW application) = 0;
148 virtual void autoSave() = 0;
149 virtual bool isNull() = 0;
154 void centerChanged();
155 void dataAddedOrRemoved();
156 void landmarkPropertiesChanged();
157 void clinicalApplicationChanged();
160 void patientChanged();
161 void videoAddedToTrackedStream();
165 template <
class DATA>
168 std::map<QString, DataPtr> data = this->
getData();
169 std::map<QString, boost::shared_ptr<DATA> > retval;
170 for (std::map<QString, DataPtr>::const_iterator i=data.begin(); i!=data.end(); ++i)
172 boost::shared_ptr<DATA> val = boost::dynamic_pointer_cast<DATA>(i->second);
174 retval[val->getUid()] = val;
179 template <
class DATA>
182 return boost::dynamic_pointer_cast<DATA>(this->
getData(uid));
189 return boost::dynamic_pointer_cast<DATA>(retval);
boost::shared_ptr< class RegistrationHistory > RegistrationHistoryPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
boost::shared_ptr< class TransferFunctions3DPresets > PresetTransferFunctions3DPtr
boost::shared_ptr< class Image > ImagePtr
boost::shared_ptr< class ActiveData > ActiveDataPtr
boost::shared_ptr< class Landmarks > LandmarksPtr
boost::shared_ptr< class Data > DataPtr
virtual DataPtr createData(QString type, QString uid, QString name="")=0
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< class VideoSource > VideoSourcePtr
std::map< QString, boost::shared_ptr< DATA > > getDataOfType() const
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
boost::shared_ptr< DATA > createSpecificData(QString uid, QString name="")
virtual std::map< QString, DataPtr > getData() const =0
#define PatientModelService_iid
virtual ~PatientModelService()