Imaging/vtkImageThreshold.h Source File

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

# Imaging/vtkImageThreshold.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkImageThreshold.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 =========================================================================*/
    00043 #ifndef __vtkImageThreshold_h
    00044 #define __vtkImageThreshold_h
    00045
    00046
    00047 #include "vtkImageToImageFilter.h"
    00048
    00049 class VTK_IMAGING_EXPORT vtkImageThreshold : public vtkImageToImageFilter
    00050 {
    00051 public:
    00052   static vtkImageThreshold *New();
    00053   vtkTypeRevisionMacro(vtkImageThreshold,vtkImageToImageFilter);
    00054   void PrintSelf(ostream& os, vtkIndent indent);
    00055
    00057   void ThresholdByUpper(float thresh);
    00058
    00060   void ThresholdByLower(float thresh);
    00061
    00063   void ThresholdBetween(float lower, float upper);
    00064
    00066
    00067   vtkSetMacro(ReplaceIn, int);
    00068   vtkGetMacro(ReplaceIn, int);
    00069   vtkBooleanMacro(ReplaceIn, int);
    00071
    00073
    00074   void SetInValue(float val);
    00075   vtkGetMacro(InValue, float);
    00077
    00079
    00080   vtkSetMacro(ReplaceOut, int);
    00081   vtkGetMacro(ReplaceOut, int);
    00082   vtkBooleanMacro(ReplaceOut, int);
    00084
    00086
    00087   void SetOutValue(float val);
    00088   vtkGetMacro(OutValue, float);
    00090
    00092
    00093   vtkGetMacro(UpperThreshold, float);
    00094   vtkGetMacro(LowerThreshold, float);
    00096
    00098
    00099   vtkSetMacro(OutputScalarType, int);
    00100   vtkGetMacro(OutputScalarType, int);
    00101   void SetOutputScalarTypeToDouble()
    00102     {this->SetOutputScalarType(VTK_DOUBLE);}
    00103   void SetOutputScalarTypeToFloat()
    00104     {this->SetOutputScalarType(VTK_FLOAT);}
    00105   void SetOutputScalarTypeToLong()
    00106     {this->SetOutputScalarType(VTK_LONG);}
    00107   void SetOutputScalarTypeToUnsignedLong()
    00108     {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
    00109   void SetOutputScalarTypeToInt()
    00110     {this->SetOutputScalarType(VTK_INT);}
    00111   void SetOutputScalarTypeToUnsignedInt()
    00112     {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
    00113   void SetOutputScalarTypeToShort()
    00114     {this->SetOutputScalarType(VTK_SHORT);}
    00115   void SetOutputScalarTypeToUnsignedShort()
    00116     {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
    00117   void SetOutputScalarTypeToChar()
    00118     {this->SetOutputScalarType(VTK_CHAR);}
    00119   void SetOutputScalarTypeToUnsignedChar()
    00120     {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
    00122
    00123 protected:
    00124   vtkImageThreshold();
    00125   ~vtkImageThreshold() {};
    00126
    00127   float UpperThreshold;
    00128   float LowerThreshold;
    00129   int ReplaceIn;
    00130   float InValue;
    00131   int ReplaceOut;
    00132   float OutValue;
    00133
    00134   int OutputScalarType;
    00135
    00136   void ExecuteInformation(vtkImageData *inData, vtkImageData *outData);
    00137   void ExecuteInformation(){this->vtkImageToImageFilter::ExecuteInformation();};
    00138   void ThreadedExecute(vtkImageData *inData, vtkImageData *outData,
    00139                        int extent[6], int id);
    00140 private:
    00141   vtkImageThreshold(const vtkImageThreshold&);  // Not implemented.
    00142   void operator=(const vtkImageThreshold&);  // Not implemented.
    00143 };
    00144
    00145 #endif
    00146
    00147
    00148