Computer Assited Medical Intervention Tool Kit  version 4.1
InterfaceBitMap.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2018 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef INTERFACEBITMAP_H
27 #define INTERFACEBITMAP_H
28 
29 // -- vtk stuff
30 #include <vtkSmartPointer.h>
31 #include <vtkProp.h>
32 #include <QMap>
33 #include <QString>
34 
35 // -- vtk stuff Classes
36 class vtkImageActor;
37 class vtkActor;
38 class vtkAxesActor;
39 class vtkImageData;
40 class vtkWindowLevelLookupTable;
41 class vtkTransform;
42 
43 namespace camitk {
44 // -- Core stuff Classes
45 class Component;
46 
64 
65 public:
66 
68  virtual ~InterfaceBitMap() = default;
69 
71  virtual void setOriginalVolume(vtkSmartPointer<vtkImageData>) = 0;
72 
74  virtual void setImageWorldTransform(vtkSmartPointer<vtkTransform>) = 0;
75 
77  virtual vtkSmartPointer<vtkImageActor> get2DImageActor() const = 0;
78 
80  virtual vtkSmartPointer<vtkImageActor> get3DImageActor() const = 0;
81 
83  virtual vtkSmartPointer<vtkActor> getPickPlaneActor() const = 0;
84 
86  virtual vtkSmartPointer<vtkActor> getPixelActor() = 0;
87 
89 // virtual vtkSmartPointer<vtkAxesActor> get2DAxesActor() = 0;
90 
91 
95  virtual void pixelPicked(double, double, double) = 0;
96 
97  virtual void updatePickPlane() = 0;
98 
100  virtual int getNumberOfSlices() const = 0;
101 
103  virtual int getSlice() const = 0;
104 
109  virtual void setSlice(int s) = 0;
110 
112  virtual void setSlice(double x, double y, double z) = 0;
113 
117  virtual int getNumberOfColors() const = 0;
118 
120  virtual void setPixelRealPosition(double, double, double) = 0;
121 
123  virtual vtkSmartPointer<vtkImageData> getImageData() const = 0;
124 
125  // TODO : put all of this into a dedicated interface
127  QMap<QString, vtkSmartPointer<vtkProp> > extraProp;
128 
130  virtual vtkSmartPointer<vtkProp> getProp(const QString&) = 0;
131 
133  virtual unsigned int getNumberOfProp() const = 0;
134 
136  virtual vtkSmartPointer<vtkProp> getProp(unsigned int) = 0;
137 
141  virtual bool addProp(const QString&, vtkSmartPointer<vtkProp>) = 0;
142 
146  virtual bool removeProp(const QString&) = 0;
147  // END TODO
148 
149 };
150 
151 }
152 
153 #endif
virtual int getNumberOfSlices() const =0
Return the number of slices in the image data set.
virtual vtkSmartPointer< vtkProp > getProp(const QString &)=0
Return the vtkProp (actors, volumes and annotations) corresponding to the given name.
This class describes what are the methods to implement for a BitMap.
Definition: InterfaceBitMap.h:63
virtual bool addProp(const QString &, vtkSmartPointer< vtkProp >)=0
insert an additional prop, defining it by its name (default visibility = false)
QMap< QString, vtkSmartPointer< vtkProp > > extraProp
The additional map for prop (include at least "label" and "glyph".
Definition: InterfaceBitMap.h:127
virtual vtkSmartPointer< vtkActor > getPickPlaneActor() const =0
Return the vtkActor used to pick pixels in the slices.
Definition: Action.cpp:36
virtual void setPixelRealPosition(double, double, double)=0
move the pixel selection green indicator (pixelActor) to the given real position
virtual void updatePickPlane()=0
virtual void setSlice(int s)=0
Set the current slice index.
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
virtual vtkSmartPointer< vtkImageActor > get2DImageActor() const =0
Return the vtkImageActor (vtkProp) representing a slice to be displayed in 2D viewers.
virtual void pixelPicked(double, double, double)=0
Return 2D Axes at the proper slice origin.
virtual ~InterfaceBitMap()=default
virtual destructor
virtual bool removeProp(const QString &)=0
remove a given additional prop.
virtual void setImageWorldTransform(vtkSmartPointer< vtkTransform >)=0
set the transformation for 3D image representation
virtual vtkSmartPointer< vtkImageData > getImageData() const =0
Returns the encapsultaed data structure: the image as a vtkImageData.
virtual vtkSmartPointer< vtkActor > getPixelActor()=0
Return the vtkActor used to pick pixels in the slices.
virtual void setOriginalVolume(vtkSmartPointer< vtkImageData >)=0
set the original volume image data (the source vtkImageData before any reslice) and refresh the vtk p...
virtual unsigned int getNumberOfProp() const =0
return the number of additional prop
virtual vtkSmartPointer< vtkImageActor > get3DImageActor() const =0
Return the vtkImageActor (vtkProp) representing a slice to be displayed in 3D viewers.
virtual int getNumberOfColors() const =0
Return the number of colors in the images.
virtual int getSlice() const =0
Return the index of the current displayed slice.