VTK
/Users/kitware/Dashboards/MyTests/VTK_BLD_Release_docs/Utilities/Doxygen/dox/Imaging/Core/vtkImageClip.h
Go to the documentation of this file.
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 
00069 protected:
00070   vtkImageClip();
00071   ~vtkImageClip() {}
00072 
00073   // Time when OutputImageExtent was computed.
00074   vtkTimeStamp CTime;
00075   int Initialized; // Set the OutputImageExtent for the first time.
00076   int OutputWholeExtent[6];
00077 
00078   int ClipData;
00079 
00080   virtual int RequestInformation (vtkInformation *,
00081                                   vtkInformationVector **,
00082                                   vtkInformationVector *);
00083 
00084   void CopyData(vtkImageData *inData, vtkImageData *outData, int *ext);
00085 
00086   virtual int RequestData(vtkInformation *,
00087                           vtkInformationVector **,
00088                           vtkInformationVector *);
00089 
00090 private:
00091   vtkImageClip(const vtkImageClip&);  // Not implemented.
00092   void operator=(const vtkImageClip&);  // Not implemented.
00093 };
00094 
00095 
00096 
00097 #endif
00098 
00099 
00100