Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00037 #ifndef __vtkImageClip_h
00038 #define __vtkImageClip_h
00039 
00040 // I did not make this a subclass of in place filter because
00041 // the references on the data do not matter. I make no modifications
00042 // to the data.
00043 #include "vtkImageToImageFilter.h"
00044 
00045 class VTK_IMAGING_EXPORT vtkImageClip : public vtkImageToImageFilter
00046 {
00047 public:
00048   static vtkImageClip *New();
00049   vtkTypeRevisionMacro(vtkImageClip,vtkImageToImageFilter);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053 
00054   void SetOutputWholeExtent(int extent[6]);
00055   void SetOutputWholeExtent(int minX, int maxX, int minY, int maxY, 
00056                             int minZ, int maxZ);
00057   void GetOutputWholeExtent(int extent[6]);
00058   int *GetOutputWholeExtent() {return this->OutputWholeExtent;}
00060 
00061   void ResetOutputWholeExtent();
00062 
00064 
00067   vtkSetMacro(ClipData, int);
00068   vtkGetMacro(ClipData, int);
00069   vtkBooleanMacro(ClipData, int);
00071 
00073   void SetOutputWholeExtent(int piece, int numPieces);
00074 
00075 protected:
00076   vtkImageClip();
00077   ~vtkImageClip() {};
00078 
00079   // Time when OutputImageExtent was computed.
00080   vtkTimeStamp CTime;
00081   int Initialized; // Set the OutputImageExtent for the first time.
00082   int OutputWholeExtent[6];
00083 
00084   int ClipData;
00085   
00086   void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
00087   void ExecuteInformation(){this->vtkImageToImageFilter::ExecuteInformation();};
00088   void CopyData(vtkImageData *inData, vtkImageData *outData, int *ext);
00089 
00090   int SplitExtentTmp(int piece, int numPieces, int *ext);
00091 
00092   virtual void ExecuteData(vtkDataObject *out);
00093 private:
00094   vtkImageClip(const vtkImageClip&);  // Not implemented.
00095   void operator=(const vtkImageClip&);  // Not implemented.
00096 };
00097 
00098 
00099 
00100 #endif
00101 
00102 
00103