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" 60 class RegistrationTransform;
61 class LandmarkProperty;
119 virtual void insertData(
DataPtr data) = 0;
120 virtual std::map<QString, DataPtr> getDatas(
DataFilter filter = HideUnavailable)
const = 0;
121 virtual std::map<QString, DataPtr> getChildren(QString parent_uid, QString of_type=
"")
const = 0;
128 virtual DataPtr createData(QString type, QString uid, QString name=
"") = 0;
129 virtual void removeData(QString uid) = 0;
132 template <
class DATA>
133 std::map<QString, boost::shared_ptr<DATA> > getDataOfType()
const;
134 DataPtr getData(
const QString& uid)
const;
135 template <
class DATA>
136 boost::shared_ptr<DATA> getData(
const QString& uid)
const;
138 boost::shared_ptr<DATA> createSpecificData(QString uid, QString name=
"");
141 virtual std::map<QString, VideoSourcePtr> getStreams()
const = 0;
145 virtual RegistrationHistoryPtr get_rMpr_History()
const = 0;
151 virtual LandmarksPtr getPatientLandmarks()
const = 0;
156 virtual std::map<QString, LandmarkProperty> getLandmarkProperties()
const = 0;
157 virtual void setLandmarkName(QString uid, QString name) = 0;
158 virtual void setLandmarkActive(QString uid,
bool active) = 0;
159 virtual QString addLandmark() = 0;
160 virtual void deleteLandmarks() = 0;
162 virtual void updateRegistration_rMpr(
const QDateTime& oldTime,
const RegistrationTransform& newTransform);
164 virtual QString getActivePatientFolder()
const = 0;
165 QString generateFilePath(QString folderName, QString ending);
167 virtual bool isPatientValid()
const = 0;
168 virtual DataPtr importData(QString fileName, QString &infoText) = 0;
169 virtual void exportPatient(PATIENT_COORDINATE_SYSTEM externalSpace) = 0;
171 virtual PresetTransferFunctions3DPtr getPresetTransferFunctions3D()
const = 0;
173 virtual void setCenter(
const Vector3D& center) = 0;
174 virtual Vector3D getCenter()
const = 0;
179 virtual CLINICAL_VIEW getClinicalApplication()
const = 0;
180 virtual void setClinicalApplication(CLINICAL_VIEW application) = 0;
182 virtual void autoSave() = 0;
183 virtual bool isNull() = 0;
185 static PatientModelServicePtr getNullObject();
187 virtual void makeAvailable(
const QString& uid,
bool available) = 0;
190 void operatingTableChanged();
191 void centerChanged();
192 void dataAddedOrRemoved();
193 void landmarkPropertiesChanged();
194 void clinicalApplicationChanged();
197 void patientChanged();
198 void videoAddedToTrackedStream();
202 template <
class DATA>
205 std::map<QString, DataPtr> data = this->getDatas();
206 std::map<QString, boost::shared_ptr<DATA> > retval;
207 for (std::map<QString, DataPtr>::const_iterator i=data.begin(); i!=data.end(); ++i)
209 boost::shared_ptr<DATA> val = boost::dynamic_pointer_cast<DATA>(i->second);
211 retval[val->getUid()] = val;
216 template <
class DATA>
219 return boost::dynamic_pointer_cast<DATA>(this->getData(uid));
225 DataPtr retval = this->createData(DATA::getTypeName(), uid, name);
226 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.