NorMIT-nav  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
vtkCellArrayPtr
vtkSmartPointer< class vtkCellArray > vtkCellArrayPtr
Definition: vtkForwardDeclarations.h:41
cx::ReadFbgsMessage::axisZ
@ axisZ
Definition: cxReadFbgsMessage.h:43
cx::ReadFbgsMessage::m_prMt
Transform3D m_prMt
Definition: cxReadFbgsMessage.h:68
cx::ReadFbgsMessage::mActor
vtkActorPtr mActor
Definition: cxReadFbgsMessage.h:62
cx::ReadFbgsMessage::getMeshUid
static QString getMeshUid()
Definition: cxReadFbgsMessage.h:58
cx::ReadFbgsMessage::mZaxis
std::vector< double > mZaxis
Definition: cxReadFbgsMessage.h:76
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
cx::VisServicesPtr
boost::shared_ptr< class VisServices > VisServicesPtr
Definition: cxMainWindow.h:40
vtkPolyDataMapperPtr
vtkSmartPointer< class vtkPolyDataMapper > vtkPolyDataMapperPtr
Definition: vtkForwardDeclarations.h:112
cx::ReadFbgsMessage
Definition: cxReadFbgsMessage.h:36
cx::ReadFbgsMessage::mServices
VisServicesPtr mServices
Definition: cxReadFbgsMessage.h:60
cx::MeshPtr
boost::shared_ptr< class Mesh > MeshPtr
Definition: cxForwardDeclarations.h:48
cx::Transform3D
Transform3D Transform3D
Transform3D is a representation of an affine 3D transform.
Definition: cxLandmarkPatientRegistrationWidget.h:33
cx::ReadFbgsMessage::mLines
vtkCellArrayPtr mLines
Definition: cxReadFbgsMessage.h:66
cx::vtkPointsPtr
vtkSmartPointer< vtkPoints > vtkPointsPtr
Definition: cxCenterlineRegistration.h:41
vtkForwardDeclarations.h
vtkPropertyPtr
vtkSmartPointer< class vtkProperty > vtkPropertyPtr
Definition: vtkForwardDeclarations.h:120
cx::vtkPolyDataPtr
vtkSmartPointer< vtkPolyData > vtkPolyDataPtr
Definition: cxCenterlineRegistration.h:42
cx::ReadFbgsMessage::AXIS
AXIS
Definition: cxReadFbgsMessage.h:39
cx::ReadFbgsMessage::mProperty
vtkPropertyPtr mProperty
Definition: cxReadFbgsMessage.h:64
vtkActorPtr
vtkSmartPointer< class vtkActor > vtkActorPtr
Definition: vtkForwardDeclarations.h:31
cx::ReadFbgsMessage::mPolyData
vtkPolyDataPtr mPolyData
polydata representation of the probe, in space u
Definition: cxReadFbgsMessage.h:61
cx::ReadFbgsMessage::axisX
@ axisX
Definition: cxReadFbgsMessage.h:41
cx::ReadFbgsMessage::mAxis
std::vector< AXIS > mAxis
Definition: cxReadFbgsMessage.h:73
cx::ReadFbgsMessage::axisY
@ axisY
Definition: cxReadFbgsMessage.h:42
cx::ReadFbgsMessage::mYaxis
std::vector< double > mYaxis
Definition: cxReadFbgsMessage.h:75
cxTransform3D.h
cx::ReadFbgsMessage::mMesh
MeshPtr mMesh
Definition: cxReadFbgsMessage.h:70
cx::ReadFbgsMessage::mPolyDataMapper
vtkPolyDataMapperPtr mPolyDataMapper
Definition: cxReadFbgsMessage.h:63
cx::Vector3D
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
cx::ReadFbgsMessage::mPoints
vtkPointsPtr mPoints
Definition: cxReadFbgsMessage.h:65
cx::ReadFbgsMessage::mXaxis
std::vector< double > mXaxis
Definition: cxReadFbgsMessage.h:74
cx::ReadFbgsMessagePtr
boost::shared_ptr< class ReadFbgsMessage > ReadFbgsMessagePtr
Definition: cxReadFbgsMessage.h:26