Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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-2014 UJF-Grenoble 1, 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 vtkImageData;
39 class vtkWindowLevelLookupTable;
40 
41 
42 namespace camitk
43 {
44 // -- Core stuff Classes
45 class Component;
46 
64 
65  public:
66 
95  };
96 
98  virtual ~InterfaceBitMap() {};
99 
101  virtual vtkSmartPointer<vtkImageData> getImageData() const = 0;
102 
104  virtual void setOriginalVolume(vtkSmartPointer<vtkImageData>) = 0;
105 
107  virtual vtkSmartPointer<vtkImageActor> get2DImageActor() const = 0;
108 
110  virtual vtkSmartPointer<vtkImageActor> get3DImageActor() const = 0;
111 
112 
113 // /** Return the vtkActor used to pick pixels in the slices. */
114  virtual vtkSmartPointer<vtkActor> getPickPlaneActor() const = 0;
115 
117  virtual vtkSmartPointer<vtkActor> getPixelActor() = 0;
118 
122  virtual void pixelPicked(double, double, double) = 0;
123 
124  virtual void updatePickPlane() = 0;
125 
127  virtual int getNumberOfSlices() const = 0;
128 
130  virtual int getSlice() const = 0;
131 
136  virtual void setSlice(int s) = 0;
137 
139  virtual void setSlice(double x, double y, double z) = 0;
140 
142  virtual double getRotationX() const = 0;
143  virtual double getRotationY() const = 0;
144  virtual double getRotationZ() const = 0;
145 
147  virtual void setRotationX(double angle) = 0;
148  virtual void setRotationY(double angle) = 0;
149  virtual void setRotationZ(double angle) = 0;
150 
151 
155  virtual int getNumberOfColors() const = 0;
156 
158  virtual void setPixelRealPosition(double, double, double) = 0;
159 
160  // TODO : put all of this into a dedicated interface
162  QMap<QString, vtkSmartPointer<vtkProp> > extraProp;
163 
165  virtual vtkSmartPointer<vtkProp> getProp(const QString &) = 0;
166 
168  virtual unsigned int getNumberOfProp() const = 0;
169 
171  virtual vtkSmartPointer<vtkProp> getProp(unsigned int) = 0;
172 
176  virtual bool addProp(const QString &, vtkSmartPointer<vtkProp>) = 0;
177 
181  virtual bool removeProp(const QString &) = 0;
182  // END TODO
183 
184 };
185 
186 }
187 
188 #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 ~InterfaceBitMap()
virtual destructor
Definition: InterfaceBitMap.h:98
PossibleOrientation
Common slices orientation: axial, sagittal, coronal or anything else.
Definition: InterfaceBitMap.h:90
virtual bool addProp(const QString &, vtkSmartPointer< vtkProp >)=0
insert an additional prop, defining it by its name (default visibility = false)
Definition: InterfaceBitMap.h:93
QMap< QString, vtkSmartPointer< vtkProp > > extraProp
The additional map for prop (include at least "label" and "glyph".
Definition: InterfaceBitMap.h:162
virtual vtkSmartPointer< vtkActor > getPickPlaneActor() const =0
Return the vtkActor used to pick pixels in the slices.
Definition: InterfaceBitMap.h:92
Definition: Action.h:40
virtual void setPixelRealPosition(double, double, double)=0
move the pixel selection green indicator (pixelActor) to the given real position
virtual double getRotationZ() const =0
Definition: InterfaceBitMap.h:94
virtual double getRotationY() const =0
virtual double getRotationX() const =0
Return the current angle applied to the arbitrary slice.
virtual void updatePickPlane()=0
virtual void setRotationZ(double angle)=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.
virtual void pixelPicked(double, double, double)=0
This method is called when the associated plane has been picked in the InteractiveViewer, the given coordinates is position where the plane was picked.
virtual bool removeProp(const QString &)=0
remove a given additional prop.
virtual void setRotationY(double angle)=0
virtual vtkSmartPointer< vtkImageData > getImageData() const =0
Return the displayed images 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 void setRotationX(double angle)=0
Set the current angle to the arbitrary slice.
Definition: InterfaceBitMap.h:91
virtual vtkSmartPointer< vtkImageActor > get3DImageActor() const =0
Return the vtkImageActor (vtkProp) representing a slice to be displayed in 2D.
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.