VTK  9.0.1
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
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:34
vtkImageThresholdConnectivity::LowerThreshold
double LowerThreshold
Definition: vtkImageThresholdConnectivity.h:185
vtkImageThresholdConnectivity::ImageMask
vtkImageData * ImageMask
Definition: vtkImageThresholdConnectivity.h:204
vtkImageThresholdConnectivity::ActiveComponent
int ActiveComponent
Definition: vtkImageThresholdConnectivity.h:202
vtkImageThresholdConnectivity::UpperThreshold
double UpperThreshold
Definition: vtkImageThresholdConnectivity.h:184
vtkImageThresholdConnectivity::ReplaceOut
vtkTypeBool ReplaceOut
Definition: vtkImageThresholdConnectivity.h:189
vtkImageThresholdConnectivity::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkImageThresholdConnectivity::GetStencil
vtkImageStencilData * GetStencil()
vtkImageThresholdConnectivity::OutValue
double OutValue
Definition: vtkImageThresholdConnectivity.h:187
vtkImageAlgorithm.h
vtkImageThresholdConnectivity::ThresholdByLower
void ThresholdByLower(double thresh)
Values less than or equal to this threshold will be filled.
vtkImageThresholdConnectivity::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:38
vtkImageThresholdConnectivity::vtkImageThresholdConnectivity
vtkImageThresholdConnectivity()
vtkImageThresholdConnectivity::NumberOfInVoxels
int NumberOfInVoxels
Definition: vtkImageThresholdConnectivity.h:200
vtkImageThresholdConnectivity::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkX3D::points
@ points
Definition: vtkX3D.h:452
vtkImageThresholdConnectivity::ComputeInputUpdateExtent
void ComputeInputUpdateExtent(int inExt[6], int outExt[6])
vtkImageThresholdConnectivity::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkImageThresholdConnectivity::ThresholdBetween
void ThresholdBetween(double lower, double upper)
Values within this range will be filled, where the range includes values that are exactly equal to th...
vtkImageThresholdConnectivity::SetOutValue
void SetOutValue(double val)
If ReplaceOut is set, outside the fill will be replaced by this value.
vtkImageThresholdConnectivity::New
static vtkImageThresholdConnectivity * New()
vtkImageThresholdConnectivity::InValue
double InValue
Definition: vtkImageThresholdConnectivity.h:186
vtkImageThresholdConnectivity::SetSeedPoints
void SetSeedPoints(vtkPoints *points)
Set the seeds.
vtkImageThresholdConnectivity::ReplaceIn
vtkTypeBool ReplaceIn
Definition: vtkImageThresholdConnectivity.h:188
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkImageThresholdConnectivity::SetInValue
void SetInValue(double val)
If ReplaceIn is set, the filled region will be replaced by this value.
vtkImageThresholdConnectivity
Flood fill an image region.
Definition: vtkImageThresholdConnectivity.h:44
vtkImageStencilData
efficient description of an image stencil
Definition: vtkImageStencilData.h:34
vtkImageThresholdConnectivity::SetStencilData
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...
vtkImageThresholdConnectivity::NeighborhoodFraction
double NeighborhoodFraction
Definition: vtkImageThresholdConnectivity.h:192
vtkImageThresholdConnectivity::~vtkImageThresholdConnectivity
~vtkImageThresholdConnectivity() override
vtkImageThresholdConnectivity::ThresholdByUpper
void ThresholdByUpper(double thresh)
Values greater than or equal to this threshold will be filled.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkImageThresholdConnectivity::GetMTime
vtkMTimeType GetMTime() override
Override the MTime to account for the seed points.
vtkImageThresholdConnectivity::SeedPoints
vtkPoints * SeedPoints
Definition: vtkImageThresholdConnectivity.h:194
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293