NorMIT-nav  22.09
An IGT application
cxProbeDefinition.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 
13 #ifndef CXPROBEDATA_H_
14 #define CXPROBEDATA_H_
15 
16 #include "cxResourceExport.h"
17 
18 #include <QSize>
19 #include <QMap>
20 #include <QVariant>
21 class QDomNode;
22 #include "cxVector3D.h"
23 #include "cxBoundingBox3D.h"
24 
25 namespace cx
26 {
27 
101 class cxResource_EXPORT ProbeDefinition
102 {
103 public:
104  enum TYPE { tNONE=0,
105  tSECTOR=1,
106  tLINEAR=2
107  };
108 
109 public:
110  ProbeDefinition(TYPE type = tNONE);
111  void addXml(QDomNode dataNode) const;
112  void parseXml(QDomNode dataNode);
113 
114  TYPE getType() const;
115  double getDepthStart() const;
116  double getDepthEnd() const;
117  double getWidth() const;
118  double getTemporalCalibration() const;
119  double getCenterOffset() const;
120  void resample(QSize mSize);
121  QString getUid() const;
122 
123  void setTemporalCalibration(double value);
124  void setType(TYPE type);
125  void setSector(double depthStart, double depthEnd, double width, double centerOffset = 0);
126  void setUid(QString uid);
127 
128  void updateClipRectFromSector();
129  void updateSectorFromClipRect();
130  void applySoundSpeedCompensationFactor(double factor);
131  double getSoundSpeedCompensationFactor() const;
132 
133  Vector3D getOrigin_u() const;
134  DoubleBoundingBox3D getClipRect_u() const;
135 
136  Vector3D getOrigin_p() const;
137  Vector3D getSpacing() const;
138  DoubleBoundingBox3D getClipRect_p() const;
139  QSize getSize() const;
140 
141  void setOrigin_p(Vector3D origin_p);
142  void setSpacing(Vector3D spacing);
143  void setClipRect_p(DoubleBoundingBox3D clipRect_p);
144  void setSize(QSize size);
145 
146  void setUseDigitalVideo(bool val);
147  bool getUseDigitalVideo() const;
148 
149  void setVariable(QString variableName, QVariant value);
150  QVariant getVariable(QString variableName);
151 
152 private:
153  TYPE mType;
154  double mDepthStart;
155  double mDepthEnd;
156  double mWidth;
157  double mTemporalCalibration;
158  double mCenterOffset;
159  double mSoundSpeedCompensationFactor;
160  QString mUid;
161 
162  //ProbeImageData variables
163  Vector3D mOrigin_p;
164  Vector3D mSpacing;//(_p)
165  DoubleBoundingBox3D mClipRect_p;
166  QSize mSize;//_p
167  bool mDigital;
168 
169  //ProbeImageData
170  Vector3D transform_p_to_u(const Vector3D& q_p) const;
171  void addImageXml(QDomNode dataNode) const;
172  void parseImageXml(QDomNode dataNode);
173 
174  QMap<QString, QVariant> mAdditionalVariables;
175 };
176 
177 typedef boost::shared_ptr<ProbeDefinition> ProbeDefinitionPtr;
178 
179 } // namespace cx
180 
181 #endif /*CXPROBEDATA_H_*/
cx::ProbeDefinition
Definition of characteristics for an Ultrasound Probe Sector.
Definition: cxProbeDefinition.h:101
cx::DoubleBoundingBox3D
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,...
Definition: cxBoundingBox3D.h:63
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::ProbeDefinition::TYPE
TYPE
Definition: cxProbeDefinition.h:104
cx::ProbeDefinitionPtr
boost::shared_ptr< class ProbeDefinition > ProbeDefinitionPtr
Definition: cxImageReceiverThread.h:32
cxBoundingBox3D.h
cxVector3D.h
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42