CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxReadFbgsMessage.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 CXREADFBGSMESSAGE_H
13 #define CXREADFBGSMESSAGE_H
14 
15 #include "org_custusx_tracking_shape_Export.h"
16 #include <vector>
17 #include <QString>
18 #include <QColor>
19 #include "vtkForwardDeclarations.h"
20 #include "cxTransform3D.h"
21 #include "cxForwardDeclarations.h"
22 
23 namespace cx
24 {
25 
26 typedef boost::shared_ptr<class ReadFbgsMessage> ReadFbgsMessagePtr;
27 
36 class org_custusx_tracking_shape_EXPORT ReadFbgsMessage
37 {
38 public:
39  enum AXIS
40  {
44  axisCOUNT
45  };
47  void readBuffer(QString buffer);
48  void setColor(QColor color);
49  vtkPolyDataPtr getPolyData();
50  vtkActorPtr getActor();
51  void set_prMt(Transform3D prMt);
52  void setShapePointLock(int posNumber);
53  bool createPolyData();
54  std::vector<double> *getAxisPosVector(AXIS axis);
55  int getRangeMax();
56  MeshPtr getMesh();
57  bool saveMeshSnapshot();
58  static QString getMeshUid() {return QString("FBGS_fiber");}
59 protected:
67  int mShapePointLockNumber = 0;
69  int mRangeMax = 0;
71  bool mMeshAdded = false;
72 
73  std::vector<AXIS> mAxis;
74  std::vector<double> mXaxis;
75  std::vector<double> mYaxis;
76  std::vector<double> mZaxis;
77 
78  QString getAxisString(AXIS axis);
79  void clearPolyData();
80  void clearAxisVectors();
81  int readPosForOneAxis(AXIS axis, QStringList &bufferList, int previousPos);
82  int getAxisStringPosition(QStringList &bufferList, AXIS axis, int startFrom);
83  bool toInt(QString string, int &value);
84  bool toDouble(QString string, double &value);
85  virtual Transform3D lockShape(int position);
86  Vector3D getDeltaPosition(int pos);
87 };
88 
89 }//cx
90 #endif // CXREADFBGSMESSAGE_H
boost::shared_ptr< class ReadFbgsMessage > ReadFbgsMessagePtr
vtkSmartPointer< class vtkActor > vtkActorPtr
std::vector< double > mXaxis
vtkSmartPointer< class vtkPolyDataMapper > vtkPolyDataMapperPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
vtkSmartPointer< class vtkProperty > vtkPropertyPtr
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
vtkSmartPointer< class vtkCellArray > vtkCellArrayPtr
vtkPropertyPtr mProperty
std::vector< double > mZaxis
vtkPolyDataMapperPtr mPolyDataMapper
vtkSmartPointer< vtkPoints > vtkPointsPtr
static QString getMeshUid()
vtkCellArrayPtr mLines
VisServicesPtr mServices
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
std::vector< double > mYaxis
boost::shared_ptr< class Mesh > MeshPtr
std::vector< AXIS > mAxis
vtkPolyDataPtr mPolyData
polydata representation of the probe, in space u
Namespace for all CustusX production code.