Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkImageClip.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageClip.h,v $
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 =========================================================================*/
00044 #ifndef __vtkImageClip_h
00045 #define __vtkImageClip_h
00046 
00047 // I did not make this a subclass of in place filter because
00048 // the references on the data do not matter. I make no modifications
00049 // to the data.
00050 #include "vtkImageToImageFilter.h"
00051 
00052 class VTK_IMAGING_EXPORT vtkImageClip : public vtkImageToImageFilter
00053 {
00054 public:
00055   static vtkImageClip *New();
00056   vtkTypeRevisionMacro(vtkImageClip,vtkImageToImageFilter);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00061   void SetOutputWholeExtent(int extent[6]);
00062   void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, 
00063                             int minZ, int maxZ);
00064   void GetOutputWholeExtent(int extent[6]);
00065   int *GetOutputWholeExtent() {return this->OutputWholeExtent;}
00067 
00068   void ResetOutputWholeExtent();
00069 
00071 
00074   vtkSetMacro(ClipData, int);
00075   vtkGetMacro(ClipData, int);
00076   vtkBooleanMacro(ClipData, int);
00078 
00080   void SetOutputWholeExtent(int piece, int numPieces);
00081 
00082 protected:
00083   vtkImageClip();
00084   ~vtkImageClip() {};
00085 
00086   // Time when OutputImageExtent was computed.
00087   vtkTimeStamp CTime;
00088   int Initialized; // Set the OutputImageExtent for the first time.
00089   int OutputWholeExtent[6];
00090 
00091   int ClipData;
00092   
00093   void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00094   void ExecuteInformation(){this->vtkImageToImageFilter::ExecuteInformation();};
00095   void CopyData(vtkImageData *inData, vtkImageData *outData, int *ext);
00096 
00097   int SplitExtentTmp(int piece, int numPieces, int *ext);
00098 
00099   virtual void ExecuteData(vtkDataObject *out);
00100 private:
00101   vtkImageClip(const vtkImageClip&);  // Not implemented.
00102   void operator=(const vtkImageClip&);  // Not implemented.
00103 };
00104 
00105 
00106 
00107 #endif
00108 
00109 
00110