VTK  9.6.20260220
vtkImageBinaryThreshold.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
17
18#ifndef vtkImageBinaryThreshold_h
19#define vtkImageBinaryThreshold_h
20
21#include "vtkImagingCoreModule.h" // For export macro
23
24VTK_ABI_NAMESPACE_BEGIN
25
26class VTKIMAGINGCORE_EXPORT vtkImageBinaryThreshold : public vtkThreadedImageAlgorithm
27{
28public:
31 void PrintSelf(ostream& os, vtkIndent indent) override;
32
34
38 vtkSetMacro(ReplaceIn, bool);
39 vtkGetMacro(ReplaceIn, bool);
40 vtkBooleanMacro(ReplaceIn, bool);
42
44
48 vtkSetMacro(InValue, double);
49 vtkGetMacro(InValue, double);
51
53
57 vtkSetMacro(ReplaceOut, bool);
58 vtkGetMacro(ReplaceOut, bool);
59 vtkBooleanMacro(ReplaceOut, bool);
61
63
67 vtkSetMacro(OutValue, double);
68 vtkGetMacro(OutValue, double);
70
72
76 vtkSetMacro(UpperThreshold, double);
77 vtkGetMacro(UpperThreshold, double);
79
81
85 vtkSetMacro(LowerThreshold, double);
86 vtkGetMacro(LowerThreshold, double);
88
105
107
111 vtkSetMacro(ThresholdFunction, int);
112 vtkGetMacro(ThresholdFunction, int);
114
116
122 vtkSetMacro(OutputScalarType, int);
123 vtkGetMacro(OutputScalarType, int);
136
137protected:
139 ~vtkImageBinaryThreshold() override = default;
140
146
154 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
155 int outExt[6], int id) override;
156
157private:
159 void operator=(const vtkImageBinaryThreshold&) = delete;
160
162 double UpperThreshold = VTK_FLOAT_MAX;
163 double LowerThreshold = VTK_FLOAT_MIN;
164 bool ReplaceIn = false;
165 double InValue = 0.0;
166 bool ReplaceOut = false;
167 double OutValue = 0.0;
168
169 int OutputScalarType = -1; // invalid; output same as input
170};
171
172VTK_ABI_NAMESPACE_END
173#endif // vtkImageBinaryThreshold_h
vtkImageBinaryThreshold()=default
virtual void SetOutputScalarType(int)
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToUnsignedChar()
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToLong()
Set the desired output scalar type to cast to.
~vtkImageBinaryThreshold() override=default
void SetOutputScalarTypeToUnsignedInt()
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToUnsignedShort()
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToSignedChar()
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToShort()
Set the desired output scalar type to cast to.
static vtkImageBinaryThreshold * New()
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Set the output scalar type to the given OutputScalarType.
void SetOutputScalarTypeToUnsignedLong()
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToDouble()
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToFloat()
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToInt()
Set the desired output scalar type to cast to.
ThresholdFunction
Describe the behavior of the threshold:
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int id) override
This method passes input and output data, and executes the filter algorithm to fill the output from t...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetOutputScalarTypeToChar()
Set the desired output scalar type to cast to.
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
#define VTK_SHORT
Definition vtkType.h:37
#define VTK_UNSIGNED_INT
Definition vtkType.h:40
#define VTK_DOUBLE
Definition vtkType.h:44
#define VTK_UNSIGNED_CHAR
Definition vtkType.h:36
#define VTK_UNSIGNED_SHORT
Definition vtkType.h:38
#define VTK_INT
Definition vtkType.h:39
#define VTK_SIGNED_CHAR
Definition vtkType.h:35
#define VTK_FLOAT
Definition vtkType.h:43
#define VTK_CHAR
Definition vtkType.h:34
#define VTK_UNSIGNED_LONG
Definition vtkType.h:42
#define VTK_FLOAT_MIN
Definition vtkType.h:199
#define VTK_LONG
Definition vtkType.h:41
#define VTK_FLOAT_MAX
Definition vtkType.h:200