VTK
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 "vtkImagingMorphologicalModule.h" // For export macro
40 #include "vtkImageAlgorithm.h"
41 
42 class vtkPoints;
43 class vtkImageData;
45 
46 class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageThresholdConnectivity :
47  public vtkImageAlgorithm
48 {
49 public:
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
59  void SetSeedPoints(vtkPoints *points);
60  vtkGetObjectMacro(SeedPoints, vtkPoints);
62 
66  void ThresholdByUpper(double thresh);
67 
71  void ThresholdByLower(double thresh);
72 
77  void ThresholdBetween(double lower, double upper);
78 
80 
83  vtkSetMacro(ReplaceIn, vtkTypeBool);
84  vtkGetMacro(ReplaceIn, vtkTypeBool);
85  vtkBooleanMacro(ReplaceIn, vtkTypeBool);
87 
89 
92  void SetInValue(double val);
93  vtkGetMacro(InValue, double);
95 
97 
100  vtkSetMacro(ReplaceOut, vtkTypeBool);
101  vtkGetMacro(ReplaceOut, vtkTypeBool);
102  vtkBooleanMacro(ReplaceOut, vtkTypeBool);
104 
106 
109  void SetOutValue(double val);
110  vtkGetMacro(OutValue, double);
112 
114 
117  vtkGetMacro(UpperThreshold, double);
118  vtkGetMacro(LowerThreshold, double);
120 
122 
125  vtkSetVector2Macro(SliceRangeX, int);
126  vtkGetVector2Macro(SliceRangeX, int);
127  vtkSetVector2Macro(SliceRangeY, int);
128  vtkGetVector2Macro(SliceRangeY, int);
129  vtkSetVector2Macro(SliceRangeZ, int);
130  vtkGetVector2Macro(SliceRangeZ, int);
132 
134 
138  virtual void SetStencilData(vtkImageStencilData *stencil);
139  vtkImageStencilData *GetStencil();
141 
143 
147  vtkSetMacro(ActiveComponent,int);
148  vtkGetMacro(ActiveComponent,int);
150 
152 
158  vtkSetVector3Macro(NeighborhoodRadius, double);
159  vtkGetVector3Macro(NeighborhoodRadius, double);
161 
163 
167  vtkSetClampMacro(NeighborhoodFraction, double, 0.0, 1.0);
168  vtkGetMacro(NeighborhoodFraction, double);
170 
174  vtkMTimeType GetMTime() override;
175 
177 
181  vtkGetMacro(NumberOfInVoxels, int);
183 
184 protected:
186  ~vtkImageThresholdConnectivity() override;
187 
190  double InValue;
191  double OutValue;
194 
195  double NeighborhoodRadius[3];
197 
199 
200  int SliceRangeX[2];
201  int SliceRangeY[2];
202  int SliceRangeZ[2];
203 
205 
207 
209 
210  void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
211 
212  int FillInputPortInformation(int port, vtkInformation *info) override;
214  vtkInformationVector *) override;
216  vtkInformationVector *) override;
217 
218 private:
220  void operator=(const vtkImageThresholdConnectivity&) = delete;
221 };
222 
223 #endif
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:39
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:189
vtkImageThresholdConnectivity::ImageMask
vtkImageData * ImageMask
Definition: vtkImageThresholdConnectivity.h:208
vtkImageThresholdConnectivity::ActiveComponent
int ActiveComponent
Definition: vtkImageThresholdConnectivity.h:206
vtkImageThresholdConnectivity::UpperThreshold
double UpperThreshold
Definition: vtkImageThresholdConnectivity.h:188
vtkImageThresholdConnectivity::ReplaceOut
vtkTypeBool ReplaceOut
Definition: vtkImageThresholdConnectivity.h:193
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkImageThresholdConnectivity::OutValue
double OutValue
Definition: vtkImageThresholdConnectivity.h:191
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:40
vtkImageThresholdConnectivity::NumberOfInVoxels
int NumberOfInVoxels
Definition: vtkImageThresholdConnectivity.h:204
vtkX3D::port
Definition: vtkX3D.h:447
vtkX3D::points
Definition: vtkX3D.h:446
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:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkImageThresholdConnectivity::InValue
double InValue
Definition: vtkImageThresholdConnectivity.h:190
vtkImageThresholdConnectivity::ReplaceIn
vtkTypeBool ReplaceIn
Definition: vtkImageThresholdConnectivity.h:192
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
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:46
vtkImageStencilData
efficient description of an image stencil
Definition: vtkImageStencilData.h:37
vtkImageThresholdConnectivity::NeighborhoodFraction
double NeighborhoodFraction
Definition: vtkImageThresholdConnectivity.h:196
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:198
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302