creaImageIO_lib
itkImageToVTKImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkImageToVTKImageFilter.h,v $
5  Language: C++
6  Date: $Date: 2012/11/15 12:45:28 $
7  Version: $Revision: 1.2 $
8 
9  Copyright (c) 2002 Insight Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkImageToVTKImageFilter_h
18 #define __itkImageToVTKImageFilter_h
19 
20 #include "itkVTKImageExport.h"
21 #include "vtkImageImport.h"
22 #include "vtkImageData.h"
23 #include <vector>
24 
25 namespace itk
26 {
27 
40 template <class TInputImage >
41 class ITK_EXPORT ImageToVTKImageFilter : public ProcessObject
42 {
43 public:
46  typedef ProcessObject Superclass;
47  typedef SmartPointer<Self> Pointer;
48  typedef SmartPointer<const Self> ConstPointer;
49 
51  itkNewMacro(Self);
52 
54  itkTypeMacro(ImageToVTKImageFilter, ProcessObject);
55 
57  typedef TInputImage InputImageType;
58  typedef typename InputImageType::ConstPointer InputImagePointer;
59  typedef VTKImageExport< InputImageType> ExporterFilterType;
60  typedef typename ExporterFilterType::Pointer ExporterFilterPointer;
61 
64  vtkImageData * GetOutput() const;
65 
67  void SetInput( const InputImageType * );
68 
72  vtkImageImport * GetImporter() const;
73 
77  ExporterFilterType * GetExporter() const;
78 
80  void Update();
81 
82 
83 
84 
85 protected:
87  virtual ~ImageToVTKImageFilter();
88 
89 private:
90  ImageToVTKImageFilter(const Self&); //purposely not implemented
91  void operator=(const Self&); //purposely not implemented
92 
94  vtkImageImport * m_Importer;
95  std::vector<double> m_vtest;
96 };
97 
98 } // end namespace itk
99 
100 #ifndef ITK_MANUAL_INSTANTIATION
102 #endif
103 
104 #endif
105 
106 
107