ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkVTKImageExport.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkVTKImageExport_h
00019 #define __itkVTKImageExport_h
00020 
00021 #include "itkVTKImageExportBase.h"
00022 #include "itkConceptChecking.h"
00023 
00024 namespace itk
00025 {
00053 template< class TInputImage >
00054 class ITK_EXPORT VTKImageExport:public VTKImageExportBase
00055 {
00056 public:
00058   typedef VTKImageExport             Self;
00059   typedef VTKImageExportBase         Superclass;
00060   typedef SmartPointer< Self >       Pointer;
00061   typedef SmartPointer< const Self > ConstPointer;
00062   itkStaticConstMacro(InputImageDimension, unsigned int,
00063                       TInputImage::ImageDimension);
00064 
00066   itkTypeMacro(VTKImageExport, VTKImageExportBase);
00067 
00069   itkNewMacro(Self);
00070 
00072   typedef TInputImage InputImageType;
00073 
00074 #ifdef ITK_USE_CONCEPT_CHECKING
00075   itkConceptMacro( ImageDimensionCheck,
00076                    ( Concept::SameDimensionOrMinusOneOrTwo<
00077                      3,itkGetStaticConstMacro(InputImageDimension) > ) );
00078 #endif
00079 
00080   using Superclass::SetInput;
00081   void SetInput(const InputImageType *);
00082   InputImageType * GetInput(void);
00084 
00085 protected:
00086   VTKImageExport();
00087   ~VTKImageExport() {}
00088   void PrintSelf(std::ostream & os, Indent indent) const;
00089 
00090   typedef typename InputImageType::Pointer    InputImagePointer;
00091   typedef typename InputImageType::RegionType InputRegionType;
00092   typedef typename InputRegionType::SizeType  InputSizeType;
00093   typedef typename InputRegionType::IndexType InputIndexType;
00094 
00095   int * WholeExtentCallback();
00096 
00097   double * SpacingCallback();
00098 
00099   double * OriginCallback();
00100 
00101   float * FloatSpacingCallback();
00102 
00103   float * FloatOriginCallback();
00104 
00105   const char * ScalarTypeCallback();
00106 
00107   int NumberOfComponentsCallback();
00108 
00109   void PropagateUpdateExtentCallback(int *);
00110 
00111   int * DataExtentCallback();
00112 
00113   void * BufferPointerCallback();
00114 
00115 private:
00116   VTKImageExport(const Self &); //purposely not implemented
00117   void operator=(const Self &); //purposely not implemented
00118 
00119   std::string m_ScalarTypeName;
00120   int         m_WholeExtent[6];
00121   int         m_DataExtent[6];
00122   double      m_DataSpacing[3];
00123   double      m_DataOrigin[3];
00124   float       m_FloatDataSpacing[3];
00125   float       m_FloatDataOrigin[3];
00126 };
00127 } // end namespace itk
00128 
00129 #ifndef ITK_MANUAL_INSTANTIATION
00130 #include "itkVTKImageExport.hxx"
00131 #endif
00132 
00133 #endif
00134