VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkImageIslandRemoval2D.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00027 #ifndef __vtkImageIslandRemoval2D_h 00028 #define __vtkImageIslandRemoval2D_h 00029 00030 00031 #include "vtkImagingMorphologicalModule.h" // For export macro 00032 #include "vtkImageAlgorithm.h" 00033 00034 //BTX 00035 typedef struct{ 00036 void *inPtr; 00037 void *outPtr; 00038 int idx0; 00039 int idx1; 00040 } vtkImage2DIslandPixel; 00041 //ETX 00042 00043 class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageIslandRemoval2D : public vtkImageAlgorithm 00044 { 00045 public: 00047 00048 static vtkImageIslandRemoval2D *New(); 00049 vtkTypeMacro(vtkImageIslandRemoval2D,vtkImageAlgorithm); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00052 00054 00055 vtkSetMacro(AreaThreshold, int); 00056 vtkGetMacro(AreaThreshold, int); 00058 00060 00061 vtkSetMacro(SquareNeighborhood, int); 00062 vtkGetMacro(SquareNeighborhood, int); 00063 vtkBooleanMacro(SquareNeighborhood, int); 00065 00067 00068 vtkSetMacro(IslandValue, double); 00069 vtkGetMacro(IslandValue, double); 00071 00073 00074 vtkSetMacro(ReplaceValue, double); 00075 vtkGetMacro(ReplaceValue, double); 00077 00078 protected: 00079 vtkImageIslandRemoval2D(); 00080 ~vtkImageIslandRemoval2D() {} 00081 00082 int AreaThreshold; 00083 int SquareNeighborhood; 00084 double IslandValue; 00085 double ReplaceValue; 00086 00087 virtual int RequestData(vtkInformation *, 00088 vtkInformationVector **, 00089 vtkInformationVector *); 00090 00091 private: 00092 vtkImageIslandRemoval2D(const vtkImageIslandRemoval2D&); // Not implemented. 00093 void operator=(const vtkImageIslandRemoval2D&); // Not implemented. 00094 }; 00095 00096 #endif 00097 00098 00099