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

itkVTKImageExportBase.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkVTKImageExportBase.h,v $
00005   Language:  C++
00006   Date:      $Date: 2008-10-09 15:31:37 $
00007   Version:   $Revision: 1.12 $
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 __itkVTKImageExportBase_h
00018 #define __itkVTKImageExportBase_h
00019 
00020 #include "itkProcessObject.h"
00021 
00022 namespace itk
00023 {
00024 
00035 class ITK_EXPORT VTKImageExportBase: public ProcessObject
00036 {
00037 public:
00039   typedef VTKImageExportBase        Self;
00040   typedef ProcessObject             Superclass;
00041   typedef SmartPointer<Self>        Pointer;
00042   typedef SmartPointer<const Self>  ConstPointer;
00043 
00045   itkTypeMacro(VTKImageExportBase,ProcessObject);
00046 
00048   void* GetCallbackUserData();
00049 
00051   typedef void (*UpdateInformationCallbackType)(void*);
00052   typedef int (*PipelineModifiedCallbackType)(void*);
00053   typedef int* (*WholeExtentCallbackType)(void*);
00054   typedef double* (*SpacingCallbackType)(void*);
00055   typedef double* (*OriginCallbackType)(void*);
00056   typedef const char* (*ScalarTypeCallbackType)(void*); 
00057   typedef int (*NumberOfComponentsCallbackType)(void*);
00058   typedef void (*PropagateUpdateExtentCallbackType)(void*, int*);
00059   typedef void (*UpdateDataCallbackType)(void*);
00060   typedef int* (*DataExtentCallbackType)(void*);
00061   typedef void* (*BufferPointerCallbackType)(void*);
00063 
00065   typedef float* (*FloatSpacingCallbackType)(void*);
00066   typedef float* (*FloatOriginCallbackType)(void*);
00068 
00070   class CallbackTypeProxy
00071     {
00072   public:
00073     typedef double* (*DoubleCallbackType)(void*);
00074     typedef float* (*FloatCallbackType)(void*);
00075     operator DoubleCallbackType()
00076       {
00077       return m_DoubleCallback;
00078       }
00079     operator FloatCallbackType()
00080       {
00081       return m_FloatCallback;
00082       }
00083     CallbackTypeProxy(DoubleCallbackType d, FloatCallbackType f):
00084       m_DoubleCallback(d), m_FloatCallback(f) {}
00085   private:
00086       DoubleCallbackType m_DoubleCallback;
00087       FloatCallbackType m_FloatCallback;
00088   };
00089   
00091   UpdateInformationCallbackType     GetUpdateInformationCallback() const;
00092   PipelineModifiedCallbackType      GetPipelineModifiedCallback() const;
00093   WholeExtentCallbackType           GetWholeExtentCallback() const;
00094   CallbackTypeProxy                 GetSpacingCallback() const;
00095   CallbackTypeProxy                 GetOriginCallback() const;
00096   ScalarTypeCallbackType            GetScalarTypeCallback() const;
00097   NumberOfComponentsCallbackType    GetNumberOfComponentsCallback() const;
00098   PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
00099   UpdateDataCallbackType            GetUpdateDataCallback() const;
00100   DataExtentCallbackType            GetDataExtentCallback() const;
00101   BufferPointerCallbackType         GetBufferPointerCallback() const;
00103 
00104 protected:
00105   VTKImageExportBase();
00106   ~VTKImageExportBase() {}
00107   void PrintSelf(std::ostream& os, Indent indent) const;  
00108 
00109   typedef DataObject::Pointer DataObjectPointer;
00110   
00111   virtual void UpdateInformationCallback();
00112   virtual int PipelineModifiedCallback();
00113   virtual void UpdateDataCallback();  
00114   
00117   virtual int* WholeExtentCallback()=0;
00118   virtual double* SpacingCallback()=0;
00119   virtual double* OriginCallback()=0;
00120   virtual float* FloatSpacingCallback()=0;
00121   virtual float* FloatOriginCallback()=0;
00122   virtual const char* ScalarTypeCallback()=0;
00123   virtual int NumberOfComponentsCallback()=0;
00124   virtual void PropagateUpdateExtentCallback(int*)=0;
00125   virtual int* DataExtentCallback()=0;
00126   virtual void* BufferPointerCallback()=0;
00128 
00129 private:
00130   VTKImageExportBase(const Self&); //purposely not implemented
00131   void operator=(const Self&); //purposely not implemented
00132 
00136   static void UpdateInformationCallbackFunction(void*);
00137   static int PipelineModifiedCallbackFunction(void*);
00138   static int* WholeExtentCallbackFunction(void*);
00139   static double* SpacingCallbackFunction(void*);
00140   static double* OriginCallbackFunction(void*);
00141   static float* FloatSpacingCallbackFunction(void*);
00142   static float* FloatOriginCallbackFunction(void*);
00143   static const char* ScalarTypeCallbackFunction(void*); 
00144   static int NumberOfComponentsCallbackFunction(void*);
00145   static void PropagateUpdateExtentCallbackFunction(void*, int*);
00146   static void UpdateDataCallbackFunction(void*);
00147   static int* DataExtentCallbackFunction(void*);
00148   static void* BufferPointerCallbackFunction(void*);
00150 
00151 private:
00153   unsigned long m_LastPipelineMTime;
00154 };
00155 
00156 } // end namespace itk
00157   
00158 #endif
00159 

Generated at Tue Sep 15 05:27:17 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000