|
NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
|
Go to the documentation of this file.
26 DataMetric(uid, name, dataManager, spaceProvider),
28 mSpace(CoordinateSystem::reference())
31 mSpaceListener->setSpace(mSpace);
32 connect(mSpaceListener.get(), SIGNAL(changed()),
this, SLOT(resetCachedValues()));
33 connect(mSpaceListener.get(), SIGNAL(changed()),
this, SIGNAL(
transformChanged()));
56 this->resetCachedValues();
72 mCoordinate = new_M_old.coord(mCoordinate);
75 this->resetCachedValues();
76 mSpaceListener->setSpace(space);
88 dataNode.toElement().setAttribute(
"space", mSpace.
toString());
89 dataNode.toElement().setAttribute(
"coord",
qstring_cast(mCoordinate));
108 void PointMetric::resetCachedValues()
110 mCachedRefCoord.
reset();
118 if (!mCachedRefCoord.
isValid())
122 mCachedRefCoord.
set(val);
124 return mCachedRefCoord.
get();
QString qstring_cast(const T &val)
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,...
Vector3D getCoordinate() const
Namespace for all CustusX production code.
virtual void parseXml(QDomNode &dataNode)
Use a XML node to load data.
void setCoordinate(const Vector3D &p)
void addXml(QDomNode &dataNode)
adds xml information about the data and its variabels
virtual QString getValueAsString() const
virtual Vector3D getRefCoord() const
void transformChanged()
emitted when transform is changed
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
csREF
the data reference space (r) using LPS (left-posterior-superior) coordinates.
virtual void addXml(QDomNode &dataNode)
adds xml information about the data and its variabels
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
SpaceProviderPtr mSpaceProvider
virtual QString getParentSpace()
virtual DoubleBoundingBox3D boundingBox() const
static PointMetricPtr create(QString uid, QString name, PatientModelServicePtr dataManager, SpaceProviderPtr spaceProvider)
static CoordinateSystem fromString(QString text)
Data class that represents a single point.
CoordinateSystem getSpace() const
boost::shared_ptr< class PointMetric > PointMetricPtr
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
void parseXml(QDomNode &dataNode)
Use a XML node to load data.
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
Identification of a Coordinate system.
void setSpace(CoordinateSystem space)
QString prettyFormat(Vector3D val, int decimals, int fieldWidth)