ITK  5.1.0
Insight Toolkit
itkImageToVTKImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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 
46 template <typename TInputImage>
47 class ITK_TEMPLATE_EXPORT ImageToVTKImageFilter : public ProcessObject
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_ASSIGN(ImageToVTKImageFilter);
51 
57 
59  itkNewMacro(Self);
60 
62  itkTypeMacro(ImageToVTKImageFilter, ProcessObject);
63 
65  using InputImageType = TInputImage;
66  using InputImagePointer = typename InputImageType::ConstPointer;
67 
70 
73  vtkImageData *
74  GetOutput() const;
75 
77  using Superclass::SetInput;
78  void
79  SetInput(const InputImageType *);
81  GetInput();
83 
87  vtkImageImport *
88  GetImporter() const;
89 
94  GetExporter() const;
95 
97  void
98  Update() override;
99 
101  void
102  UpdateLargestPossibleRegion() override;
103 
104 protected:
106  ~ImageToVTKImageFilter() override;
107 
108 private:
110  vtkImageImport * m_Importer;
111 };
112 
113 } // end namespace itk
114 
115 #ifndef ITK_MANUAL_INSTANTIATION
116 # include "itkImageToVTKImageFilter.hxx"
117 #endif
118 
119 #endif
itk::ImageToVTKImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToVTKImageFilter.h:65
itkVTKImageExport.h
itk::ImageToVTKImageFilter::ExporterFilterPointer
typename ExporterFilterType::Pointer ExporterFilterPointer
Definition: itkImageToVTKImageFilter.h:69
itk::SmartPointer< Self >
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::VTKImageExport
Connect the end of an ITK image pipeline to a VTK pipeline.
Definition: itkVTKImageExport.h:55
itk::ImageToVTKImageFilter
Converts an ITK image into a VTK image and plugs a itk data pipeline to a VTK datapipeline.
Definition: itkImageToVTKImageFilter.h:47
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:135
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::ImageToVTKImageFilter::InputImagePointer
typename InputImageType::ConstPointer InputImagePointer
Definition: itkImageToVTKImageFilter.h:66
itk::ImageToVTKImageFilter::m_Exporter
ExporterFilterPointer m_Exporter
Definition: itkImageToVTKImageFilter.h:109
itk::ImageToVTKImageFilter::m_Importer
vtkImageImport * m_Importer
Definition: itkImageToVTKImageFilter.h:110