Computer Assited Medical Intervention Tool Kit  version 3.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
itkVTKImageToImageFilter.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 #ifndef __itkVTKImageToImageFilter_h
26 #define __itkVTKImageToImageFilter_h
27 
28 // -- itk stuff
29 #include "itkVTKImageImport.h"
30 
31 // -- vtk stuff
32 #include "vtkImageExport.h"
33 #include "vtkImageData.h"
34 #include "vtkSmartPointer.h"
35 
36 #ifndef vtkFloatingPointType
37 #define vtkFloatingPointType float
38 #endif
39 
40 namespace itk
41 {
42 
58 template <class TOutputImage >
59 class ITK_EXPORT VTKImageToImageFilter : public ProcessObject
60 {
61 public:
64  typedef ProcessObject Superclass;
65  typedef SmartPointer<Self> Pointer;
66  typedef SmartPointer<const Self> ConstPointer;
67 
69  itkNewMacro(Self);
70 
72  itkTypeMacro(VTKImageToImageFilter, ProcessObject);
73 
75  typedef TOutputImage OutputImageType;
76  typedef typename OutputImageType::ConstPointer OutputImagePointer;
77  typedef VTKImageImport< OutputImageType > ImporterFilterType;
78  typedef typename ImporterFilterType::Pointer ImporterFilterPointer;
79 
82  const OutputImageType * GetOutput() const;
83 
85  void SetInput( vtkSmartPointer<vtkImageData> );
86 
90  vtkSmartPointer<vtkImageExport> GetExporter() const;
91 
95  ImporterFilterType * GetImporter() const;
96 
98  void Update();
99 
100 protected:
102  virtual ~VTKImageToImageFilter();
103 
104 private:
105  VTKImageToImageFilter(const Self&); //purposely not implemented
106  void operator=(const Self&); //purposely not implemented
107 
108  ImporterFilterPointer m_Importer;
109  vtkSmartPointer<vtkImageExport> m_Exporter;
110 
111 };
112 
113 } // end namespace itk
114 
115 #ifndef ITK_MANUAL_INSTANTIATION
116 #include "itkVTKImageToImageFilter.txx"
117 #endif
118 
119 #endif
120 
121 
122 
vtkSmartPointer< vtkImageExport > m_Exporter
Definition: itkVTKImageToImageFilter.h:109
SmartPointer< const Self > ConstPointer
Definition: itkVTKImageToImageFilter.h:66
ImporterFilterType::Pointer ImporterFilterPointer
Definition: itkVTKImageToImageFilter.h:78
Definition: itkImageToVTKImageFilter.h:39
VTKImageImport< OutputImageType > ImporterFilterType
Definition: itkVTKImageToImageFilter.h:77
ImporterFilterPointer m_Importer
Definition: itkVTKImageToImageFilter.h:108
Converts a VTK image into an ITK image and plugs a vtk data pipeline to an ITK datapipeline.
Definition: itkVTKImageToImageFilter.h:59
ProcessObject Superclass
Definition: itkVTKImageToImageFilter.h:64
OutputImageType::ConstPointer OutputImagePointer
Definition: itkVTKImageToImageFilter.h:76
TOutputImage OutputImageType
Some typedefs.
Definition: itkVTKImageToImageFilter.h:75
VTKImageToImageFilter Self
Standard class typedefs.
Definition: itkVTKImageToImageFilter.h:63
SmartPointer< Self > Pointer
Definition: itkVTKImageToImageFilter.h:65