15 #include <QDomDocument> 109 std::vector<Vector3D> retval;
111 for (
unsigned x=0; x<2; ++x)
112 for (
unsigned y=0; y<2; ++y)
113 for (
unsigned z=0; z<2; ++z)
114 retval.push_back(bb.
corner(x,y,z));
125 QDomDocument doc = dataNode.ownerDocument();
129 dataNode.toElement().setAttribute(
"uid",
mUid);
130 dataNode.toElement().setAttribute(
"name",
mName);
131 dataNode.toElement().setAttribute(
"type", this->
getType());
133 QDomElement filePathNode = doc.createElement(
"filePath");
134 filePathNode.appendChild(doc.createTextNode(this->getFilename()));
135 dataNode.appendChild(filePathNode);
137 QDomElement acqTimeNode = doc.createElement(
"acqusitionTime");
139 dataNode.appendChild(acqTimeNode);
143 QDomElement landmarksNode = doc.createElement(
"landmarks");
145 dataNode.appendChild(landmarksNode);
151 if (dataNode.isNull())
154 QDomNode registrationHistory = dataNode.namedItem(
"registrationHistory");
157 if (!dataNode.namedItem(
"acqusitionTime").toElement().isNull())
162 mLandmarks->parseXml(dataNode.namedItem(
"landmarks"));
175 QRegExp tsReg(
"[0-9]{8}T[0-9]{6}");
176 if (tsReg.indexIn(
mUid) > 0)
227 void Data::addPlane(
vtkPlanePtr plane, std::vector<vtkPlanePtr> &planes)
229 if (std::count(planes.begin(), planes.end(), plane))
231 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)
Vector3D corner(int x, int y, int z) const
QDateTime mOriginalAcquisitionTime
Original aquisition time (from hardware if possible)
void setSoftwareAcquisitionTime(QDateTime time)
virtual bool isEqual(DataPtr metric)
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
boost::shared_ptr< class Data > DataPtr
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
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
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 std::vector< Vector3D > getPointCloud() const
virtual DoubleBoundingBox3D boundingBox() const =0
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()
QString streamXml2String(T &val)
virtual void addPersistentClipPlane(vtkPlanePtr plane)
vtkSmartPointer< class vtkPlane > vtkPlanePtr
A history of registration events.
virtual void setFilename(QString val)
Namespace for all CustusX production code.
std::vector< vtkPlanePtr > mPersistentClipPlanes