ITK  5.2.0
Insight Toolkit
itkVTKImageToImageFilter.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 
19 #ifndef itkVTKImageToImageFilter_h
20 #define itkVTKImageToImageFilter_h
21 
22 #include "itkVTKImageImport.h"
23 #include "vtkImageExport.h"
24 #include "vtkImageData.h"
25 #include "vtkSmartPointer.h"
26 
27 #ifndef vtkFloatingPointType
28 # define vtkFloatingPointType float
29 #endif
30 
31 namespace itk
32 {
33 
50 template <typename TOutputImage>
51 class ITK_TEMPLATE_EXPORT VTKImageToImageFilter : public VTKImageImport<TOutputImage>
52 {
53 public:
54  ITK_DISALLOW_COPY_AND_MOVE(VTKImageToImageFilter);
55 
61 
63  itkNewMacro(Self);
64 
67 
69  using OutputImageType = TOutputImage;
70  using OutputImagePointer = typename OutputImageType::ConstPointer;
71 
73  void
74  SetInput(vtkImageData *);
75  using Superclass::SetInput;
76 
80  vtkImageExport *
81  GetExporter() const;
82 
87  const Superclass *
88  GetImporter() const;
89 
90 protected:
92  ~VTKImageToImageFilter() override;
93 
94 private:
95  using ImageExportPointer = vtkSmartPointer<vtkImageExport>;
97 };
98 
99 } // end namespace itk
100 
101 #ifndef ITK_MANUAL_INSTANTIATION
102 # include "itkVTKImageToImageFilter.hxx"
103 #endif
104 
105 #endif
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itkVTKImageImport.h
itk::VTKImageToImageFilter::m_Exporter
ImageExportPointer m_Exporter
Definition: itkVTKImageToImageFilter.h:96
itk::SmartPointer< Self >
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::VTKImageImport
Connect the end of an VTK pipeline to an ITK image pipeline.
Definition: itkVTKImageImport.h:57
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::VTKImageToImageFilter
Converts a VTK image into an ITK image and plugs a VTK data pipeline to an ITK datapipeline.
Definition: itkVTKImageToImageFilter.h:51
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::VTKImageToImageFilter::ImageExportPointer
vtkSmartPointer< vtkImageExport > ImageExportPointer
Definition: itkVTKImageToImageFilter.h:95