12 #ifndef CXPATIENTMODELSERVICE_H_ 13 #define CXPATIENTMODELSERVICE_H_ 15 #include "cxResourceExport.h" 19 #include "boost/shared_ptr.hpp" 30 typedef boost::shared_ptr<class Data>
DataPtr;
31 typedef boost::shared_ptr<class Image>
ImagePtr;
34 #define PatientModelService_iid "cx::PatientModelService" 39 class RegistrationTransform;
40 class LandmarkProperty;
98 virtual void insertData(
DataPtr data,
bool overWrite =
false) = 0;
99 virtual std::map<QString, DataPtr> getDatas(
DataFilter filter = HideUnavailable)
const = 0;
100 virtual std::map<QString, DataPtr> getChildren(QString parent_uid, QString of_type=
"")
const = 0;
107 virtual DataPtr createData(QString type, QString uid, QString name=
"") = 0;
108 virtual void removeData(QString uid) = 0;
111 template <
class DATA>
112 std::map<QString, boost::shared_ptr<DATA> > getDataOfType()
const;
113 DataPtr getData(
const QString& uid)
const;
114 template <
class DATA>
115 boost::shared_ptr<DATA> getData(
const QString& uid)
const;
117 boost::shared_ptr<DATA> createSpecificData(QString uid, QString name=
"");
120 virtual std::map<QString, VideoSourcePtr> getStreams()
const = 0;
124 virtual RegistrationHistoryPtr get_rMpr_History()
const = 0;
130 virtual LandmarksPtr getPatientLandmarks()
const = 0;
135 virtual std::map<QString, LandmarkProperty> getLandmarkProperties()
const = 0;
136 virtual void setLandmarkName(QString uid, QString name) = 0;
137 virtual void setLandmarkActive(QString uid,
bool active) = 0;
138 virtual QString addLandmark() = 0;
139 virtual void deleteLandmarks() = 0;
141 virtual void updateRegistration_rMpr(
const QDateTime& oldTime,
const RegistrationTransform& newTransform);
143 virtual QString getActivePatientFolder()
const = 0;
144 QString generateFilePath(QString folderName, QString ending);
146 virtual bool isPatientValid()
const = 0;
147 virtual DataPtr importData(QString fileName, QString &infoText) = 0;
148 virtual void exportPatient(PATIENT_COORDINATE_SYSTEM externalSpace) = 0;
150 virtual PresetTransferFunctions3DPtr getPresetTransferFunctions3D()
const = 0;
152 virtual void setCenter(
const Vector3D& center) = 0;
153 virtual Vector3D getCenter()
const = 0;
158 virtual CLINICAL_VIEW getClinicalApplication()
const = 0;
159 virtual void setClinicalApplication(CLINICAL_VIEW application) = 0;
161 virtual void autoSave() = 0;
162 virtual bool isNull() = 0;
164 static PatientModelServicePtr getNullObject();
166 virtual void makeAvailable(
const QString& uid,
bool available) = 0;
169 void operatingTableChanged();
170 void centerChanged();
171 void dataAddedOrRemoved();
172 void landmarkPropertiesChanged();
173 void clinicalApplicationChanged();
176 void patientChanged();
177 void videoAddedToTrackedStream();
181 template <
class DATA>
184 std::map<QString, DataPtr> data = this->getDatas();
185 std::map<QString, boost::shared_ptr<DATA> > retval;
186 for (std::map<QString, DataPtr>::const_iterator i=data.begin(); i!=data.end(); ++i)
188 boost::shared_ptr<DATA> val = boost::dynamic_pointer_cast<DATA>(i->second);
190 retval[val->getUid()] = val;
195 template <
class DATA>
198 return boost::dynamic_pointer_cast<DATA>(this->getData(uid));
204 DataPtr retval = this->createData(DATA::getTypeName(), uid, name);
205 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
OperatingTable(Transform3D tr)
boost::shared_ptr< class Data > DataPtr
DataPtr getData(const QString &uid) const
Vector3D getVectorUp() const
Returns the table's up vector in R space.
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< class VideoSource > VideoSourcePtr
std::map< QString, boost::shared_ptr< DATA > > getDataOfType() const
Transform3D rMot
Transform from OT to reference space.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
The OperatingTable class.
boost::shared_ptr< DATA > createSpecificData(QString uid, QString name="")
#define PatientModelService_iid
virtual ~PatientModelService()
Namespace for all CustusX production code.