46 DataMetric(uid, name, dataManager, spaceProvider),
48 mSpace(CoordinateSystem::reference())
51 mSpaceListener->setSpace(mSpace);
52 connect(mSpaceListener.get(), SIGNAL(changed()),
this, SLOT(resetCachedValues()));
53 connect(mSpaceListener.get(), SIGNAL(changed()),
this, SIGNAL(
transformChanged()));
71 this->resetCachedValues();
87 mCoordinate = new_M_old.coord(mCoordinate);
90 this->resetCachedValues();
91 mSpaceListener->setSpace(space);
103 dataNode.toElement().setAttribute(
"space", mSpace.
toString());
104 dataNode.toElement().setAttribute(
"coord",
qstring_cast(mCoordinate));
123 void PointMetric::resetCachedValues()
127 mCachedRefCoord.
reset();
138 if (!mCachedRefCoord.
isValid())
143 mCachedRefCoord.
set(val);
145 return mCachedRefCoord.
get();
155 return QString(
"%1 \"%2\" %3")
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
QString qstring_cast(const T &val)
void setSpace(CoordinateSystem space)
void addXml(QDomNode &dataNode)
adds xml information about the data and its variabels
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
void transformChanged()
emitted when transform is changed
void setCoordinate(const Vector3D &p)
QString prettyFormat(Vector3D val, int decimals, int fieldWidth)
csREF
the data reference space (r)
SpaceProviderPtr mSpaceProvider
virtual void parseXml(QDomNode &dataNode)
Use a XML node to load data.
void parseXml(QDomNode &dataNode)
Use a XML node to load data.
Vector3D getCoordinate() const
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
Identification of a Coordinate system.
QString getSingleLineHeader() const
virtual DoubleBoundingBox3D boundingBox() 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.
CoordinateSystem getSpace() const
cxLogicManager_EXPORT SpaceProviderPtr spaceProvider()
Data class that represents a single point.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
virtual QString getValueAsString() const
virtual Vector3D getRefCoord() const
virtual void addXml(QDomNode &dataNode)
adds xml information about the data and its variabels
virtual QString getAsSingleLineString() const
static PointMetricPtr create(QString uid, QString name, PatientModelServicePtr dataManager, SpaceProviderPtr spaceProvider)
static CoordinateSystem fromString(QString text)
boost::shared_ptr< class PointMetric > PointMetricPtr