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 =========================================================================*/
33 #ifndef vtkImageThresholdConnectivity_h
34 #define vtkImageThresholdConnectivity_h
35 
36 #include "vtkImagingMorphologicalModule.h" // For export macro
37 #include "vtkImageAlgorithm.h"
38 
39 class vtkPoints;
40 class vtkImageData;
42 
43 class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageThresholdConnectivity :
44  public vtkImageAlgorithm
45 {
46 public:
49  void PrintSelf(ostream& os, vtkIndent indent) override;
50 
52 
56  void SetSeedPoints(vtkPoints *points);
57  vtkGetObjectMacro(SeedPoints, vtkPoints);
59 
63  void ThresholdByUpper(double thresh);
64 
68  void ThresholdByLower(double thresh);
69 
74  void ThresholdBetween(double lower, double upper);
75 
77 
80  vtkSetMacro(ReplaceIn, vtkTypeBool);
81  vtkGetMacro(ReplaceIn, vtkTypeBool);
82  vtkBooleanMacro(ReplaceIn, vtkTypeBool);
84 
86 
89  void SetInValue(double val);
90  vtkGetMacro(InValue, double);
92 
94 
97  vtkSetMacro(ReplaceOut, vtkTypeBool);
98  vtkGetMacro(ReplaceOut, vtkTypeBool);
99  vtkBooleanMacro(ReplaceOut, vtkTypeBool);
101 
103 
106  void SetOutValue(double val);
107  vtkGetMacro(OutValue, double);
109 
111 
114  vtkGetMacro(UpperThreshold, double);
115  vtkGetMacro(LowerThreshold, double);
117 
119 
122  vtkSetVector2Macro(SliceRangeX, int);
123  vtkGetVector2Macro(SliceRangeX, int);
124  vtkSetVector2Macro(SliceRangeY, int);
125  vtkGetVector2Macro(SliceRangeY, int);
126  vtkSetVector2Macro(SliceRangeZ, int);
127  vtkGetVector2Macro(SliceRangeZ, int);
129 
131 
135  virtual void SetStencilData(vtkImageStencilData *stencil);
136  vtkImageStencilData *GetStencil();
138 
140 
144  vtkSetMacro(ActiveComponent,int);
145  vtkGetMacro(ActiveComponent,int);
147 
149 
155  vtkSetVector3Macro(NeighborhoodRadius, double);
156  vtkGetVector3Macro(NeighborhoodRadius, double);
158 
160 
164  vtkSetClampMacro(NeighborhoodFraction, double, 0.0, 1.0);
165  vtkGetMacro(NeighborhoodFraction, double);
167 
171  vtkMTimeType GetMTime() override;
172 
174 
178  vtkGetMacro(NumberOfInVoxels, int);
180 
181 protected:
183  ~vtkImageThresholdConnectivity() override;
184 
187  double InValue;
188  double OutValue;
191 
192  double NeighborhoodRadius[3];
194 
196 
197  int SliceRangeX[2];
198  int SliceRangeY[2];
199  int SliceRangeZ[2];
200 
202 
204 
206 
207  void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
208 
209  int FillInputPortInformation(int port, vtkInformation *info) override;
211  vtkInformationVector *) override;
213  vtkInformationVector *) override;
214 
215 private:
217  void operator=(const vtkImageThresholdConnectivity&) = delete;
218 };
219 
220 #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:186
vtkImageThresholdConnectivity::ImageMask
vtkImageData * ImageMask
Definition: vtkImageThresholdConnectivity.h:205
vtkImageThresholdConnectivity::ActiveComponent
int ActiveComponent
Definition: vtkImageThresholdConnectivity.h:203
vtkImageThresholdConnectivity::UpperThreshold
double UpperThreshold
Definition: vtkImageThresholdConnectivity.h:185
vtkImageThresholdConnectivity::ReplaceOut
vtkTypeBool ReplaceOut
Definition: vtkImageThresholdConnectivity.h:190
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkImageThresholdConnectivity::OutValue
double OutValue
Definition: vtkImageThresholdConnectivity.h:188
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:37
vtkImageThresholdConnectivity::NumberOfInVoxels
int NumberOfInVoxels
Definition: vtkImageThresholdConnectivity.h:201
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:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImageThresholdConnectivity::InValue
double InValue
Definition: vtkImageThresholdConnectivity.h:187
vtkImageThresholdConnectivity::ReplaceIn
vtkTypeBool ReplaceIn
Definition: vtkImageThresholdConnectivity.h:189
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:80
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:43
vtkImageStencilData
efficient description of an image stencil
Definition: vtkImageStencilData.h:34
vtkImageThresholdConnectivity::NeighborhoodFraction
double NeighborhoodFraction
Definition: vtkImageThresholdConnectivity.h:193
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:195
vtkMTimeType
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302