00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00026 #ifndef __vtkImageStencilData_h
00027 #define __vtkImageStencilData_h
00028
00029
00030 #include "vtkDataObject.h"
00031
00032 class VTK_IMAGING_EXPORT vtkImageStencilData : public vtkDataObject
00033 {
00034 public:
00035 static vtkImageStencilData *New();
00036 vtkTypeRevisionMacro(vtkImageStencilData, vtkDataObject);
00037 void PrintSelf(ostream& os, vtkIndent indent);
00038
00039 void Initialize();
00040 void DeepCopy(vtkDataObject *o);
00041 void ShallowCopy(vtkDataObject *f);
00042 void InternalImageStencilDataCopy(vtkImageStencilData *s);
00043
00046 int GetDataObjectType() { return VTK_DATA_OBJECT; }
00047
00049 int GetExtentType() { return VTK_3D_EXTENT; };
00050
00052
00060 int GetNextExtent(int &r1, int &r2, int xMin, int xMax,
00061 int yIdx, int zIdx, int &iter);
00063
00069 void InsertNextExtent(int r1, int r2, int yIdx, int zIdx);
00070
00072
00075 vtkSetVector3Macro(Spacing, double);
00076 vtkGetVector3Macro(Spacing, double);
00078
00080
00083 vtkSetVector3Macro(Origin, double);
00084 vtkGetVector3Macro(Origin, double);
00086
00088
00091 void SetExtent(int extent[6]);
00092 void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2);
00093 vtkGetVector6Macro(Extent, int);
00095
00097
00099 vtkSetVector3Macro(OldSpacing, double);
00100 vtkGetVector3Macro(OldSpacing, double);
00102
00104
00106 vtkSetVector3Macro(OldOrigin, double);
00107 vtkGetVector3Macro(OldOrigin, double);
00109
00112 void AllocateExtents();
00113
00120 void UpdateData();
00121
00126 void PropagateUpdateExtent();
00127
00133 void TriggerAsynchronousUpdate();
00134
00135
00137
00138 static vtkImageStencilData* GetData(vtkInformation* info);
00139 static vtkImageStencilData* GetData(vtkInformationVector* v, int i=0);
00140
00142
00143 protected:
00144 vtkImageStencilData();
00145 ~vtkImageStencilData();
00146
00149 int SpacingOrOriginHasChanged();
00150
00152
00154 double OldSpacing[3];
00155 double OldOrigin[3];
00157
00159
00160 double Spacing[3];
00161 double Origin[3];
00163
00164 int Extent[6];
00165
00167
00168 int NumberOfExtentEntries;
00169 int *ExtentListLengths;
00170 int **ExtentLists;
00172 private:
00173 vtkImageStencilData(const vtkImageStencilData&);
00174 void operator=(const vtkImageStencilData&);
00175 };
00176
00177 #endif
00178
00179
00180