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
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:293
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:33
efficient description of an image stencil
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
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:33