47 DataMetric(uid, name, dataManager, spaceProvider),
49 mSpace(CoordinateSystem::reference())
52 mSpaceListener->setSpace(mSpace);
53 connect(mSpaceListener.get(), SIGNAL(changed()),
this, SLOT(resetCachedValues()));
54 connect(mSpaceListener.get(), SIGNAL(changed()),
this, SIGNAL(
transformChanged()));
77 this->resetCachedValues();
93 mCoordinate = new_M_old.coord(mCoordinate);
96 this->resetCachedValues();
97 mSpaceListener->setSpace(space);
109 dataNode.toElement().setAttribute(
"space", mSpace.
toString());
110 dataNode.toElement().setAttribute(
"coord",
qstring_cast(mCoordinate));
129 void PointMetric::resetCachedValues()
131 mCachedRefCoord.
reset();
139 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) using LPS (left-posterior-superior) coordinates.
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
virtual QString getParentSpace()
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