00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00029 #ifndef __vtkImageStencilData_h
00030 #define __vtkImageStencilData_h
00031
00032
00033 #include "vtkDataObject.h"
00034
00035 class VTK_IMAGING_EXPORT vtkImageStencilData : public vtkDataObject
00036 {
00037 public:
00038 static vtkImageStencilData *New();
00039 vtkTypeRevisionMacro(vtkImageStencilData, vtkDataObject);
00040 void PrintSelf(ostream& os, vtkIndent indent);
00041
00042 void Initialize();
00043 void DeepCopy(vtkDataObject *o);
00044 void ShallowCopy(vtkDataObject *f);
00045 void InternalImageStencilDataCopy(vtkImageStencilData *s);
00046
00049 int GetDataObjectType() { return VTK_DATA_OBJECT; }
00050
00052 int GetExtentType() { return VTK_3D_EXTENT; };
00053
00055
00063 int GetNextExtent(int &r1, int &r2, int xMin, int xMax,
00064 int yIdx, int zIdx, int &iter);
00066
00072 void InsertNextExtent(int r1, int r2, int yIdx, int zIdx);
00073
00080 void InsertAndMergeExtent(int r1, int r2, int yIdx, int zIdx);
00081
00083 void RemoveExtent(int r1, int r2, int yIdx, int zIdx);
00084
00086
00089 vtkSetVector3Macro(Spacing, double);
00090 vtkGetVector3Macro(Spacing, double);
00092
00094
00097 vtkSetVector3Macro(Origin, double);
00098 vtkGetVector3Macro(Origin, double);
00100
00102
00105 void SetExtent(int extent[6]);
00106 void SetExtent(int x1, int x2, int y1, int y2, int z1, int z2);
00107 vtkGetVector6Macro(Extent, int);
00109
00112 void AllocateExtents();
00113
00115
00117 virtual void CopyInformationToPipeline(vtkInformation* request,
00118 vtkInformation* input,
00119 vtkInformation* output,
00120 int forceCopy);
00121 virtual void CopyInformationFromPipeline(vtkInformation* request);
00123
00124
00126
00127 static vtkImageStencilData* GetData(vtkInformation* info);
00128 static vtkImageStencilData* GetData(vtkInformationVector* v, int i=0);
00129
00131
00133 virtual void Add ( vtkImageStencilData * );
00134
00137 virtual void Subtract( vtkImageStencilData * );
00138
00141 virtual int Clip( int extent[6] );
00142
00143 protected:
00144 vtkImageStencilData();
00145 ~vtkImageStencilData();
00146
00148 void CopyOriginAndSpacingFromPipeline();
00149
00152 virtual void InternalAdd( vtkImageStencilData * );
00153
00155
00156 double Spacing[3];
00157 double Origin[3];
00159
00160 int Extent[6];
00161
00163
00164 int NumberOfExtentEntries;
00165 int *ExtentListLengths;
00166 int **ExtentLists;
00168 private:
00169 vtkImageStencilData(const vtkImageStencilData&);
00170 void operator=(const vtkImageStencilData&);
00171 };
00172
00173 #endif
00174
00175
00176