36 #include <QDomDocument>
128 QDomDocument doc = dataNode.ownerDocument();
132 dataNode.toElement().setAttribute(
"uid",
mUid);
133 dataNode.toElement().setAttribute(
"name",
mName);
134 dataNode.toElement().setAttribute(
"type", this->
getType());
136 QDomElement filePathNode = doc.createElement(
"filePath");
137 filePathNode.appendChild(doc.createTextNode(this->getFilename()));
138 dataNode.appendChild(filePathNode);
140 QDomElement acqTimeNode = doc.createElement(
"acqusitionTime");
142 dataNode.appendChild(acqTimeNode);
146 QDomElement landmarksNode = doc.createElement(
"landmarks");
148 dataNode.appendChild(landmarksNode);
154 if (dataNode.isNull())
157 QDomNode registrationHistory = dataNode.namedItem(
"registrationHistory");
160 if (!dataNode.namedItem(
"acqusitionTime").toElement().isNull())
165 mLandmarks->parseXml(dataNode.namedItem(
"landmarks"));
178 QRegExp tsReg(
"[0-9]{8}T[0-9]{6}");
179 if (tsReg.indexIn(
mUid) > 0)
225 void Data::addPlane(
vtkPlanePtr plane, std::vector<vtkPlanePtr> &planes)
227 if (std::count(planes.begin(), planes.end(), plane))
229 planes.push_back(plane);
std::vector< vtkPlanePtr > mInteractiveClipPlanes
virtual void clearPersistentClipPlanes()
virtual Transform3D get_rMd() const
boost::shared_ptr< class RegistrationHistory > RegistrationHistoryPtr
void removeInteractiveClipPlane(vtkPlanePtr plane)
QDateTime mOriginalAcquisitionTime
Original aquisition time (from hardware if possible)
void setSoftwareAcquisitionTime(QDateTime time)
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
void propertiesChanged()
emitted when one of the metadata properties (uid, name etc) changes
virtual QString getFilename() const
LandmarksPtr getLandmarks()
QString timestampMilliSecondsFormat()
void transformChanged()
emitted when transform is changed
void setName(const QString &name)
virtual void addXml(QDomNode &dataNode)
adds xml information about the data and its variabels
QString timestampSecondsFormat()
boost::shared_ptr< class Landmarks > LandmarksPtr
virtual QString getUid() const
virtual RegistrationHistoryPtr get_rMd_History()
virtual QString getType() const
void setUid(const QString &uid)
virtual QString getName() const
virtual void parseXml(QDomNode &dataNode)
Use a XML node to load data.
virtual TimeInfo getAdvancedTimeInfo() const
virtual QString getSpace()
void setAcquisitionTime(QDateTime time)
Identification of a Coordinate system.
virtual void setInteractiveClipPlane(vtkPlanePtr plane)
set a plane that is not saved
virtual std::vector< vtkPlanePtr > getAllClipPlanes()
void addInteractiveClipPlane(vtkPlanePtr plane)
virtual QDateTime getAcquisitionTime() const
static LandmarksPtr create()
QDateTime mSoftwareAcquisitionTime
Time stamp created in at arrival in CX or CX related software.
Data(const QString &uid, const QString &name="")
virtual QString getParentSpace()
vtkPlanePtr mInteractiveClipPlane
QDateTime mAcquisitionTime
Possibly modified time stamp.
RegistrationHistoryPtr m_rMd_History
virtual CoordinateSystem getCoordinateSystem()
void setOriginalAcquisitionTime(QDateTime time)
virtual void transformChangedSlot()
virtual void addPersistentClipPlane(vtkPlanePtr plane)
vtkSmartPointer< class vtkPlane > vtkPlanePtr
A history of registration events.
virtual void setFilename(QString val)
std::vector< vtkPlanePtr > mPersistentClipPlanes