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 "vtkImagingCoreModule.h" // For export macro 00040 #include "vtkImageAlgorithm.h" 00041 00042 class VTKIMAGINGCORE_EXPORT vtkImageClip : public vtkImageAlgorithm 00043 { 00044 public: 00045 static vtkImageClip *New(); 00046 vtkTypeMacro(vtkImageClip,vtkImageAlgorithm); 00047 void PrintSelf(ostream& os, vtkIndent indent); 00048 00050 00051 void SetOutputWholeExtent(int extent[6], vtkInformation *outInfo=0); 00052 void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, 00053 int minZ, int maxZ); 00054 void GetOutputWholeExtent(int extent[6]); 00055 int *GetOutputWholeExtent() {return this->OutputWholeExtent;} 00057 00058 void ResetOutputWholeExtent(); 00059 00061 00064 vtkSetMacro(ClipData, int); 00065 vtkGetMacro(ClipData, int); 00066 vtkBooleanMacro(ClipData, int); 00068 00070 void SetOutputWholeExtent(int piece, int numPieces); 00071 00072 protected: 00073 vtkImageClip(); 00074 ~vtkImageClip() {}; 00075 00076 // Time when OutputImageExtent was computed. 00077 vtkTimeStamp CTime; 00078 int Initialized; // Set the OutputImageExtent for the first time. 00079 int OutputWholeExtent[6]; 00080 00081 int ClipData; 00082 00083 virtual int RequestInformation (vtkInformation *, 00084 vtkInformationVector **, 00085 vtkInformationVector *); 00086 00087 void CopyData(vtkImageData *inData, vtkImageData *outData, int *ext); 00088 00089 virtual int RequestData(vtkInformation *, 00090 vtkInformationVector **, 00091 vtkInformationVector *); 00092 00093 private: 00094 vtkImageClip(const vtkImageClip&); // Not implemented. 00095 void operator=(const vtkImageClip&); // Not implemented. 00096 }; 00097 00098 00099 00100 #endif 00101 00102 00103