Computer Assited Medical Intervention Tool Kit  version 3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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-2013 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 
55 template <class TOutputImage >
56 class ITK_EXPORT VTKImageToImageFilter : public ProcessObject
57 {
58 public:
61  typedef ProcessObject Superclass;
62  typedef SmartPointer<Self> Pointer;
63  typedef SmartPointer<const Self> ConstPointer;
64 
66  itkNewMacro(Self);
67 
69  itkTypeMacro(VTKImageToImageFilter, ProcessObject);
70 
72  typedef TOutputImage OutputImageType;
73  typedef typename OutputImageType::ConstPointer OutputImagePointer;
74  typedef VTKImageImport< OutputImageType > ImporterFilterType;
75  typedef typename ImporterFilterType::Pointer ImporterFilterPointer;
76 
79  const OutputImageType * GetOutput() const;
80 
82  void SetInput( vtkSmartPointer<vtkImageData> );
83 
87  vtkSmartPointer<vtkImageExport> GetExporter() const;
88 
92  ImporterFilterType * GetImporter() const;
93 
95  void Update();
96 
97 protected:
99  virtual ~VTKImageToImageFilter();
100 
101 private:
102  VTKImageToImageFilter(const Self&); //purposely not implemented
103  void operator=(const Self&); //purposely not implemented
104 
106  vtkSmartPointer<vtkImageExport> m_Exporter;
107 
108 };
109 
110 } // end namespace itk
111 
112 #ifndef ITK_MANUAL_INSTANTIATION
113 #include "itkVTKImageToImageFilter.txx"
114 #endif
115 
116 #endif
117 
118 
119 
vtkSmartPointer< vtkImageExport > m_Exporter
Definition: itkVTKImageToImageFilter.h:106
SmartPointer< const Self > ConstPointer
Definition: itkVTKImageToImageFilter.h:63
ImporterFilterType::Pointer ImporterFilterPointer
Definition: itkVTKImageToImageFilter.h:75
VTKImageImport< OutputImageType > ImporterFilterType
Definition: itkVTKImageToImageFilter.h:74
ImporterFilterPointer m_Importer
Definition: itkVTKImageToImageFilter.h:105
Converts a VTK image into an ITK image and plugs a vtk data pipeline to an ITK datapipeline.
Definition: itkVTKImageToImageFilter.h:56
ProcessObject Superclass
Definition: itkVTKImageToImageFilter.h:61
OutputImageType::ConstPointer OutputImagePointer
Definition: itkVTKImageToImageFilter.h:73
TOutputImage OutputImageType
Some typedefs.
Definition: itkVTKImageToImageFilter.h:72
VTKImageToImageFilter Self
Standard class typedefs.
Definition: itkVTKImageToImageFilter.h:60
SmartPointer< Self > Pointer
Definition: itkVTKImageToImageFilter.h:62