VTK  9.6.20260404
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
116
117#ifndef vtkImageBinaryThreshold_h
118#define vtkImageBinaryThreshold_h
119
120#include "vtkImagingCoreModule.h" // For export macro
122
123VTK_ABI_NAMESPACE_BEGIN
124
125class VTKIMAGINGCORE_EXPORT vtkImageBinaryThreshold : public vtkThreadedImageAlgorithm
126{
127public:
130 void PrintSelf(ostream& os, vtkIndent indent) override;
131
133
137 vtkSetMacro(ReplaceIn, bool);
138 vtkGetMacro(ReplaceIn, bool);
139 vtkBooleanMacro(ReplaceIn, bool);
141
143
147 vtkSetMacro(InValue, double);
148 vtkGetMacro(InValue, double);
150
152
156 vtkSetMacro(ReplaceOut, bool);
157 vtkGetMacro(ReplaceOut, bool);
158 vtkBooleanMacro(ReplaceOut, bool);
160
162
166 vtkSetMacro(OutValue, double);
167 vtkGetMacro(OutValue, double);
169
171
175 vtkSetMacro(UpperThreshold, double);
176 vtkGetMacro(UpperThreshold, double);
178
180
184 vtkSetMacro(LowerThreshold, double);
185 vtkGetMacro(LowerThreshold, double);
187
204
206
210 vtkSetMacro(ThresholdFunction, int);
211 vtkGetMacro(ThresholdFunction, int);
213
215
221 vtkSetMacro(OutputScalarType, int);
222 vtkGetMacro(OutputScalarType, int);
235
236protected:
238 ~vtkImageBinaryThreshold() override = default;
239
245
253 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
254 int outExt[6], int id) override;
255
256private:
258 void operator=(const vtkImageBinaryThreshold&) = delete;
259
261 double UpperThreshold = VTK_FLOAT_MAX;
262 double LowerThreshold = VTK_FLOAT_MIN;
263 bool ReplaceIn = false;
264 double InValue = 0.0;
265 bool ReplaceOut = false;
266 double OutValue = 0.0;
267
268 int OutputScalarType = -1; // invalid; output same as input
269};
270
271VTK_ABI_NAMESPACE_END
272#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