VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImageStencilData.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 =========================================================================*/ 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 vtkTypeMacro(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 void Fill(); 00116 00118 00120 virtual void CopyInformationToPipeline(vtkInformation* request, 00121 vtkInformation* input, 00122 vtkInformation* output, 00123 int forceCopy); 00124 virtual void CopyInformationFromPipeline(vtkInformation* request); 00126 00127 //BTX 00129 00130 static vtkImageStencilData* GetData(vtkInformation* info); 00131 static vtkImageStencilData* GetData(vtkInformationVector* v, int i=0); 00132 //ETX 00134 00136 virtual void Add ( vtkImageStencilData * ); 00137 00140 virtual void Subtract( vtkImageStencilData * ); 00141 00144 virtual void Replace( vtkImageStencilData * ); 00145 00148 virtual int Clip( int extent[6] ); 00149 00150 protected: 00151 vtkImageStencilData(); 00152 ~vtkImageStencilData(); 00153 00155 void CopyOriginAndSpacingFromPipeline(); 00156 00159 virtual void InternalAdd( vtkImageStencilData * ); 00160 00161 void CollapseAdditionalIntersections(int r2, int idx, int *clist, 00162 int &clistlen); 00163 00165 00166 double Spacing[3]; 00167 double Origin[3]; 00169 00170 int Extent[6]; 00171 00173 00174 int NumberOfExtentEntries; 00175 int *ExtentListLengths; 00176 int **ExtentLists; 00178 private: 00179 vtkImageStencilData(const vtkImageStencilData&); // Not implemented. 00180 void operator=(const vtkImageStencilData&); // Not implemented. 00181 }; 00182 00183 #endif 00184 00185 00186