Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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 =========================================================================*/
00044 #ifndef __vtkImageToImageStencil_h
00045 #define __vtkImageToImageStencil_h
00046 
00047 
00048 #include "vtkImageStencilSource.h"
00049 
00050 class vtkImageData;
00051 
00052 class VTK_IMAGING_EXPORT vtkImageToImageStencil : public vtkImageStencilSource
00053 {
00054 public:
00055   static vtkImageToImageStencil *New();
00056   vtkTypeRevisionMacro(vtkImageToImageStencil, vtkImageStencilSource);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00061   void SetInput(vtkImageData *input);
00062   vtkImageData *GetInput();
00064 
00066   void ThresholdByUpper(float thresh);
00067   
00069   void ThresholdByLower(float thresh);
00070   
00072   void ThresholdBetween(float lower, float upper);
00073   
00075 
00076   vtkSetMacro(UpperThreshold, float);
00077   vtkGetMacro(UpperThreshold, float);
00078   vtkSetMacro(LowerThreshold, float);
00079   vtkGetMacro(LowerThreshold, float);
00081 
00082 protected:
00083   vtkImageToImageStencil();
00084   ~vtkImageToImageStencil();
00085 
00086   void ThreadedExecute(vtkImageStencilData *output,
00087                        int extent[6], int threadId);
00088 
00089   float UpperThreshold;
00090   float LowerThreshold;
00091   float Threshold;
00092 private:
00093   vtkImageToImageStencil(const vtkImageToImageStencil&);  // Not implemented.
00094   void operator=(const vtkImageToImageStencil&);  // Not implemented.
00095 };
00096 
00097 #endif