Computer Assited Medical Intervention Tool Kit  version 5.0
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-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, TIMC, 38000 Grenoble, France
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 
32 // disable warning generated by clang about the surrounded headers
33 #include <CamiTKDisableWarnings>
34 #include <vtkProp.h>
35 #include <CamiTKReEnableWarnings>
36 
37 #include <QMap>
38 #include <QString>
39 
40 // -- vtk stuff Classes
41 class vtkImageActor;
42 class vtkActor;
43 class vtkAxesActor;
44 class vtkImageData;
45 class vtkWindowLevelLookupTable;
46 class vtkTransform;
47 
48 namespace camitk {
49 // -- Core stuff Classes
50 class Component;
51 
69 
70 public:
71 
73  virtual ~InterfaceBitMap() = default;
74 
76  virtual void setOriginalVolume(vtkSmartPointer<vtkImageData>) = 0;
77 
79  virtual void setImageWorldTransform(vtkSmartPointer<vtkTransform>) = 0;
80 
82  virtual vtkSmartPointer<vtkImageActor> get2DImageActor() const = 0;
83 
85  virtual vtkSmartPointer<vtkImageActor> get3DImageActor() const = 0;
86 
88  virtual vtkSmartPointer<vtkActor> getPickPlaneActor() const = 0;
89 
91  virtual vtkSmartPointer<vtkActor> getPixelActor() = 0;
92 
96  virtual void setArbitraryTransform(vtkSmartPointer<vtkTransform>) = 0;
97 
101  virtual void pixelPicked(double, double, double) = 0;
102 
104  virtual void updatePickPlane() = 0;
105 
107  virtual int getNumberOfSlices() const = 0;
108 
110  virtual int getSlice() const = 0;
111 
116  virtual void setSlice(int s) = 0;
117 
119  virtual void setSlice(double x, double y, double z) = 0;
120 
124  virtual int getNumberOfColors() const = 0;
125 
127  virtual void setPixelRealPosition(double, double, double) = 0;
128 
130  virtual vtkSmartPointer<vtkImageData> getImageData() const = 0;
131 
132 
133 
143 
145  virtual vtkSmartPointer<vtkProp> getProp(const QString&) = 0;
146 
148  virtual unsigned int getNumberOfProp() const = 0;
149 
151  virtual vtkSmartPointer<vtkProp> getProp(unsigned int) = 0;
152 
156  virtual bool addProp(const QString&, vtkSmartPointer<vtkProp>) = 0;
157 
161  virtual bool removeProp(const QString&) = 0;
163 
164 };
165 
166 }
167 
168 #endif
camitk::InterfaceBitMap::removeProp
virtual bool removeProp(const QString &)=0
remove a given additional prop.
camitk::InterfaceBitMap::getNumberOfColors
virtual int getNumberOfColors() const =0
Return the number of colors in the images.
camitk::InterfaceBitMap::setImageWorldTransform
virtual void setImageWorldTransform(vtkSmartPointer< vtkTransform >)=0
set the transformation for 3D image representation
camitk::InterfaceBitMap::get2DImageActor
virtual vtkSmartPointer< vtkImageActor > get2DImageActor() const =0
Return the vtkImageActor (vtkProp) representing a slice to be displayed in 2D viewers.
camitk::InterfaceBitMap::setPixelRealPosition
virtual void setPixelRealPosition(double, double, double)=0
move the pixel selection green indicator (pixelActor) to the given real position
camitk::InterfaceBitMap::getNumberOfProp
virtual unsigned int getNumberOfProp() const =0
return the number of additional prop
camitk::InterfaceBitMap::getSlice
virtual int getSlice() const =0
Return the index of the current displayed slice.
camitk::InterfaceBitMap::getNumberOfSlices
virtual int getNumberOfSlices() const =0
Return the number of slices in the image data set.
camitk::InterfaceBitMap::getPixelActor
virtual vtkSmartPointer< vtkActor > getPixelActor()=0
Return the vtkActor used to pick pixels in the slices.
camitk::InterfaceBitMap::pixelPicked
virtual void pixelPicked(double, double, double)=0
This method is called when the associated plane has been picked in the InteractiveViewer,...
camitk::InterfaceBitMap::addProp
virtual bool addProp(const QString &, vtkSmartPointer< vtkProp >)=0
insert an additional prop, defining it by its name (default visibility = false)
camitk::InterfaceBitMap::~InterfaceBitMap
virtual ~InterfaceBitMap()=default
virtual destructor
camitk::InterfaceBitMap::setArbitraryTransform
virtual void setArbitraryTransform(vtkSmartPointer< vtkTransform >)=0
Set the pointer to the image transformation.
camitk::InterfaceBitMap::setOriginalVolume
virtual void setOriginalVolume(vtkSmartPointer< vtkImageData >)=0
set the original volume image data (the source vtkImageData before any reslice) and refresh the vtk p...
camitk::InterfaceBitMap::getImageData
virtual vtkSmartPointer< vtkImageData > getImageData() const =0
Returns the encapsultaed data structure: the image as a vtkImageData.
Component
A component is something that composed something and could also be a part of something.
Definition: modeling/libraries/pml/Component.h:48
camitk::InterfaceBitMap
This class describes what are the methods to implement for a BitMap. An InterfaceBitMap is a kind of ...
Definition: InterfaceBitMap.h:68
camitk::InterfaceBitMap::getPickPlaneActor
virtual vtkSmartPointer< vtkActor > getPickPlaneActor() const =0
Return the vtkActor used to pick pixels in the slices.
camitk::InterfaceBitMap::get3DImageActor
virtual vtkSmartPointer< vtkImageActor > get3DImageActor() const =0
Return the vtkImageActor (vtkProp) representing a slice to be displayed in 3D viewers.
camitk::InterfaceBitMap::getProp
virtual vtkSmartPointer< vtkProp > getProp(const QString &)=0
Return the vtkProp (actors, volumes and annotations) corresponding to the given name.
camitk::InterfaceBitMap::updatePickPlane
virtual void updatePickPlane()=0
update the position of the plane surrounding the currently selected slice
camitk::InterfaceBitMap::setSlice
virtual void setSlice(int s)=0
Set the current slice index.
camitk
Definition: Action.cpp:35