VTK  9.2.6
vtkImageThresholdConnectivity.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImageThresholdConnectivity.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
35
36#ifndef vtkImageThresholdConnectivity_h
37#define vtkImageThresholdConnectivity_h
38
39#include "vtkImageAlgorithm.h"
40#include "vtkImagingMorphologicalModule.h" // For export macro
41
42class vtkPoints;
43class vtkImageData;
45
46class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageThresholdConnectivity : public vtkImageAlgorithm
47{
48public:
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
54
58 void SetSeedPoints(vtkPoints* points);
59 vtkGetObjectMacro(SeedPoints, vtkPoints);
61
65 void ThresholdByUpper(double thresh);
66
70 void ThresholdByLower(double thresh);
71
76 void ThresholdBetween(double lower, double upper);
77
79
82 vtkSetMacro(ReplaceIn, vtkTypeBool);
83 vtkGetMacro(ReplaceIn, vtkTypeBool);
84 vtkBooleanMacro(ReplaceIn, vtkTypeBool);
86
88
91 void SetInValue(double val);
92 vtkGetMacro(InValue, double);
94
96
99 vtkSetMacro(ReplaceOut, vtkTypeBool);
100 vtkGetMacro(ReplaceOut, vtkTypeBool);
101 vtkBooleanMacro(ReplaceOut, vtkTypeBool);
103
105
108 void SetOutValue(double val);
109 vtkGetMacro(OutValue, double);
111
113
116 vtkGetMacro(UpperThreshold, double);
117 vtkGetMacro(LowerThreshold, double);
119
121
124 vtkSetVector2Macro(SliceRangeX, int);
125 vtkGetVector2Macro(SliceRangeX, int);
126 vtkSetVector2Macro(SliceRangeY, int);
127 vtkGetVector2Macro(SliceRangeY, int);
128 vtkSetVector2Macro(SliceRangeZ, int);
129 vtkGetVector2Macro(SliceRangeZ, int);
131
133
137 virtual void SetStencilData(vtkImageStencilData* stencil);
140
142
146 vtkSetMacro(ActiveComponent, int);
147 vtkGetMacro(ActiveComponent, int);
149
151
157 vtkSetVector3Macro(NeighborhoodRadius, double);
158 vtkGetVector3Macro(NeighborhoodRadius, double);
160
162
166 vtkSetClampMacro(NeighborhoodFraction, double, 0.0, 1.0);
167 vtkGetMacro(NeighborhoodFraction, double);
169
174
176
180 vtkGetMacro(NumberOfInVoxels, int);
182
183protected:
186
189 double InValue;
190 double OutValue;
193
196
198
202
204
206
208
209 void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
210
211 int FillInputPortInformation(int port, vtkInformation* info) override;
214
215private:
217 void operator=(const vtkImageThresholdConnectivity&) = delete;
218};
219
220#endif
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:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:40
int vtkTypeBool
Definition vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:287