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 =========================================================================*/
36 #ifndef vtkImageThresholdConnectivity_h
37 #define vtkImageThresholdConnectivity_h
38 
39 #include "vtkImageAlgorithm.h"
40 #include "vtkImagingMorphologicalModule.h" // For export macro
41 
42 class vtkPoints;
43 class vtkImageData;
45 
46 class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageThresholdConnectivity : public vtkImageAlgorithm
47 {
48 public:
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);
138  vtkImageStencilData* GetStencil();
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 
173  vtkMTimeType GetMTime() override;
174 
176 
180  vtkGetMacro(NumberOfInVoxels, int);
182 
183 protected:
185  ~vtkImageThresholdConnectivity() override;
186 
189  double InValue;
190  double OutValue;
193 
194  double NeighborhoodRadius[3];
196 
198 
199  int SliceRangeX[2];
200  int SliceRangeY[2];
201  int SliceRangeZ[2];
202 
204 
206 
208 
209  void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
210 
211  int FillInputPortInformation(int port, vtkInformation* info) override;
214 
215 private:
217  void operator=(const vtkImageThresholdConnectivity&) = delete;
218 };
219 
220 #endif
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
int vtkTypeBool
Definition: vtkABI.h:69
a simple class to control print indentation
Definition: vtkIndent.h:39
efficient description of an image stencil
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
virtual vtkMTimeType GetMTime()
Return this object's modified time.
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
represent and manipulate 3D points
Definition: vtkPoints.h:39