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