VTK
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 
00064   void SetOutputWholeExtent(int piece, int numPieces);
00065 
00066 protected:
00067   vtkStructuredGridClip();
00068   ~vtkStructuredGridClip() {}
00069 
00070   // Time when OutputImageExtent was computed.
00071   vtkTimeStamp CTime;
00072   int Initialized; // Set the OutputImageExtent for the first time.
00073   int OutputWholeExtent[6];
00074 
00075   int ClipData;
00076 
00077   virtual int RequestInformation (vtkInformation *,
00078                                   vtkInformationVector **,
00079                                   vtkInformationVector *);
00080 
00081   void CopyData(vtkStructuredGrid *inData, vtkStructuredGrid *outData, int *ext);
00082 
00083   virtual int RequestData(vtkInformation *,
00084                           vtkInformationVector **,
00085                           vtkInformationVector *);
00086 
00087 private:
00088   vtkStructuredGridClip(const vtkStructuredGridClip&);  // Not implemented.
00089   void operator=(const vtkStructuredGridClip&);  // Not implemented.
00090 };
00091 
00092 
00093 
00094 #endif
00095 
00096 
00097