VTK  9.1.0
vtkImageIslandRemoval2D.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageIslandRemoval2D.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 =========================================================================*/
25 #ifndef vtkImageIslandRemoval2D_h
26 #define vtkImageIslandRemoval2D_h
27 
28 #include "vtkImageAlgorithm.h"
29 #include "vtkImagingMorphologicalModule.h" // For export macro
30 
32 {
33  void* inPtr;
34  void* outPtr;
35  int idx0;
36  int idx1;
37 };
39 
40 class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageIslandRemoval2D : public vtkImageAlgorithm
41 {
42 public:
44 
49  void PrintSelf(ostream& os, vtkIndent indent) override;
51 
53 
56  vtkSetMacro(AreaThreshold, int);
57  vtkGetMacro(AreaThreshold, int);
59 
61 
64  vtkSetMacro(SquareNeighborhood, vtkTypeBool);
65  vtkGetMacro(SquareNeighborhood, vtkTypeBool);
66  vtkBooleanMacro(SquareNeighborhood, vtkTypeBool);
68 
70 
73  vtkSetMacro(IslandValue, double);
74  vtkGetMacro(IslandValue, double);
76 
78 
81  vtkSetMacro(ReplaceValue, double);
82  vtkGetMacro(ReplaceValue, double);
84 
85 protected:
87  ~vtkImageIslandRemoval2D() override = default;
88 
91  double IslandValue;
92  double ReplaceValue;
93 
95 
96 private:
98  void operator=(const vtkImageIslandRemoval2D&) = delete;
99 };
100 
101 #endif
Generic algorithm superclass for image algs.
Removes small clusters in masks.
void PrintSelf(ostream &os, vtkIndent indent) override
Constructor: Sets default filter to be identity.
~vtkImageIslandRemoval2D() override=default
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
static vtkImageIslandRemoval2D * New()
Constructor: Sets default filter to be identity.
a simple class to control print indentation
Definition: vtkIndent.h:34
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int vtkTypeBool
Definition: vtkABI.h:69