ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkVTKImageExport.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 __itkVTKImageExport_h
19 #define __itkVTKImageExport_h
20 
21 #include "itkVTKImageExportBase.h"
22 #include "itkConceptChecking.h"
23 
24 namespace itk
25 {
53 template< class TInputImage >
54 class ITK_EXPORT VTKImageExport:public VTKImageExportBase
55 {
56 public:
62  itkStaticConstMacro(InputImageDimension, unsigned int,
63  TInputImage::ImageDimension);
64 
66  itkTypeMacro(VTKImageExport, VTKImageExportBase);
67 
69  itkNewMacro(Self);
70 
72  typedef TInputImage InputImageType;
73 
74 #ifdef ITK_USE_CONCEPT_CHECKING
75  itkConceptMacro( ImageDimensionCheck,
77  3,itkGetStaticConstMacro(InputImageDimension) > ) );
78 #endif
79 
80  using Superclass::SetInput;
81  void SetInput(const InputImageType *);
82  InputImageType * GetInput(void);
84 
85 protected:
88  void PrintSelf(std::ostream & os, Indent indent) const;
89 
90  typedef typename InputImageType::Pointer InputImagePointer;
91  typedef typename InputImageType::RegionType InputRegionType;
92  typedef typename InputRegionType::SizeType InputSizeType;
93  typedef typename InputRegionType::IndexType InputIndexType;
94 
95  int * WholeExtentCallback();
96 
97  double * SpacingCallback();
98 
99  double * OriginCallback();
100 
101  float * FloatSpacingCallback();
102 
103  float * FloatOriginCallback();
104 
105  const char * ScalarTypeCallback();
106 
107  int NumberOfComponentsCallback();
108 
109  void PropagateUpdateExtentCallback(int *);
110 
111  int * DataExtentCallback();
112 
113  void * BufferPointerCallback();
114 
115 private:
116  VTKImageExport(const Self &); //purposely not implemented
117  void operator=(const Self &); //purposely not implemented
118 
119  std::string m_ScalarTypeName;
120  int m_WholeExtent[6];
121  int m_DataExtent[6];
122  double m_DataSpacing[3];
123  double m_DataOrigin[3];
124  float m_FloatDataSpacing[3];
125  float m_FloatDataOrigin[3];
126 };
127 } // end namespace itk
128 
129 #ifndef ITK_MANUAL_INSTANTIATION
130 #include "itkVTKImageExport.hxx"
131 #endif
132 
133 #endif
134