VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImageClip.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 =========================================================================*/ 00033 #ifndef __vtkImageClip_h 00034 #define __vtkImageClip_h 00035 00036 // I did not make this a subclass of in place filter because 00037 // the references on the data do not matter. I make no modifications 00038 // to the data. 00039 #include "vtkImageAlgorithm.h" 00040 00041 class VTK_IMAGING_EXPORT vtkImageClip : public vtkImageAlgorithm 00042 { 00043 public: 00044 static vtkImageClip *New(); 00045 vtkTypeMacro(vtkImageClip,vtkImageAlgorithm); 00046 void PrintSelf(ostream& os, vtkIndent indent); 00047 00049 00050 void SetOutputWholeExtent(int extent[6], vtkInformation *outInfo=0); 00051 void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, 00052 int minZ, int maxZ); 00053 void GetOutputWholeExtent(int extent[6]); 00054 int *GetOutputWholeExtent() {return this->OutputWholeExtent;} 00056 00057 void ResetOutputWholeExtent(); 00058 00060 00063 vtkSetMacro(ClipData, int); 00064 vtkGetMacro(ClipData, int); 00065 vtkBooleanMacro(ClipData, int); 00067 00069 void SetOutputWholeExtent(int piece, int numPieces); 00070 00071 protected: 00072 vtkImageClip(); 00073 ~vtkImageClip() {}; 00074 00075 // Time when OutputImageExtent was computed. 00076 vtkTimeStamp CTime; 00077 int Initialized; // Set the OutputImageExtent for the first time. 00078 int OutputWholeExtent[6]; 00079 00080 int ClipData; 00081 00082 virtual int RequestInformation (vtkInformation *, 00083 vtkInformationVector **, 00084 vtkInformationVector *); 00085 00086 void CopyData(vtkImageData *inData, vtkImageData *outData, int *ext); 00087 00088 virtual int RequestData(vtkInformation *, 00089 vtkInformationVector **, 00090 vtkInformationVector *); 00091 00092 private: 00093 vtkImageClip(const vtkImageClip&); // Not implemented. 00094 void operator=(const vtkImageClip&); // Not implemented. 00095 }; 00096 00097 00098 00099 #endif 00100 00101 00102