Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# Imaging/vtkImageExport.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkImageExport.h,v $
    00005   Language:  C++
    00006
    00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
    00008   All rights reserved.
    00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
    00010
    00011      This software is distributed WITHOUT ANY WARRANTY; without even
    00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
    00013      PURPOSE.  See the above copyright notice for more information.
    00014
    00015 =========================================================================*/
    00051 #ifndef __vtkImageExport_h
    00052 #define __vtkImageExport_h
    00053
    00054 #include "vtkProcessObject.h"
    00055
    00056 class vtkImageData;
    00057
    00058 class VTK_IMAGING_EXPORT vtkImageExport : public vtkProcessObject
    00059 {
    00060 public:
    00061   static vtkImageExport *New();
    00062   vtkTypeRevisionMacro(vtkImageExport,vtkProcessObject);
    00063   void PrintSelf(ostream& os, vtkIndent indent);
    00064
    00066   int GetDataMemorySize();
    00067
    00069
    00071   void GetDataDimensions(int *ptr);
    00072   int *GetDataDimensions() {
    00073     this->GetDataDimensions(this->DataDimensions);
    00074     return this->DataDimensions; }
    00076
    00080   int GetDataNumberOfScalarComponents();
    00081
    00083
    00085   int GetDataScalarType();
    00086   const char *GetDataScalarTypeAsString() {
    00087     return vtkImageScalarTypeNameMacro(this->GetDataScalarType()); }
    00089
    00091
    00092   int *GetDataExtent();
    00093   void GetDataExtent(int *ptr);
    00094   float *GetDataSpacing();
    00095   void GetDataSpacing(float *ptr);
    00096   float *GetDataOrigin();
    00097   void GetDataOrigin(float *ptr);
    00099
    00101
    00102   void SetInput(vtkImageData *input);
    00103   vtkImageData *GetInput();
    00105
    00107
    00112   vtkBooleanMacro(ImageLowerLeft, int);
    00113   vtkGetMacro(ImageLowerLeft, int);
    00114   vtkSetMacro(ImageLowerLeft, int);
    00116
    00118
    00121   void SetExportVoidPointer(void *);
    00122   void *GetExportVoidPointer() { return this->ExportVoidPointer; };
    00124
    00126
    00129   void Export() { this->Export(this->ExportVoidPointer); };
    00130   virtual void Export(void *);
    00132
    00137   void *GetPointerToData();
    00138
    00140   void* GetCallbackUserData();
    00141
    00142   //BTX
    00144   /*! These are function pointer types for the pipeline connection
    00145       callbacks.  See furhter documentation in vtkImageImport.h. */
    00146   typedef void (*UpdateInformationCallbackType)(void*);
    00147   typedef int (*PipelineModifiedCallbackType)(void*);
    00148   typedef int* (*WholeExtentCallbackType)(void*);
    00149   typedef float* (*SpacingCallbackType)(void*);
    00150   typedef float* (*OriginCallbackType)(void*);
    00151   typedef const char* (*ScalarTypeCallbackType)(void*);
    00152   typedef int (*NumberOfComponentsCallbackType)(void*);
    00153   typedef void (*PropagateUpdateExtentCallbackType)(void*, int*);
    00154   typedef void (*UpdateDataCallbackType)(void*);
    00155   typedef int* (*DataExtentCallbackType)(void*);
    00156   typedef void* (*BufferPointerCallbackType)(void*);
    00158
    00160
    00161   UpdateInformationCallbackType     GetUpdateInformationCallback() const;
    00162   PipelineModifiedCallbackType      GetPipelineModifiedCallback() const;
    00163   WholeExtentCallbackType           GetWholeExtentCallback() const;
    00164   SpacingCallbackType               GetSpacingCallback() const;
    00165   OriginCallbackType                GetOriginCallback() const;
    00166   ScalarTypeCallbackType            GetScalarTypeCallback() const;
    00167   NumberOfComponentsCallbackType    GetNumberOfComponentsCallback() const;
    00168   PropagateUpdateExtentCallbackType GetPropagateUpdateExtentCallback() const;
    00169   UpdateDataCallbackType            GetUpdateDataCallback() const;
    00170   DataExtentCallbackType            GetDataExtentCallback() const;
    00171   BufferPointerCallbackType         GetBufferPointerCallback() const;
    00172   //ETX
    00174
    00175 protected:
    00176   vtkImageExport();
    00177   ~vtkImageExport();
    00178
    00179   virtual void UpdateInformationCallback();
    00180   virtual int PipelineModifiedCallback();
    00181   virtual void UpdateDataCallback();
    00182   virtual int* WholeExtentCallback();
    00183   virtual float* SpacingCallback();
    00184   virtual float* OriginCallback();
    00185   virtual const char* ScalarTypeCallback();
    00186   virtual int NumberOfComponentsCallback();
    00187   virtual void PropagateUpdateExtentCallback(int*);
    00188   virtual int* DataExtentCallback();
    00189   virtual void* BufferPointerCallback();
    00190
    00191   int ImageLowerLeft;
    00192   int DataDimensions[3];
    00193   void *ExportVoidPointer;
    00194
    00195   unsigned long LastPipelineMTime;
    00196
    00197 private:
    00198   vtkImageExport(const vtkImageExport&);  // Not implemented.
    00199   void operator=(const vtkImageExport&);  // Not implemented.
    00200
    00201   static void UpdateInformationCallbackFunction(void*);
    00202   static int PipelineModifiedCallbackFunction(void*);
    00203   static int* WholeExtentCallbackFunction(void*);
    00204   static float* SpacingCallbackFunction(void*);
    00205   static float* OriginCallbackFunction(void*);
    00206   static const char* ScalarTypeCallbackFunction(void*);
    00207   static int NumberOfComponentsCallbackFunction(void*);
    00208   static void PropagateUpdateExtentCallbackFunction(void*, int*);
    00209   static void UpdateDataCallbackFunction(void*);
    00210   static int* DataExtentCallbackFunction(void*);
    00211   static void* BufferPointerCallbackFunction(void*);
    00212 };
    00213
    00214 #endif
    00215
    00216