NorMIT-nav  22.09
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_*/
cxRepImpl.h
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cxForwardDeclarations.h
vtkPolyDataMapperPtr
vtkSmartPointer< class vtkPolyDataMapper > vtkPolyDataMapperPtr
Definition: vtkForwardDeclarations.h:112
cx::FiberBundleRep::~FiberBundleRep
virtual ~FiberBundleRep()
Definition: cxFiberBundleRep.h:45
cx::ViewportListenerPtr
boost::shared_ptr< class ViewportListener > ViewportListenerPtr
Definition: cxForwardDeclarations.h:170
cx::MeshPtr
boost::shared_ptr< class Mesh > MeshPtr
Definition: cxForwardDeclarations.h:48
cxViewportListener.h
vtkForwardDeclarations.h
cx::FiberBundleRep::getBundle
virtual MeshPtr getBundle()
Definition: cxFiberBundleRep.h:54
vtkPropertyPtr
vtkSmartPointer< class vtkProperty > vtkPropertyPtr
Definition: vtkForwardDeclarations.h:120
cx::ViewPtr
boost::shared_ptr< class View > ViewPtr
Definition: cxForwardDeclarations.h:110
cx::RepImpl
Default implementation of Rep.
Definition: cxRepImpl.h:42
vtkActorPtr
vtkSmartPointer< class vtkActor > vtkActorPtr
Definition: vtkForwardDeclarations.h:31
cx::FiberBundleRep
Display a DTI Fiber bundle (fiber tracks) in 3D.
Definition: cxFiberBundleRep.h:39
cxVtkHelperClasses.h
cx::FiberBundleRep::hasBundle
virtual bool hasBundle(MeshPtr bundle) const
Definition: cxFiberBundleRep.h:52
cxTransform3D.h
cx::FiberBundleRepPtr
boost::shared_ptr< class FiberBundleRep > FiberBundleRepPtr
Definition: cxForwardDeclarations.h:68