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 
55  void SetSeedPoints(vtkPoints* points);
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);
135  vtkImageStencilData* GetStencil();
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:
182  ~vtkImageThresholdConnectivity() override;
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 
208  int FillInputPortInformation(int port, vtkInformation* info) override;
211 
212 private:
214  void operator=(const vtkImageThresholdConnectivity&) = delete;
215 };
216 
217 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
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
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkImageThresholdConnectivity::OutValue
double OutValue
Definition: vtkImageThresholdConnectivity.h:187
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
vtkImageThresholdConnectivity::NumberOfInVoxels
int NumberOfInVoxels
Definition: vtkImageThresholdConnectivity.h:200
vtkX3D::port
@ port
Definition: vtkX3D.h:453
vtkX3D::points
@ points
Definition: vtkX3D.h:452
vtkImageAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImageThresholdConnectivity::InValue
double InValue
Definition: vtkImageThresholdConnectivity.h:186
vtkImageThresholdConnectivity::ReplaceIn
vtkTypeBool ReplaceIn
Definition: vtkImageThresholdConnectivity.h:188
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkX3D::info
@ info
Definition: vtkX3D.h:382
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkImageThresholdConnectivity
Flood fill an image region.
Definition: vtkImageThresholdConnectivity.h:43
vtkImageStencilData
efficient description of an image stencil
Definition: vtkImageStencilData.h:33
vtkImageThresholdConnectivity::NeighborhoodFraction
double NeighborhoodFraction
Definition: vtkImageThresholdConnectivity.h:192
vtkImageAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkImageThresholdConnectivity::SeedPoints
vtkPoints * SeedPoints
Definition: vtkImageThresholdConnectivity.h:194
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293