VTK  9.3.20240423
vtkImageThresholdConnectivity.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
24#ifndef vtkImageThresholdConnectivity_h
25#define vtkImageThresholdConnectivity_h
26
27#include "vtkImageAlgorithm.h"
28#include "vtkImagingMorphologicalModule.h" // For export macro
29
30VTK_ABI_NAMESPACE_BEGIN
31class vtkPoints;
32class vtkImageData;
34
35class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageThresholdConnectivity : public vtkImageAlgorithm
36{
37public:
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
43
47 void SetSeedPoints(vtkPoints* points);
48 vtkGetObjectMacro(SeedPoints, vtkPoints);
50
54 void ThresholdByUpper(double thresh);
55
59 void ThresholdByLower(double thresh);
60
65 void ThresholdBetween(double lower, double upper);
66
68
71 vtkSetMacro(ReplaceIn, vtkTypeBool);
72 vtkGetMacro(ReplaceIn, vtkTypeBool);
73 vtkBooleanMacro(ReplaceIn, vtkTypeBool);
75
77
80 void SetInValue(double val);
81 vtkGetMacro(InValue, double);
83
85
88 vtkSetMacro(ReplaceOut, vtkTypeBool);
89 vtkGetMacro(ReplaceOut, vtkTypeBool);
90 vtkBooleanMacro(ReplaceOut, vtkTypeBool);
92
94
97 void SetOutValue(double val);
98 vtkGetMacro(OutValue, double);
100
102
105 vtkGetMacro(UpperThreshold, double);
106 vtkGetMacro(LowerThreshold, double);
108
110
113 vtkSetVector2Macro(SliceRangeX, int);
114 vtkGetVector2Macro(SliceRangeX, int);
115 vtkSetVector2Macro(SliceRangeY, int);
116 vtkGetVector2Macro(SliceRangeY, int);
117 vtkSetVector2Macro(SliceRangeZ, int);
118 vtkGetVector2Macro(SliceRangeZ, int);
120
122
126 virtual void SetStencilData(vtkImageStencilData* stencil);
129
131
135 vtkSetMacro(ActiveComponent, int);
136 vtkGetMacro(ActiveComponent, int);
138
140
146 vtkSetVector3Macro(NeighborhoodRadius, double);
147 vtkGetVector3Macro(NeighborhoodRadius, double);
149
151
155 vtkSetClampMacro(NeighborhoodFraction, double, 0.0, 1.0);
156 vtkGetMacro(NeighborhoodFraction, double);
158
163
165
169 vtkGetMacro(NumberOfInVoxels, int);
171
172protected:
175
178 double InValue;
179 double OutValue;
182
183 double NeighborhoodRadius[3];
185
187
188 int SliceRangeX[2];
189 int SliceRangeY[2];
190 int SliceRangeZ[2];
191
193
195
197
198 void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
199
200 int FillInputPortInformation(int port, vtkInformation* info) override;
203
204private:
206 void operator=(const vtkImageThresholdConnectivity&) = delete;
207};
208
209VTK_ABI_NAMESPACE_END
210#endif
Generic algorithm superclass for image algs.
topologically and geometrically regular array of data
efficient description of an image stencil
virtual void SetStencilData(vtkImageStencilData *stencil)
Specify a stencil that will be used to limit the flood fill to an arbitrarily-shaped region of the im...
void SetOutValue(double val)
If ReplaceOut is set, outside the fill will be replaced by this value.
~vtkImageThresholdConnectivity() override
void SetSeedPoints(vtkPoints *points)
Set the seeds.
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
void ComputeInputUpdateExtent(int inExt[6], int outExt[6])
void ThresholdByLower(double thresh)
Values less than or equal to this threshold will be filled.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
void SetInValue(double val)
If ReplaceIn is set, the filled region will be replaced by this value.
void ThresholdBetween(double lower, double upper)
Values within this range will be filled, where the range includes values that are exactly equal to th...
vtkImageStencilData * GetStencil()
Specify a stencil that will be used to limit the flood fill to an arbitrarily-shaped region of the im...
vtkMTimeType GetMTime() override
Override the MTime to account for the seed points.
void ThresholdByUpper(double thresh)
Values greater than or equal to this threshold will be filled.
static vtkImageThresholdConnectivity * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:139
int vtkTypeBool
Definition vtkABI.h:64
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270