ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkImageToVTKImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkImageToVTKImageFilter_h
19 #define itkImageToVTKImageFilter_h
20 
21 #include "itkVTKImageExport.h"
22 #include "vtkImageImport.h"
23 #include "vtkImageData.h"
24 
25 namespace itk
26 {
27 
45 template <typename TInputImage >
46 class ITK_TEMPLATE_EXPORT ImageToVTKImageFilter : public ProcessObject
47 {
48 public:
54 
56  itkNewMacro(Self);
57 
60 
62  typedef TInputImage InputImageType;
63  typedef typename InputImageType::ConstPointer InputImagePointer;
64 
67 
70  vtkImageData * GetOutput() const;
71 
73  using Superclass::SetInput;
74  void SetInput( const InputImageType * );
75  InputImageType * GetInput();
77 
81  vtkImageImport * GetImporter() const;
82 
86  ExporterFilterType * GetExporter() const;
87 
89  virtual void Update() ITK_OVERRIDE;
90 
92  virtual void UpdateLargestPossibleRegion() ITK_OVERRIDE;
93 
94 protected:
96  virtual ~ImageToVTKImageFilter();
97 
98 private:
99  ITK_DISALLOW_COPY_AND_ASSIGN(ImageToVTKImageFilter);
100 
101  ExporterFilterPointer m_Exporter;
102  vtkImageImport * m_Importer;
103 };
104 
105 } // end namespace itk
106 
107 #ifndef ITK_MANUAL_INSTANTIATION
108 #include "itkImageToVTKImageFilter.hxx"
109 #endif
110 
111 #endif
Connect the end of an ITK image pipeline to a VTK pipeline.
Light weight base class for most itk classes.
VTKImageExport< InputImageType > ExporterFilterType
InputImageType::ConstPointer InputImagePointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
SmartPointer< const Self > ConstPointer
ExporterFilterType::Pointer ExporterFilterPointer
Converts an ITK image into a VTK image and plugs a itk data pipeline to a VTK datapipeline.