CustusX  2021.04.21-dev+develop.337f9
An IGT application
cxProbeDefinitionFromStringMessages.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 #ifndef CXPROBEDEFINITIONFROMSTRINGMESSAGES_H
13 #define CXPROBEDEFINITIONFROMSTRINGMESSAGES_H
14 
15 #include "org_custusx_core_openigtlink3_Export.h"
16 #include "igtlioLogic.h"
17 #include <boost/shared_ptr.hpp>
18 #include "cxProbeDefinition.h"
19 #include "cxImage.h"
20 #include "cxVector3D.h"
21 
22 namespace cx
23 {
24 
25 typedef boost::shared_ptr<struct SectorInfo> SectorInfoPtr;
26 typedef boost::shared_ptr<class ProbeDefinitionFromStringMessages> ProbeDefinitionFromStringMessagesPtr;
27 
38 class org_custusx_core_openigtlink3_EXPORT ProbeDefinitionFromStringMessages
39 {
40 public:
42  void reset();
43  void parseStringMessage(igtlioBaseConverter::HeaderData header, QString message);
44  void setImage(ImagePtr image);
45  bool haveValidValues();
46  bool haveChanged();
47  ProbeDefinitionPtr createProbeDefintion(QString uid);
48 
49  void parseValue(QString name, QString value);
50 
51 protected:
52  SectorInfoPtr mSectorInfo;
53 
54 private:
55  std::vector<double> toDoubleVector(QString values, QString separator = QString(" ")) const;
56  DoubleBoundingBox3D getBoundinBox() const;
57  double getWidth();
58  ProbeDefinitionPtr initProbeDefinition();
59  QSize getSize();
60  double getBoundingBoxThirdDimensionStart() const;
61  double getBoundingBoxThirdDimensionEnd() const;
62 
63  ProbeDefinitionPtr mProbeDefinition;
64 };
65 
66 }//cx
67 
68 #endif // CXPROBEDEFINITIONFROMSTRINGMESSAGES_H
boost::shared_ptr< class Image > ImagePtr
Definition: cxDicomWidget.h:27
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.
boost::shared_ptr< class ProbeDefinitionFromStringMessages > ProbeDefinitionFromStringMessagesPtr
CompositeGenerator< T > values(T val1, T val2)
Definition: catch.hpp:3128
boost::shared_ptr< struct SectorInfo > SectorInfoPtr
boost::shared_ptr< class ProbeDefinition > ProbeDefinitionPtr
Namespace for all CustusX production code.