VTK
vtkImageThreshold.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageThreshold.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
26 #ifndef vtkImageThreshold_h
27 #define vtkImageThreshold_h
28 
29 
30 #include "vtkImagingCoreModule.h" // For export macro
32 
34 {
35 public:
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
41  void ThresholdByUpper(double thresh);
42 
44  void ThresholdByLower(double thresh);
45 
47  void ThresholdBetween(double lower, double upper);
48 
50 
51  vtkSetMacro(ReplaceIn, int);
52  vtkGetMacro(ReplaceIn, int);
53  vtkBooleanMacro(ReplaceIn, int);
55 
57 
58  void SetInValue(double val);
59  vtkGetMacro(InValue, double);
61 
63 
64  vtkSetMacro(ReplaceOut, int);
65  vtkGetMacro(ReplaceOut, int);
66  vtkBooleanMacro(ReplaceOut, int);
68 
70 
71  void SetOutValue(double val);
72  vtkGetMacro(OutValue, double);
74 
76 
77  vtkGetMacro(UpperThreshold, double);
78  vtkGetMacro(LowerThreshold, double);
80 
82 
83  vtkSetMacro(OutputScalarType, int);
84  vtkGetMacro(OutputScalarType, int);
86  {this->SetOutputScalarType(VTK_DOUBLE);}
88  {this->SetOutputScalarType(VTK_FLOAT);}
90  {this->SetOutputScalarType(VTK_LONG);}
92  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
94  {this->SetOutputScalarType(VTK_INT);}
96  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
98  {this->SetOutputScalarType(VTK_SHORT);}
100  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
102  {this->SetOutputScalarType(VTK_CHAR);}
104  {this->SetOutputScalarType(VTK_SIGNED_CHAR);}
106  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
108 
109 protected:
112 
116  double InValue;
118  double OutValue;
119 
121 
123 
125  vtkInformationVector **inputVector,
126  vtkInformationVector *outputVector,
127  vtkImageData ***inData, vtkImageData **outData,
128  int extent[6], int id);
129 
130 private:
131  vtkImageThreshold(const vtkImageThreshold&); // Not implemented.
132  void operator=(const vtkImageThreshold&); // Not implemented.
133 };
134 
135 #endif
136 
137 
138 
vtkImageThreshold::ThresholdByUpper
void ThresholdByUpper(double thresh)
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
vtkImageThreshold::SetOutValue
void SetOutValue(double val)
vtkImageThreshold::New
static vtkImageThreshold * New()
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkImageThreshold::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
vtkImageThreshold::ReplaceIn
int ReplaceIn
Definition: vtkImageThreshold.h:115
vtkImageThreshold::SetOutputScalarTypeToInt
void SetOutputScalarTypeToInt()
Definition: vtkImageThreshold.h:93
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkThreadedImageAlgorithm
Generic filter that has one input..
Definition: vtkThreadedImageAlgorithm.h:37
vtkImageThreshold::InValue
double InValue
Definition: vtkImageThreshold.h:116
vtkImageThreshold::ThreadedRequestData
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int id)
vtkImageThreshold::SetInValue
void SetInValue(double val)
vtkImageThreshold::SetOutputScalarTypeToSignedChar
void SetOutputScalarTypeToSignedChar()
Definition: vtkImageThreshold.h:103
vtkThreadedImageAlgorithm.h
vtkgl::val
GLuint GLfloat * val
Definition: vtkgl.h:13789
VTK_CHAR
#define VTK_CHAR
Definition: vtkType.h:26
vtkImageThreshold::SetOutputScalarTypeToUnsignedInt
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkImageThreshold.h:95
vtkImageThreshold::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:35
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:36
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
vtkImageThreshold::ThresholdBetween
void ThresholdBetween(double lower, double upper)
VTK_LONG
#define VTK_LONG
Definition: vtkType.h:33
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkImageThreshold::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkImageThreshold.h:85
vtkImageThreshold::SetOutputScalarTypeToLong
void SetOutputScalarTypeToLong()
Definition: vtkImageThreshold.h:89
vtkImageThreshold::~vtkImageThreshold
~vtkImageThreshold()
Definition: vtkImageThreshold.h:111
vtkImageThreshold::UpperThreshold
double UpperThreshold
Definition: vtkImageThreshold.h:113
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkImageThreshold
Flexible threshold.
Definition: vtkImageThreshold.h:34
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:29
vtkImageThreshold::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Definition: vtkImageThreshold.h:87
vtkImageThreshold::vtkImageThreshold
vtkImageThreshold()
vtkImageThreshold::LowerThreshold
double LowerThreshold
Definition: vtkImageThreshold.h:114
vtkImageThreshold::OutputScalarType
int OutputScalarType
Definition: vtkImageThreshold.h:120
VTK_SIGNED_CHAR
#define VTK_SIGNED_CHAR
Definition: vtkType.h:27
vtkImageThreshold::ReplaceOut
int ReplaceOut
Definition: vtkImageThreshold.h:117
vtkImageThreshold::SetOutputScalarTypeToUnsignedShort
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkImageThreshold.h:99
vtkImagingCoreModule.h
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
VTK_INT
#define VTK_INT
Definition: vtkType.h:31
VTKIMAGINGCORE_EXPORT
#define VTKIMAGINGCORE_EXPORT
Definition: vtkImagingCoreModule.h:15
vtkImageThreshold::ThresholdByLower
void ThresholdByLower(double thresh)
vtkImageThreshold::SetOutputScalarTypeToShort
void SetOutputScalarTypeToShort()
Definition: vtkImageThreshold.h:97
vtkImageThreshold::SetOutputScalarTypeToChar
void SetOutputScalarTypeToChar()
Definition: vtkImageThreshold.h:101
vtkImageThreshold::SetOutputScalarTypeToUnsignedLong
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkImageThreshold.h:91
vtkImageThreshold::SetOutputScalarTypeToUnsignedChar
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkImageThreshold.h:105
vtkImageThreshold::OutValue
double OutValue
Definition: vtkImageThreshold.h:118