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