Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkVTKImageExport.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVTKImageExport.h,v $
00005   Language:  C++
00006   Date:      $Date: 2004/01/14 00:22:26 $
00007   Version:   $Revision: 1.13 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkVTKImageExport_h
00018 #define __itkVTKImageExport_h
00019 
00020 #include "itkVTKImageExportBase.h"
00021 
00022 namespace itk
00023 {
00024 
00051 template <class TInputImage, typename TVTKRealType=float>
00052 class ITK_EXPORT VTKImageExport: public VTKImageExportBase
00053 {
00054 public:
00056   typedef VTKImageExport Self;
00057   typedef VTKImageExportBase Superclass;
00058   typedef SmartPointer<Self>  Pointer;
00059   typedef SmartPointer<const Self>  ConstPointer;
00060 
00062   itkTypeMacro(VTKImageExport,VTKImageExportBase);
00063 
00065   itkNewMacro(Self);
00066 
00069   typedef TVTKRealType vtkRealType;
00070   typedef vtkRealType VTKSpacingType;
00071   typedef vtkRealType VTKOriginType;
00072 
00074   typedef TInputImage InputImageType;
00075   
00079   typedef TVTKRealType * (*SpacingCallbackType)(void*);
00080   typedef TVTKRealType * (*OriginCallbackType)(void*);
00081   
00083   SpacingCallbackType               GetSpacingCallback() const;
00084   OriginCallbackType                GetOriginCallback() const;
00085 
00087   void SetInput(const InputImageType*);
00088 
00089 protected:
00090   VTKImageExport();
00091   ~VTKImageExport() {}
00092   void PrintSelf(std::ostream& os, Indent indent) const;  
00093 
00094   typedef typename InputImageType::Pointer InputImagePointer;
00095   typedef typename InputImageType::RegionType InputRegionType;
00096   typedef typename InputRegionType::SizeType InputSizeType;
00097   typedef typename InputRegionType::IndexType InputIndexType;
00098   itkStaticConstMacro(InputImageDimension, unsigned int,
00099                       InputImageType::ImageDimension );
00100   
00101   InputImageType * GetInput(void);
00102   
00103   int* WholeExtentCallback();
00104   virtual VTKSpacingType * SpacingCallback();
00105   virtual VTKOriginType  * OriginCallback();
00106   const char* ScalarTypeCallback();
00107   int NumberOfComponentsCallback();
00108   void PropagateUpdateExtentCallback(int*);
00109   int* DataExtentCallback();
00110   void* BufferPointerCallback();
00111   
00112 private:
00113   VTKImageExport(const Self&); //purposely not implemented
00114   void operator=(const Self&); //purposely not implemented
00115 
00119   static VTKSpacingType * SpacingCallbackFunction(void*);
00120   static VTKOriginType  * OriginCallbackFunction(void*);
00121 
00122   std::string m_ScalarTypeName;
00123   int m_WholeExtent[6];
00124   int m_DataExtent[6];
00125   VTKSpacingType m_DataSpacing[3];
00126   VTKOriginType  m_DataOrigin[3];
00127 };
00128 
00129 } // end namespace itk
00130   
00131 #ifndef ITK_MANUAL_INSTANTIATION
00132 #include "itkVTKImageExport.txx"
00133 #endif
00134 
00135 #endif

Generated at Sun Jan 25 13:19:48 2004 for ITK by doxygen 1.3.3 written by Dimitri van Heesch, © 1997-2000