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

# vtkImageThreshold Class Reference

`#include <vtkImageThreshold.h>`

Inheritance diagram for vtkImageThreshold:

[legend]
Collaboration diagram for vtkImageThreshold:

[legend]
List of all members.

## Detailed Description

Flexible threshold.

Date:
  2002/01/22 15:33:37

Revision:
  1.33

vtkImageThreshold Can do binary or continuous thresholding for lower, upper or a range of data. The output data type may be different than the output, but defaults to the same type.

Created by:
  - Law, Charles

CVS contributions (if > 5%):
  - Law, Charles (41%)
  - Martin, Ken (26%)
  - Lorensen, Bill (11%)
  - Blezek, Dan (7%)

CVS logs (CVSweb):
  - .`cxx` (`/Imaging/vtkImageThreshold.cxx)`
  - .`h` (`/Imaging/vtkImageThreshold.h)`

Tests:
  vtkImageThreshold (Tests)

Definition at line 49 of file vtkImageThreshold.h.

## Public Types

typedef vtkImageToImageFilter | Superclass

## Public Methods

virtual const char * | GetClassName ()
virtual int | IsA (const char *type)
void | PrintSelf (ostream &os, vtkIndent indent)
void | ThresholdByUpper (float thresh)
void | ThresholdByLower (float thresh)
void | ThresholdBetween (float lower, float upper)
virtual void | SetReplaceIn (int)
virtual int | GetReplaceIn ()
virtual void | ReplaceInOn ()
virtual void | ReplaceInOff ()
void | SetInValue (float val)
virtual float | GetInValue ()
virtual void | SetReplaceOut (int)
virtual int | GetReplaceOut ()
virtual void | ReplaceOutOn ()
virtual void | ReplaceOutOff ()
void | SetOutValue (float val)
virtual float | GetOutValue ()
virtual float | GetUpperThreshold ()
virtual float | GetLowerThreshold ()
virtual void | SetOutputScalarType (int)
virtual int | GetOutputScalarType ()
void | SetOutputScalarTypeToDouble ()
void | SetOutputScalarTypeToFloat ()
void | SetOutputScalarTypeToLong ()
void | SetOutputScalarTypeToUnsignedLong ()
void | SetOutputScalarTypeToInt ()
void | SetOutputScalarTypeToUnsignedInt ()
void | SetOutputScalarTypeToShort ()
void | SetOutputScalarTypeToUnsignedShort ()
void | SetOutputScalarTypeToChar ()
void | SetOutputScalarTypeToUnsignedChar ()

## Static Public Methods

vtkImageThreshold * | New ()
int | IsTypeOf (const char *type)
vtkImageThreshold * | SafeDownCast (vtkObject *o)

## Protected Methods

| vtkImageThreshold ()
| ~vtkImageThreshold ()
void | ExecuteInformation (vtkImageData *inData, vtkImageData *outData)
void | ExecuteInformation ()
void | ThreadedExecute (vtkImageData *inData, vtkImageData *outData, int extent[6], int id)

## Protected Attributes

float | UpperThreshold
float | LowerThreshold
int | ReplaceIn
float | InValue
int | ReplaceOut
float | OutValue
int | OutputScalarType

## Member Typedef Documentation

typedef vtkImageToImageFilter vtkImageThreshold::Superclass

| Reimplemented from vtkImageToImageFilter. Definition at line 53 of file vtkImageThreshold.h.

## Constructor & Destructor Documentation

vtkImageThreshold::vtkImageThreshold | ( |  | ) | `[protected]`

vtkImageThreshold::~vtkImageThreshold | ( |  | ) | `[inline, protected]`

| Definition at line 125 of file vtkImageThreshold.h.

## Member Function Documentation

vtkImageThreshold* vtkImageThreshold::New | ( |  | ) | `[static]`

| Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject.

virtual const char* vtkImageThreshold::GetClassName | ( |  | ) | `[virtual]`

| Reimplemented from vtkImageToImageFilter.

int vtkImageThreshold::IsTypeOf | ( | const char * | type | ) | `[static]`

| Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkImageToImageFilter.

virtual int vtkImageThreshold::IsA | ( | const char * | type | ) | `[virtual]`

| Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkImageToImageFilter.

vtkImageThreshold* vtkImageThreshold::SafeDownCast | ( | vtkObject * | o | ) | `[static]`

| Reimplemented from vtkImageToImageFilter.

void vtkImageThreshold::PrintSelf | ( | ostream & | os,
|  | vtkIndent | indent
| ) | `[virtual]`

| Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes. Reimplemented from vtkImageToImageFilter.

void vtkImageThreshold::ThresholdByUpper | ( | float | thresh | ) |

| The values greater than or equal to the value match.

void vtkImageThreshold::ThresholdByLower | ( | float | thresh | ) |

| The values less than or equal to the value match.

void vtkImageThreshold::ThresholdBetween | ( | float | lower,
|  | float | upper
| ) |

| The values in a range (inclusive) match

virtual void vtkImageThreshold::SetReplaceIn | ( | int |  | ) | `[virtual]`

| Determines whether to replace the pixel in range with InValue

virtual int vtkImageThreshold::GetReplaceIn | ( |  | ) | `[virtual]`

| Determines whether to replace the pixel in range with InValue

virtual void vtkImageThreshold::ReplaceInOn | ( |  | ) | `[virtual]`

| Determines whether to replace the pixel in range with InValue

virtual void vtkImageThreshold::ReplaceInOff | ( |  | ) | `[virtual]`

| Determines whether to replace the pixel in range with InValue

void vtkImageThreshold::SetInValue | ( | float | val | ) |

| Replace the in range pixels with this value.

virtual float vtkImageThreshold::GetInValue | ( |  | ) | `[virtual]`

| Replace the in range pixels with this value.

virtual void vtkImageThreshold::SetReplaceOut | ( | int |  | ) | `[virtual]`

| Determines whether to replace the pixel out of range with OutValue

virtual int vtkImageThreshold::GetReplaceOut | ( |  | ) | `[virtual]`

| Determines whether to replace the pixel out of range with OutValue

virtual void vtkImageThreshold::ReplaceOutOn | ( |  | ) | `[virtual]`

| Determines whether to replace the pixel out of range with OutValue

virtual void vtkImageThreshold::ReplaceOutOff | ( |  | ) | `[virtual]`

| Determines whether to replace the pixel out of range with OutValue

void vtkImageThreshold::SetOutValue | ( | float | val | ) |

| Replace the in range pixels with this value.

virtual float vtkImageThreshold::GetOutValue | ( |  | ) | `[virtual]`

| Replace the in range pixels with this value.

virtual float vtkImageThreshold::GetUpperThreshold | ( |  | ) | `[virtual]`

| Get the Upper and Lower thresholds.

virtual float vtkImageThreshold::GetLowerThreshold | ( |  | ) | `[virtual]`

| Get the Upper and Lower thresholds.

virtual void vtkImageThreshold::SetOutputScalarType | ( | int |  | ) | `[virtual]`

| Set the desired output scalar type to cast to

virtual int vtkImageThreshold::GetOutputScalarType | ( |  | ) | `[virtual]`

| Set the desired output scalar type to cast to

void vtkImageThreshold::SetOutputScalarTypeToDouble | ( |  | ) | `[inline]`

| Set the desired output scalar type to cast to Definition at line 101 of file vtkImageThreshold.h. References VTK_DOUBLE.

void vtkImageThreshold::SetOutputScalarTypeToFloat | ( |  | ) | `[inline]`

| Set the desired output scalar type to cast to Definition at line 103 of file vtkImageThreshold.h. References VTK_FLOAT.

void vtkImageThreshold::SetOutputScalarTypeToLong | ( |  | ) | `[inline]`

| Set the desired output scalar type to cast to Definition at line 105 of file vtkImageThreshold.h. References VTK_LONG.

void vtkImageThreshold::SetOutputScalarTypeToUnsignedLong | ( |  | ) | `[inline]`

| Set the desired output scalar type to cast to Definition at line 107 of file vtkImageThreshold.h. References VTK_UNSIGNED_LONG.

void vtkImageThreshold::SetOutputScalarTypeToInt | ( |  | ) | `[inline]`

| Set the desired output scalar type to cast to Definition at line 109 of file vtkImageThreshold.h. References VTK_INT.

void vtkImageThreshold::SetOutputScalarTypeToUnsignedInt | ( |  | ) | `[inline]`

| Set the desired output scalar type to cast to Definition at line 111 of file vtkImageThreshold.h. References VTK_UNSIGNED_INT.

void vtkImageThreshold::SetOutputScalarTypeToShort | ( |  | ) | `[inline]`

| Set the desired output scalar type to cast to Definition at line 113 of file vtkImageThreshold.h. References VTK_SHORT.

void vtkImageThreshold::SetOutputScalarTypeToUnsignedShort | ( |  | ) | `[inline]`

| Set the desired output scalar type to cast to Definition at line 115 of file vtkImageThreshold.h. References VTK_UNSIGNED_SHORT.

void vtkImageThreshold::SetOutputScalarTypeToChar | ( |  | ) | `[inline]`

| Set the desired output scalar type to cast to Definition at line 117 of file vtkImageThreshold.h. References VTK_CHAR.

void vtkImageThreshold::SetOutputScalarTypeToUnsignedChar | ( |  | ) | `[inline]`

| Set the desired output scalar type to cast to Definition at line 119 of file vtkImageThreshold.h. References VTK_UNSIGNED_CHAR.

void vtkImageThreshold::ExecuteInformation | ( | vtkImageData * | inData,
|  | vtkImageData * | outData
| ) | `[protected, virtual]`

| Reimplemented from vtkImageToImageFilter.

void vtkImageThreshold::ExecuteInformation | ( |  | ) | `[inline, protected, virtual]`

| Reimplemented from vtkImageToImageFilter. Definition at line 137 of file vtkImageThreshold.h. References vtkImageToImageFilter::ExecuteInformation().

void vtkImageThreshold::ThreadedExecute | ( | vtkImageData * | inData,
|  | vtkImageData * | outData,
|  | int | extent[6],
|  | int | id
| ) | `[protected, virtual]`

| If the subclass does not define an Execute method, then the task will be broken up, multiple threads will be spawned, and each thread will call this method. It is public so that the thread functions can call this method. Reimplemented from vtkImageToImageFilter.

## Member Data Documentation

float vtkImageThreshold::UpperThreshold`[protected]`

| Definition at line 127 of file vtkImageThreshold.h.

float vtkImageThreshold::LowerThreshold`[protected]`

| Definition at line 128 of file vtkImageThreshold.h.

int vtkImageThreshold::ReplaceIn`[protected]`

| Definition at line 129 of file vtkImageThreshold.h.

float vtkImageThreshold::InValue`[protected]`

| Definition at line 130 of file vtkImageThreshold.h.

int vtkImageThreshold::ReplaceOut`[protected]`

| Definition at line 131 of file vtkImageThreshold.h.

float vtkImageThreshold::OutValue`[protected]`

| Definition at line 132 of file vtkImageThreshold.h.

int vtkImageThreshold::OutputScalarType`[protected]`

| Definition at line 134 of file vtkImageThreshold.h.

The documentation for this class was generated from the following file:

- Imaging/vtkImageThreshold.h