CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxFiberBundleRep.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 CXFIBERBUNDLEREP_H_
14 #define CXFIBERBUNDLEREP_H_
15 
16 #include "cxResourceVisualizationExport.h"
17 
18 #include "vtkForwardDeclarations.h"
19 
20 #include "cxRepImpl.h"
21 #include "cxTransform3D.h"
22 #include "cxForwardDeclarations.h"
23 #include "cxVtkHelperClasses.h"
24 #include "cxViewportListener.h"
25 
26 namespace cx
27 {
28 
39 class cxResourceVisualization_EXPORT FiberBundleRep : public RepImpl
40 {
41  Q_OBJECT
42 
43 public:
44  static FiberBundleRepPtr New(const QString& uid="");
45  virtual ~FiberBundleRep() {}
46 
48  virtual QString getType() const;
49 
51  virtual void setBundle(MeshPtr bundle);
52  virtual bool hasBundle(MeshPtr bundle) const { return (mBundle == bundle); }
54  virtual MeshPtr getBundle() { return mBundle; }
55 
56 protected:
58  virtual void addRepActorsToViewRenderer(ViewPtr view);
59  virtual void removeRepActorsFromViewRenderer(ViewPtr view);
60 
61 private:
62  double mFiberWidth;
63 
64  MeshPtr mBundle;
65  ViewportListenerPtr mViewportListener;
66 
67  vtkActorPtr mActor;
68  vtkPolyDataMapperPtr mPolyDataMapper;
69  vtkPropertyPtr mProperty;
70 
71  private slots:
72  void bundleChanged();
73  void bundleTransformChanged();
74 
75 };
76 
77 } // namespace cx
78 
79 #endif /*CXFIBERBUNDLEREP_H_*/
boost::shared_ptr< class FiberBundleRep > FiberBundleRepPtr
vtkSmartPointer< class vtkActor > vtkActorPtr
vtkSmartPointer< class vtkPolyDataMapper > vtkPolyDataMapperPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
virtual MeshPtr getBundle()
vtkSmartPointer< class vtkProperty > vtkPropertyPtr
boost::shared_ptr< class View > ViewPtr
virtual bool hasBundle(MeshPtr bundle) const
Default implementation of Rep.
Definition: cxRepImpl.h:42
Display a DTI Fiber bundle (fiber tracks) in 3D.
boost::shared_ptr< class Mesh > MeshPtr
Namespace for all CustusX production code.