GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
itkImageToVTKImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  Author: $Author:$ // Author of last commit
3  Version: $Rev:$ // Revision of last commit
4  Date: $Date:$ // Date of last commit
5 =========================================================================*/
6 
7 /*=========================================================================
8  Authors: The GoFigure Dev. Team.
9  at Megason Lab, Systems biology, Harvard Medical school, 2009-10
10 
11  Copyright (c) 2009-10, President and Fellows of Harvard College.
12  All rights reserved.
13 
14  Redistribution and use in source and binary forms, with or without
15  modification, are permitted provided that the following conditions are met:
16 
17  Redistributions of source code must retain the above copyright notice,
18  this list of conditions and the following disclaimer.
19  Redistributions in binary form must reproduce the above copyright notice,
20  this list of conditions and the following disclaimer in the documentation
21  and/or other materials provided with the distribution.
22  Neither the name of the President and Fellows of Harvard College
23  nor the names of its contributors may be used to endorse or promote
24  products derived from this software without specific prior written
25  permission.
26 
27  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
29  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
31  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
32  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
33  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
34  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
35  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
36  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
37  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38 
39 =========================================================================*/
40 
41 /*=========================================================================
42 
43  Program: Insight Segmentation & Registration Toolkit
44  Module: $RCSfile: itkImageToVTKImageFilter.h,v $
45  Language: C++
46  Date: $Date: 2007-11-20 12:46:10 -0500 (Tue, 20 Nov 2007) $
47  Version: $Revision: 477 $
48 
49  Copyright (c) 2002 Insight Consortium. All rights reserved.
50  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
51 
52  This software is distributed WITHOUT ANY WARRANTY; without even
53  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
54  PURPOSE. See the above copyright notices for more information.
55 
56 =========================================================================*/
57 
58 #ifndef __itkImageToVTKImageFilter_h
59 #define __itkImageToVTKImageFilter_h
60 
61 #include "itkVTKImageExport.h"
62 #include "vtkImageImport.h"
63 #include "vtkImageData.h"
64 
65 namespace itk
66 {
79 template< class TInputImage >
80 class ITK_EXPORT ImageToVTKImageFilter:public ProcessObject
81 {
82 public:
85  typedef ProcessObject Superclass;
86  typedef SmartPointer< Self > Pointer;
87  typedef SmartPointer< const Self > ConstPointer;
88 
90  itkNewMacro(Self);
91 
93  itkTypeMacro(ImageToVTKImageFilter, ProcessObject);
94 
96  typedef TInputImage InputImageType;
97  typedef typename InputImageType::ConstPointer InputImagePointer;
98  typedef VTKImageExport< InputImageType > ExporterFilterType;
99  typedef typename ExporterFilterType::Pointer ExporterFilterPointer;
100 
103  vtkImageData * GetOutput() const;
104 
106  void SetInput(const InputImageType *);
107 
111  vtkImageImport * GetImporter() const;
112 
116  ExporterFilterType * GetExporter() const;
117 
119  void Update();
120 
121 protected:
123  virtual ~ImageToVTKImageFilter();
124 private:
125  ImageToVTKImageFilter(const Self &); //purposely not implemented
126  void operator=(const Self &); //purposely not implemented
127 
129  vtkImageImport * m_Importer;
130 };
131 } // end namespace itk
132 
133 #ifndef ITK_MANUAL_INSTANTIATION
134 #include "itkImageToVTKImageFilter.txx"
135 #endif
136 
137 #endif
SmartPointer< const Self > ConstPointer
InputImageType::ConstPointer InputImagePointer
ExporterFilterType::Pointer ExporterFilterPointer
VTKImageExport< InputImageType > ExporterFilterType
Converts an ITK image into a VTK image and plugs a itk data pipeline to a VTK datapipeline.