ITK  5.0.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:
49  ITK_DISALLOW_COPY_AND_ASSIGN(ImageToVTKImageFilter);
50 
56 
58  itkNewMacro(Self);
59 
61  itkTypeMacro(ImageToVTKImageFilter, ProcessObject);
62 
64  using InputImageType = TInputImage;
65  using InputImagePointer = typename InputImageType::ConstPointer;
66 
69 
72  vtkImageData * GetOutput() const;
73 
75  using Superclass::SetInput;
76  void SetInput( const InputImageType * );
77  InputImageType * GetInput();
79 
83  vtkImageImport * GetImporter() const;
84 
88  ExporterFilterType * GetExporter() const;
89 
91  void Update() override;
92 
94  void UpdateLargestPossibleRegion() override;
95 
96 protected:
98  ~ImageToVTKImageFilter() override;
99 
100 private:
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.
typename InputImageType::ConstPointer InputImagePointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
class ITK_FORWARD_EXPORT ProcessObject
Definition: itkDataObject.h:40
Converts an ITK image into a VTK image and plugs a itk data pipeline to a VTK datapipeline.
typename ExporterFilterType::Pointer ExporterFilterPointer