GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
itkVTKImageToImageFilter.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: itkVTKImageToImageFilter.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 #ifndef __itkVTKImageToImageFilter_h
58 #define __itkVTKImageToImageFilter_h
59 
60 #include "itkVTKImageImport.h"
61 #include "vtkImageExport.h"
62 #include "vtkImageData.h"
63 
64 #ifndef vtkFloatingPointType
65 #define vtkFloatingPointType float
66 #endif
67 
68 namespace itk
69 {
82 template< class TOutputImage >
83 class ITK_EXPORT VTKImageToImageFilter:public ProcessObject
84 {
85 public:
88  typedef ProcessObject Superclass;
89  typedef SmartPointer< Self > Pointer;
90  typedef SmartPointer< const Self > ConstPointer;
91 
93  itkNewMacro(Self);
94 
96  itkTypeMacro(VTKImageToImageFilter, ProcessObject);
97 
99  typedef TOutputImage OutputImageType;
100  typedef typename OutputImageType::ConstPointer OutputImagePointer;
101  typedef VTKImageImport< OutputImageType > ImporterFilterType;
102  typedef typename ImporterFilterType::Pointer ImporterFilterPointer;
103 
106  OutputImageType * GetOutput() const;
107 
109  void SetInput(vtkImageData *);
110 
114  vtkImageExport * GetExporter() const;
115 
119  ImporterFilterType * GetImporter() const;
120 
122  void Update();
123 
124 protected:
126  virtual ~VTKImageToImageFilter();
127 private:
128  VTKImageToImageFilter(const Self &); //purposely not implemented
129  void operator=(const Self &); //purposely not implemented
130 
132  vtkImageExport * m_Exporter;
133 };
134 } // end namespace itk
135 
136 #ifndef ITK_MANUAL_INSTANTIATION
137 #include "itkVTKImageToImageFilter.txx"
138 #endif
139 
140 #endif
ImporterFilterType::Pointer ImporterFilterPointer
VTKImageImport< OutputImageType > ImporterFilterType
Converts a VTK image into an ITK image and plugs a vtk data pipeline to an ITK datapipeline.
OutputImageType::ConstPointer OutputImagePointer
SmartPointer< const Self > ConstPointer