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

Imaging/vtkImageToImageStencil.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageToImageStencil.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 =========================================================================*/
00045 #ifndef __vtkImageToImageStencil_h
00046 #define __vtkImageToImageStencil_h
00047 
00048 
00049 #include "vtkImageStencilSource.h"
00050 
00051 class vtkImageData;
00052 
00053 class VTK_IMAGING_EXPORT vtkImageToImageStencil : public vtkImageStencilSource
00054 {
00055 public:
00056   static vtkImageToImageStencil *New();
00057   vtkTypeRevisionMacro(vtkImageToImageStencil, vtkImageStencilSource);
00058   void PrintSelf(ostream& os, vtkIndent indent);
00059 
00061 
00062   void SetInput(vtkImageData *input);
00063   vtkImageData *GetInput();
00065 
00067   void ThresholdByUpper(float thresh);
00068   
00070   void ThresholdByLower(float thresh);
00071   
00073   void ThresholdBetween(float lower, float upper);
00074   
00076 
00077   vtkSetMacro(UpperThreshold, float);
00078   vtkGetMacro(UpperThreshold, float);
00079   vtkSetMacro(LowerThreshold, float);
00080   vtkGetMacro(LowerThreshold, float);
00082 
00083 protected:
00084   vtkImageToImageStencil();
00085   ~vtkImageToImageStencil();
00086 
00087   void ThreadedExecute(vtkImageStencilData *output,
00088                        int extent[6], int threadId);
00089 
00090   float UpperThreshold;
00091   float LowerThreshold;
00092   float Threshold;
00093 private:
00094   vtkImageToImageStencil(const vtkImageToImageStencil&);  // Not implemented.
00095   void operator=(const vtkImageToImageStencil&);  // Not implemented.
00096 };
00097 
00098 #endif