32 #ifndef CXCUSTOMMETRIC_H 33 #define CXCUSTOMMETRIC_H 35 #include "cxResourceExport.h" 68 virtual bool isValid()
const;
69 virtual QIcon
getIcon() {
return QIcon(
":/icons/metric_custom.png");}
71 QString getDefineVectorUpMethod()
const;
72 void setDefineVectorUpMethod(QString defineVectorUpMethod);
73 void setModelUid(QString val);
74 QString getModelUid()
const;
77 void setScaleToP1(
bool val);
78 bool getScaleToP1()
const;
79 void setOffsetFromP0(
double val);
80 double getOffsetFromP0()
const;
81 void setOffsetFromP1(
double val);
82 double getOffsetFromP1()
const;
83 void setRepeatDistance(
double val);
84 double getRepeatDistance()
const;
85 void setTranslationOnly(
bool val);
86 bool getTranslationOnly()
const;
87 void setTextureFollowTool(
bool val);
88 bool getTextureFollowTool()
const;
91 virtual void addXml(QDomNode& dataNode);
92 virtual void parseXml(QDomNode& dataNode);
94 virtual Vector3D getRefCoord()
const;
101 return "CustomMetric";
107 std::vector<Vector3D> getPositions()
const;
112 struct cxResource_EXPORT DefineVectorUpMethods
114 DefineVectorUpMethods()
116 table =
"tableDefinesUp";
117 connectedFrameInP1 =
"connectedFrameDefinesUp";
118 tool =
"toolDefinesUp";
121 QString connectedFrameInP1;
123 QStringList getAvailableDefineVectorUpMethods()
const;
124 std::map<QString, QString> getAvailableDefineVectorUpMethodsDisplayNames()
const;
129 QString mDefineVectorUpMethod;
131 DefineVectorUpMethods mDefineVectorUpMethods;
133 double mOffsetFromP0;
134 double mOffsetFromP1;
135 double mRepeatDistance;
136 bool mShowDistanceMarkers;
137 double mDistanceMarkerVisibility;
138 bool mTranslationOnly;
139 bool mTextureFollowTool;
144 Transform3D calculateTransformTo2DImageCenter()
const;
145 void onPropertiesChanged();
146 bool needForToolListenerHasChanged()
const;
147 void createOrDestroyToolListener();
150 CustomMetric::DefineVectorUpMethods getDefineVectorUpMethods()
const;
151 std::vector<Transform3D> calculateOrientations()
const;
152 int getRepeatCount()
const;
153 std::vector<Vector3D> getPointCloud()
const;
154 bool modelIsImage()
const;
155 void setShowDistanceMarkers(
bool show);
156 bool getShowDistanceMarkers()
const;
158 void setDistanceMarkerVisibility(
double val);
159 double getDistanceMarkerVisibility()
const;
168 #endif // CXSHAPEDMETRIC_H boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
virtual bool showValueInGraphics() const
virtual QString getType() const
boost::shared_ptr< class Data > DataPtr
static QString getTypeName()
Data class that represents a custom.
boost::shared_ptr< class PatientModelService > PatientModelServicePtr
boost::shared_ptr< class MetricReferenceArgumentList > MetricReferenceArgumentListPtr
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.
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
MetricReferenceArgumentListPtr getArguments()
virtual QString getValueAsString() const
boost::shared_ptr< class SpaceListener > SpaceListenerPtr
boost::shared_ptr< class Mesh > MeshPtr
Base class for all Data Metrics.
boost::shared_ptr< class CustomMetric > CustomMetricPtr
Namespace for all CustusX production code.