VTK  9.0.2
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 =========================================================================*/
33 #ifndef vtkImageThresholdConnectivity_h
34 #define vtkImageThresholdConnectivity_h
35 
36 #include "vtkImageAlgorithm.h"
37 #include "vtkImagingMorphologicalModule.h" // For export macro
38 
39 class vtkPoints;
40 class vtkImageData;
42 
43 class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageThresholdConnectivity : public vtkImageAlgorithm
44 {
45 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
56  vtkGetObjectMacro(SeedPoints, vtkPoints);
58 
62  void ThresholdByUpper(double thresh);
63 
67  void ThresholdByLower(double thresh);
68 
73  void ThresholdBetween(double lower, double upper);
74 
76 
79  vtkSetMacro(ReplaceIn, vtkTypeBool);
80  vtkGetMacro(ReplaceIn, vtkTypeBool);
81  vtkBooleanMacro(ReplaceIn, vtkTypeBool);
83 
85 
88  void SetInValue(double val);
89  vtkGetMacro(InValue, double);
91 
93 
96  vtkSetMacro(ReplaceOut, vtkTypeBool);
97  vtkGetMacro(ReplaceOut, vtkTypeBool);
98  vtkBooleanMacro(ReplaceOut, vtkTypeBool);
100 
102 
105  void SetOutValue(double val);
106  vtkGetMacro(OutValue, double);
108 
110 
113  vtkGetMacro(UpperThreshold, double);
114  vtkGetMacro(LowerThreshold, double);
116 
118 
121  vtkSetVector2Macro(SliceRangeX, int);
122  vtkGetVector2Macro(SliceRangeX, int);
123  vtkSetVector2Macro(SliceRangeY, int);
124  vtkGetVector2Macro(SliceRangeY, int);
125  vtkSetVector2Macro(SliceRangeZ, int);
126  vtkGetVector2Macro(SliceRangeZ, int);
128 
130 
134  virtual void SetStencilData(vtkImageStencilData* stencil);
137 
139 
143  vtkSetMacro(ActiveComponent, int);
144  vtkGetMacro(ActiveComponent, int);
146 
148 
154  vtkSetVector3Macro(NeighborhoodRadius, double);
155  vtkGetVector3Macro(NeighborhoodRadius, double);
157 
159 
163  vtkSetClampMacro(NeighborhoodFraction, double, 0.0, 1.0);
164  vtkGetMacro(NeighborhoodFraction, double);
166 
170  vtkMTimeType GetMTime() override;
171 
173 
177  vtkGetMacro(NumberOfInVoxels, int);
179 
180 protected:
183 
186  double InValue;
187  double OutValue;
190 
191  double NeighborhoodRadius[3];
193 
195 
196  int SliceRangeX[2];
197  int SliceRangeY[2];
198  int SliceRangeZ[2];
199 
201 
203 
205 
206  void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
207 
211 
212 private:
214  void operator=(const vtkImageThresholdConnectivity&) = delete;
215 };
216 
217 #endif
Generic algorithm superclass for image algs.
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
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...
vtkImageStencilData * GetStencil()
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
Fill the input port information objects for this algorithm.
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.
static vtkImageThresholdConnectivity * New()
void ThresholdBetween(double lower, double upper)
Values within this range will be filled, where the range includes values that are exactly equal to th...
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.
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:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:34
@ points
Definition: vtkX3D.h:452
@ info
Definition: vtkX3D.h:382
@ port
Definition: vtkX3D.h:453
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293