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: 2004/02/18 22:48:38 $
00007   Version:   $Revision: 1.11 $
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   };
00090 
00092   UpdateInformationCallbackType     GetUpdateInformationCallback() const;
00093   PipelineModifiedCallbackType      GetPipelineModifiedCallback() const;
00094   WholeExtentCallbackType           GetWholeExtentCallback() const;
00095   CallbackTypeProxy                 GetSpacingCallback() const;
00096   CallbackTypeProxy                 GetOriginCallback() const;
00097   ScalarTypeCallbackType            GetScalarTypeCallback() const;
00098   NumberOfComponentsCallbackType    GetNumberOfComponentsCallback() const;
00099   PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
00100   UpdateDataCallbackType            GetUpdateDataCallback() const;
00101   DataExtentCallbackType            GetDataExtentCallback() const;
00102   BufferPointerCallbackType         GetBufferPointerCallback() const;
00104 
00105 protected:
00106   VTKImageExportBase();
00107   ~VTKImageExportBase() {}
00108   void PrintSelf(std::ostream& os, Indent indent) const;  
00109 
00110   typedef DataObject::Pointer DataObjectPointer;
00111   
00112   virtual void UpdateInformationCallback();
00113   virtual int PipelineModifiedCallback();
00114   virtual void UpdateDataCallback();  
00115   
00118   virtual int* WholeExtentCallback()=0;
00119   virtual double* SpacingCallback()=0;
00120   virtual double* OriginCallback()=0;
00121   virtual float* FloatSpacingCallback()=0;
00122   virtual float* FloatOriginCallback()=0;
00123   virtual const char* ScalarTypeCallback()=0;
00124   virtual int NumberOfComponentsCallback()=0;
00125   virtual void PropagateUpdateExtentCallback(int*)=0;
00126   virtual int* DataExtentCallback()=0;
00127   virtual void* BufferPointerCallback()=0;
00129 
00130 private:
00131   VTKImageExportBase(const Self&); //purposely not implemented
00132   void operator=(const Self&); //purposely not implemented
00133 
00137   static void UpdateInformationCallbackFunction(void*);
00138   static int PipelineModifiedCallbackFunction(void*);
00139   static int* WholeExtentCallbackFunction(void*);
00140   static double* SpacingCallbackFunction(void*);
00141   static double* OriginCallbackFunction(void*);
00142   static float* FloatSpacingCallbackFunction(void*);
00143   static float* FloatOriginCallbackFunction(void*);
00144   static const char* ScalarTypeCallbackFunction(void*); 
00145   static int NumberOfComponentsCallbackFunction(void*);
00146   static void PropagateUpdateExtentCallbackFunction(void*, int*);
00147   static void UpdateDataCallbackFunction(void*);
00148   static int* DataExtentCallbackFunction(void*);
00149   static void* BufferPointerCallbackFunction(void*);
00151 
00152 private:
00154   unsigned long m_LastPipelineMTime;
00155 };
00156 
00157 } // end namespace itk
00158   
00159 #endif
00160 

Generated at Mon Mar 12 03:27:59 2007 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000