11 #ifndef CXCUSTOMMETRIC_H 12 #define CXCUSTOMMETRIC_H 14 #include "cxResourceExport.h" 47 virtual bool isValid()
const;
48 virtual QIcon
getIcon() {
return QIcon(
":/icons/metric_custom.png");}
50 QString getDefineVectorUpMethod()
const;
51 void setDefineVectorUpMethod(QString defineVectorUpMethod);
52 void setModelUid(QString val);
53 QString getModelUid()
const;
56 void setScaleToP1(
bool val);
57 bool getScaleToP1()
const;
58 void setOffsetFromP0(
double val);
59 double getOffsetFromP0()
const;
60 void setOffsetFromP1(
double val);
61 double getOffsetFromP1()
const;
62 void setRepeatDistance(
double val);
63 double getRepeatDistance()
const;
64 void setTranslationOnly(
bool val);
65 bool getTranslationOnly()
const;
66 void setTextureFollowTool(
bool val);
67 bool getTextureFollowTool()
const;
70 virtual void addXml(QDomNode& dataNode);
71 virtual void parseXml(QDomNode& dataNode);
73 virtual Vector3D getRefCoord()
const;
80 return "CustomMetric";
86 std::vector<Vector3D> getPositions()
const;
91 struct cxResource_EXPORT DefineVectorUpMethods
93 DefineVectorUpMethods()
95 table =
"tableDefinesUp";
96 connectedFrameInP1 =
"connectedFrameDefinesUp";
97 tool =
"toolDefinesUp";
100 QString connectedFrameInP1;
102 QStringList getAvailableDefineVectorUpMethods()
const;
103 std::map<QString, QString> getAvailableDefineVectorUpMethodsDisplayNames()
const;
108 QString mDefineVectorUpMethod;
110 DefineVectorUpMethods mDefineVectorUpMethods;
112 double mOffsetFromP0;
113 double mOffsetFromP1;
114 double mRepeatDistance;
115 bool mShowDistanceMarkers;
116 double mDistanceMarkerVisibility;
117 bool mTranslationOnly;
118 bool mTextureFollowTool;
123 Transform3D calculateTransformTo2DImageCenter()
const;
124 void onPropertiesChanged();
125 bool needForToolListenerHasChanged()
const;
126 void createOrDestroyToolListener();
129 CustomMetric::DefineVectorUpMethods getDefineVectorUpMethods()
const;
130 std::vector<Transform3D> calculateOrientations()
const;
131 int getRepeatCount()
const;
132 std::vector<Vector3D> getPointCloud()
const;
133 bool modelIsImage()
const;
134 void setShowDistanceMarkers(
bool show);
135 bool getShowDistanceMarkers()
const;
137 void setDistanceMarkerVisibility(
double val);
138 double getDistanceMarkerVisibility()
const;
147 #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.