VTK  9.6.20260224
vtkImageThreshold.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
110
111#ifndef vtkImageThreshold_h
112#define vtkImageThreshold_h
113
114#include "vtkDeprecation.h"
115#include "vtkImagingCoreModule.h" // For export macro
117
118VTK_ABI_NAMESPACE_BEGIN
119
120class VTKIMAGINGCORE_EXPORT VTK_DEPRECATED_IN_9_7_0(
121 "vtkImageThreshold is deprecated, please use vtkImageBinaryThreshold instead.") vtkImageThreshold
123{
124public:
127 void PrintSelf(ostream& os, vtkIndent indent) override;
128
132 void ThresholdByUpper(double thresh);
133
137 void ThresholdByLower(double thresh);
138
142 void ThresholdBetween(double lower, double upper);
143
145
148 vtkSetMacro(ReplaceIn, vtkTypeBool);
149 vtkGetMacro(ReplaceIn, vtkTypeBool);
150 vtkBooleanMacro(ReplaceIn, vtkTypeBool);
152
154
157 void SetInValue(double val);
158 vtkGetMacro(InValue, double);
160
162
165 vtkSetMacro(ReplaceOut, vtkTypeBool);
166 vtkGetMacro(ReplaceOut, vtkTypeBool);
167 vtkBooleanMacro(ReplaceOut, vtkTypeBool);
169
171
174 void SetOutValue(double val);
175 vtkGetMacro(OutValue, double);
177
179
182 vtkGetMacro(UpperThreshold, double);
183 vtkGetMacro(LowerThreshold, double);
185
187
190 vtkSetMacro(OutputScalarType, int);
191 vtkGetMacro(OutputScalarType, int);
204
205protected:
207 ~vtkImageThreshold() override = default;
208
212 double InValue;
214 double OutValue;
215
217
219
221 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
222 int outExt[6], int id) override;
223
224private:
225 vtkImageThreshold(const vtkImageThreshold&) = delete;
226 void operator=(const vtkImageThreshold&) = delete;
227};
228
229VTK_ABI_NAMESPACE_END
230#endif
topologically and geometrically regular array of data
void ThresholdBetween(double lower, double upper)
The values in a range (inclusive) match.
void SetOutputScalarTypeToInt()
Set the desired output scalar type to cast to.
void SetOutValue(double val)
Replace the in range pixels with this value.
void SetOutputScalarTypeToLong()
Set the desired output scalar type to cast to.
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.
static vtkImageThreshold * New()
void SetOutputScalarTypeToDouble()
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToSignedChar()
Set the desired output scalar type to cast to.
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int id) override
If the subclass does not define an Execute method, then the task will be broken up,...
void SetOutputScalarTypeToUnsignedLong()
Set the desired output scalar type to cast to.
void SetInValue(double val)
Replace the in range pixels with this value.
void SetOutputScalarTypeToShort()
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToUnsignedShort()
Set the desired output scalar type to cast to.
virtual void SetOutputScalarType(int)
Set the desired output scalar type to cast to.
void ThresholdByLower(double thresh)
The values less than or equal to the value match.
void ThresholdByUpper(double thresh)
The values greater than or equal to the value match.
void SetOutputScalarTypeToUnsignedChar()
Set the desired output scalar type to cast to.
void SetOutputScalarTypeToUnsignedInt()
Set the desired output scalar type to cast to.
~vtkImageThreshold() override=default
void SetOutputScalarTypeToFloat()
Set the desired output scalar type to cast to.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_DEPRECATED_IN_9_7_0(reason)
#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_LONG
Definition vtkType.h:41