Computer Assited Medical Intervention Tool Kit  version 4.1
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-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 #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 
57 template <class TOutputImage >
58 class ITK_EXPORT VTKImageToImageFilter : public ProcessObject {
59 public:
62  typedef ProcessObject Superclass;
63  typedef SmartPointer<Self> Pointer;
64  typedef SmartPointer<const Self> ConstPointer;
65 
67  itkNewMacro(Self);
68 
70  itkTypeMacro(VTKImageToImageFilter, ProcessObject);
71 
73  typedef TOutputImage OutputImageType;
74  typedef typename OutputImageType::ConstPointer OutputImagePointer;
75  typedef VTKImageImport< OutputImageType > ImporterFilterType;
76  typedef typename ImporterFilterType::Pointer ImporterFilterPointer;
77 
80  const OutputImageType* GetOutput() const;
81 
83  void SetInput(vtkSmartPointer<vtkImageData>);
84 
88  vtkSmartPointer<vtkImageExport> GetExporter() const;
89 
93  ImporterFilterType* GetImporter() const;
94 
96  void Update();
97 
98 protected:
100  virtual ~VTKImageToImageFilter();
101 
102 private:
103  VTKImageToImageFilter(const Self&); //purposely not implemented
104  void operator=(const Self&); //purposely not implemented
105 
106  ImporterFilterPointer m_Importer;
107  vtkSmartPointer<vtkImageExport> m_Exporter;
108 
109 };
110 
111 } // end namespace itk
112 
113 #ifndef ITK_MANUAL_INSTANTIATION
114 #include "itkVTKImageToImageFilter.txx"
115 #endif
116 
117 #endif
118 
119 
120 
vtkSmartPointer< vtkImageExport > m_Exporter
Definition: itkVTKImageToImageFilter.h:107
SmartPointer< const Self > ConstPointer
Definition: itkVTKImageToImageFilter.h:64
ImporterFilterType::Pointer ImporterFilterPointer
Definition: itkVTKImageToImageFilter.h:76
Definition: itkImageToVTKImageFilter.h:39
VTKImageImport< OutputImageType > ImporterFilterType
Definition: itkVTKImageToImageFilter.h:75
ImporterFilterPointer m_Importer
Definition: itkVTKImageToImageFilter.h:106
Converts a VTK image into an ITK image and plugs a vtk data pipeline to an ITK datapipeline.
Definition: itkVTKImageToImageFilter.h:58
ProcessObject Superclass
Definition: itkVTKImageToImageFilter.h:62
OutputImageType::ConstPointer OutputImagePointer
Definition: itkVTKImageToImageFilter.h:74
TOutputImage OutputImageType
Some typedefs.
Definition: itkVTKImageToImageFilter.h:73
VTKImageToImageFilter Self
Standard class typedefs.
Definition: itkVTKImageToImageFilter.h:61
SmartPointer< Self > Pointer
Definition: itkVTKImageToImageFilter.h:63