VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Accelerators/Piston/vtkPistonDataObject.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkPistonDataObject.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00030 #ifndef vtkPistonDataObject_h
00031 #define vtkPistonDataObject_h
00032 
00033 #include "vtkAcceleratorsPistonModule.h" // For export macro
00034 #include "vtkDataObject.h"
00035 
00036 class vtkInformation;
00037 class vtkInformationVector;
00038 class vtkPistonReference;
00039 class vtkTimeStamp;
00040 
00041 class VTKACCELERATORSPISTON_EXPORT vtkPistonDataObject : public vtkDataObject
00042 {
00043 public:
00044   static vtkPistonDataObject* New();
00045   vtkTypeMacro(vtkPistonDataObject, vtkDataObject);
00046   void PrintSelf(ostream &os, vtkIndent indent);
00047 
00049   int GetDataObjectType() {return VTK_PISTON_DATA_OBJECT;}
00050 
00052   int GetReferredType();
00053 
00056   void * GetReferredData();
00057 
00058 //BTX
00060 
00061   vtkPistonReference *GetReference() { return this->Reference; };
00062 //ETX
00064 
00065 
00066   virtual void ShallowCopy(vtkDataObject* src);
00067   virtual void DeepCopy(vtkDataObject* src);
00069 
00071   virtual void ComputeBounds();
00072 
00074 
00076   double *GetBounds();
00077   void GetBounds(double bounds[6]);
00078   void SetBounds(const double bounds[6]);
00080 
00082   double *GetOrigin();
00083   void GetOrigin(double origin[3]);
00084   void SetOrigin(const double origin[3]);
00086 
00088   double *GetSpacing();
00089   void GetSpacing(double spacing[3]);
00090   void SetSpacing(double spacing[3]);
00092 
00094 
00095   vtkGetStringMacro(ScalarsArrayName);
00096   // Set scalars array name
00097   vtkSetStringMacro(ScalarsArrayName);
00099 
00101 
00103   double* GetScalarsRange();
00104   void GetScalarsRange(double range[2]);
00106 
00107   void SetScalarsRange(double range[2]);
00108 
00109   //BTX
00111 
00112   static vtkPistonDataObject* GetData(vtkInformation* info);
00113   static vtkPistonDataObject* GetData(vtkInformationVector* v, int i=0);
00114   //ETX
00116 
00117 protected:
00118   vtkPistonDataObject();
00119   ~vtkPistonDataObject();
00120 
00121   vtkPistonReference *Reference;
00122   bool OwnReference;
00123   double Bounds[6];
00124   double Origin[3];
00125   double Spacing[3];
00126 
00127   char *ScalarsArrayName;
00128   double ScalarsRange[2];
00129   vtkTimeStamp ComputeTime; // Time at which bounds, center, etc. computed
00130 
00131 private:
00132   vtkPistonDataObject(const vtkPistonDataObject&); // Not implemented
00133   void operator=(const vtkPistonDataObject&); // Not implemented
00134 };
00135 
00136 #endif