VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Filters/General/vtkStructuredGridClip.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkStructuredGridClip.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 vtkStructuredGridClip_h
00028 #define vtkStructuredGridClip_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 "vtkFiltersGeneralModule.h" // For export macro
00034 #include "vtkStructuredGridAlgorithm.h"
00035 
00036 class VTKFILTERSGENERAL_EXPORT vtkStructuredGridClip : public vtkStructuredGridAlgorithm
00037 {
00038 public:
00039   static vtkStructuredGridClip *New();
00040   vtkTypeMacro(vtkStructuredGridClip,vtkStructuredGridAlgorithm);
00041   void PrintSelf(ostream& os, vtkIndent indent);
00042 
00044 
00045   void SetOutputWholeExtent(int extent[6], vtkInformation *outInfo=0);
00046   void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY,
00047                             int minZ, int maxZ);
00048   void GetOutputWholeExtent(int extent[6]);
00049   int *GetOutputWholeExtent() {return this->OutputWholeExtent;}
00051 
00052   void ResetOutputWholeExtent();
00053 
00055 
00058   vtkSetMacro(ClipData, int);
00059   vtkGetMacro(ClipData, int);
00060   vtkBooleanMacro(ClipData, int);
00062 
00063 protected:
00064   vtkStructuredGridClip();
00065   ~vtkStructuredGridClip() {}
00066 
00067   // Time when OutputImageExtent was computed.
00068   vtkTimeStamp CTime;
00069   int Initialized; // Set the OutputImageExtent for the first time.
00070   int OutputWholeExtent[6];
00071 
00072   int ClipData;
00073 
00074   virtual int RequestInformation (vtkInformation *,
00075                                   vtkInformationVector **,
00076                                   vtkInformationVector *);
00077 
00078   void CopyData(vtkStructuredGrid *inData, vtkStructuredGrid *outData, int *ext);
00079 
00080   virtual int RequestData(vtkInformation *,
00081                           vtkInformationVector **,
00082                           vtkInformationVector *);
00083 
00084 private:
00085   vtkStructuredGridClip(const vtkStructuredGridClip&);  // Not implemented.
00086   void operator=(const vtkStructuredGridClip&);  // Not implemented.
00087 };
00088 
00089 
00090 
00091 #endif
00092 
00093 
00094