26#ifndef FRAMEOFREFERENCE_H
27#define FRAMEOFREFERENCE_H
74 friend TransformationManager;
89 explicit FrameOfReference(QString name, QString description =
"");
95 FrameOfReference(QUuid uuid, QString name, QString description,
int numberOfDimensions,
const AnatomicalOrientation& ao, std::vector<Unit>& units);
98 explicit FrameOfReference(
const FrameOfReference&);
105 bool resetUuid(QUuid newId);
202 bool operator==(
const FrameOfReference& b)
const;
208 bool operator!=(
const FrameOfReference& b)
const;
220 void fromVariant(
const QVariant& variant)
override;
226 bool setUuid(QUuid newId)
override;
231 QUuid
getUuid()
const override;
246 std::vector<Unit> units = {
"mm",
"mm",
"mm",
"s",
""};
249 int numberOfDimensions = 3;
274 static QPair<QColor, int> getNextColorAndIndex();
279 return anatomicalOrientation;
283 return anatomicalOrientation;
288 this->anatomicalOrientation = anatomicalOrientation;
298 return numberOfDimensions;
323 return anatomicalOrientation.getLabel(axis, minDirection);
#define CAMITK_API
Definition CamiTKAPI.h:66
Definition AnatomicalOrientation.h:81
void setOrientation(QString threeLetterCode)
Sets the orientation using the standard 3-letter code.
Definition AnatomicalOrientation.h:127
bool setUuid(QUuid newId) override
Set the unique identifier only if it is not already set.
Definition FrameOfReference.cpp:91
void setDescription(QString desc)
Set the description of the FrameOfReference.
Definition FrameOfReference.h:317
void setNumberOfDimensions(int numberOfDimensions)
Set the number of dimensions of this FrameOfReference.
Definition FrameOfReference.cpp:57
bool operator==(const FrameOfReference &b) const
Equality operator.
Definition FrameOfReference.h:327
void setColor(const QColor &color)
Set a color for graphical representation of the FrameOfReference.
Definition FrameOfReference.cpp:136
void fromVariant(const QVariant &variant) override
Load the Frame content from a QVariant.
Definition FrameOfReference.cpp:116
void setAnatomicalOrientation(const AnatomicalOrientation &anatomicalOrientation)
Set anatomical orientation information.
Definition FrameOfReference.h:287
QString getName() const
Get the FrameOfReference name.
Definition FrameOfReference.h:302
bool operator!=(const FrameOfReference &b) const
Difference operator.
Definition FrameOfReference.h:332
void setUnit(int dimension, Unit u)
Set the unit of one dimension.
Definition FrameOfReference.cpp:84
QVariant toVariant() const override
Convert the Frame to a QVariant for Persistence.
Definition FrameOfReference.cpp:102
void setName(QString name)
Set the name of the FrameOfReference Should be a short string, use setDescription if you want to stor...
Definition FrameOfReference.h:307
QUuid getUuid() const override
Get the unique identifier of the Frame.
Definition FrameOfReference.h:337
QString getAnatomicalOrientationLabel(int axis, bool minDirection) const
Get the Anatomical orientation label of the corresponding axis/direction (or empty string if there is...
Definition FrameOfReference.h:322
int getNumberOfDimensions() const
Get the number of dimensions of this FrameOfReference.
Definition FrameOfReference.h:297
Unit getUnit(int dimension)
get the unit of the given dimension if dimension is valid otherwise returns an invalid Unit
Definition FrameOfReference.cpp:74
int getIndex()
Get the index (a non-unique ID useful for user interaction) indexes start at 1.
Definition FrameOfReference.cpp:67
QString getDescription() const
Get the description of the FrameOfReference.
Definition FrameOfReference.h:312
const QColor & getColor()
Get the color for graphical representation of the FrameOfReference Set the color the first time this ...
Definition FrameOfReference.cpp:143
const AnatomicalOrientation & getAnatomicalOrientation() const
Get the anatomical information of the Frame.
Definition FrameOfReference.h:278
Interface for all objects that should be serialized by the PersistenceManager.
Definition InterfacePersistence.h:38
QString Unit
Unit is a type that defines the unit used by data (e.g.
Definition FrameOfReference.h:49