VTK
dox/Imaging/Stencil/vtkImageToImageStencil.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageToImageStencil.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 =========================================================================*/
00028 #ifndef __vtkImageToImageStencil_h
00029 #define __vtkImageToImageStencil_h
00030 
00031 
00032 #include "vtkImagingStencilModule.h" // For export macro
00033 #include "vtkImageStencilAlgorithm.h"
00034 
00035 class vtkImageData;
00036 
00037 class VTKIMAGINGSTENCIL_EXPORT vtkImageToImageStencil : public vtkImageStencilAlgorithm
00038 {
00039 public:
00040   static vtkImageToImageStencil *New();
00041   vtkTypeMacro(vtkImageToImageStencil, vtkImageStencilAlgorithm);
00042   void PrintSelf(ostream& os, vtkIndent indent);
00043 
00045 
00046   void SetInputData(vtkImageData *input);
00047   vtkImageData *GetInput();
00049 
00051   void ThresholdByUpper(double thresh);
00052 
00054   void ThresholdByLower(double thresh);
00055 
00057   void ThresholdBetween(double lower, double upper);
00058 
00060 
00061   vtkSetMacro(UpperThreshold, double);
00062   vtkGetMacro(UpperThreshold, double);
00063   vtkSetMacro(LowerThreshold, double);
00064   vtkGetMacro(LowerThreshold, double);
00066 
00067 protected:
00068   vtkImageToImageStencil();
00069   ~vtkImageToImageStencil();
00070 
00071   virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00072   virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00073   virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00074   virtual int FillInputPortInformation(int, vtkInformation*);
00075 
00076   double UpperThreshold;
00077   double LowerThreshold;
00078   double Threshold;
00079 private:
00080   vtkImageToImageStencil(const vtkImageToImageStencil&);  // Not implemented.
00081   void operator=(const vtkImageToImageStencil&);  // Not implemented.
00082 };
00083 
00084 #endif