VTK  9.7.0
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
11
12#ifndef vtkImageThreshold_h
13#define vtkImageThreshold_h
14
15#include "vtkDeprecation.h"
16#include "vtkImagingCoreModule.h" // For export macro
18
19VTK_ABI_NAMESPACE_BEGIN
20
21class VTKIMAGINGCORE_EXPORT VTK_DEPRECATED_IN_9_7_0(
22 "vtkImageThreshold is deprecated, please use vtkImageBinaryThreshold instead.") vtkImageThreshold
24{
25public:
28 void PrintSelf(ostream& os, vtkIndent indent) override;
29
33 void ThresholdByUpper(double thresh);
34
38 void ThresholdByLower(double thresh);
39
43 void ThresholdBetween(double lower, double upper);
44
46
49 vtkSetMacro(ReplaceIn, vtkTypeBool);
50 vtkGetMacro(ReplaceIn, vtkTypeBool);
51 vtkBooleanMacro(ReplaceIn, vtkTypeBool);
53
55
58 void SetInValue(double val);
59 vtkGetMacro(InValue, double);
61
63
66 vtkSetMacro(ReplaceOut, vtkTypeBool);
67 vtkGetMacro(ReplaceOut, vtkTypeBool);
68 vtkBooleanMacro(ReplaceOut, vtkTypeBool);
70
72
75 void SetOutValue(double val);
76 vtkGetMacro(OutValue, double);
78
80
83 vtkGetMacro(UpperThreshold, double);
84 vtkGetMacro(LowerThreshold, double);
86
88
91 vtkSetMacro(OutputScalarType, int);
92 vtkGetMacro(OutputScalarType, int);
105
106protected:
108 ~vtkImageThreshold() override = default;
109
113 double InValue;
115 double OutValue;
116
118
120
122 vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
123 VTK_FUTURE_CONST int outExt[6], int id) override;
124
125private:
126 vtkImageThreshold(const vtkImageThreshold&) = delete;
127 void operator=(const vtkImageThreshold&) = delete;
128};
129
130VTK_ABI_NAMESPACE_END
131#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 ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, VTK_FUTURE_CONST int outExt[6], int id) override
If the subclass does not define an Execute method, then the task will be broken up,...
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 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:29
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