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) VTK_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, int);
81  vtkGetMacro(ReplaceIn, int);
82  vtkBooleanMacro(ReplaceIn, int);
84 
86 
89  void SetInValue(double val);
90  vtkGetMacro(InValue, double);
92 
94 
97  vtkSetMacro(ReplaceOut, int);
98  vtkGetMacro(ReplaceOut, int);
99  vtkBooleanMacro(ReplaceOut, int);
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() VTK_OVERRIDE;
172 
174 
178  vtkGetMacro(NumberOfInVoxels, int);
180 
181 protected:
183  ~vtkImageThresholdConnectivity() VTK_OVERRIDE;
184 
185  double UpperThreshold;
186  double LowerThreshold;
187  double InValue;
188  double OutValue;
189  int ReplaceIn;
190  int ReplaceOut;
191 
192  double NeighborhoodRadius[3];
193  double NeighborhoodFraction;
194 
195  vtkPoints *SeedPoints;
196 
197  int SliceRangeX[2];
198  int SliceRangeY[2];
199  int SliceRangeZ[2];
200 
201  int NumberOfInVoxels;
202 
203  int ActiveComponent;
204 
205  vtkImageData *ImageMask;
206 
207  void ComputeInputUpdateExtent(int inExt[6], int outExt[6]);
208 
209  int FillInputPortInformation(int port, vtkInformation *info) VTK_OVERRIDE;
210  int RequestUpdateExtent(vtkInformation *, vtkInformationVector **,
211  vtkInformationVector *) VTK_OVERRIDE;
212  int RequestData(vtkInformation *, vtkInformationVector **,
213  vtkInformationVector *) VTK_OVERRIDE;
214 
215 private:
216  vtkImageThresholdConnectivity(const vtkImageThresholdConnectivity&) VTK_DELETE_FUNCTION;
217  void operator=(const vtkImageThresholdConnectivity&) VTK_DELETE_FUNCTION;
218 };
219 
220 #endif
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:300
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:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
represent and manipulate 3D points
Definition: vtkPoints.h:33