ITK  6.0.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  * https://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_MOVE(ImageToVTKImageFilter);
51 
57 
59  itkNewMacro(Self);
60 
62  itkOverrideGetNameOfClassMacro(ImageToVTKImageFilter);
63 
65  using InputImageType = TInputImage;
67 
70 
75  vtkImageData *
76  GetOutput() const;
77 
79  using Superclass::SetInput;
80  void
81  SetInput(const InputImageType *);
83  GetInput();
90  vtkImageImport *
91  GetImporter() const;
92 
98  GetExporter() const;
99 
101  void
102  Update() override;
103 
105  void
106  UpdateLargestPossibleRegion() override;
107 
108 protected:
110  ~ImageToVTKImageFilter() override;
111 
112 private:
113  ExporterFilterPointer m_Exporter{};
114  vtkImageImport * m_Importer{};
115 };
116 
117 } // end namespace itk
118 
119 #ifndef ITK_MANUAL_INSTANTIATION
120 # include "itkImageToVTKImageFilter.hxx"
121 #endif
122 
123 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
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:55
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 data pipeline.
Definition: itkImageToVTKImageFilter.h:47
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::ProcessObject
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:41
itk::ImageToVTKImageFilter::InputImagePointer
typename InputImageType::ConstPointer InputImagePointer
Definition: itkImageToVTKImageFilter.h:66