1 /*========================================================================= 2 3 Program: Visualization Toolkit 4 Module: vtkImageContinuousErode3D.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 =========================================================================*/ 15 /** 16 * @class vtkImageContinuousErode3D 17 * @brief Erosion implemented as a minimum. 18 * 19 * vtkImageContinuousErode3D replaces a pixel with the minimum over 20 * an ellipsoidal neighborhood. If KernelSize of an axis is 1, no processing 21 * is done on that axis. 22 */ 23 24 #ifndef vtkImageContinuousErode3D_h 25 #define vtkImageContinuousErode3D_h 26 27 28 #include "vtkImagingMorphologicalModule.h" // For export macro 29 #include "vtkImageSpatialAlgorithm.h" 30 31 class vtkImageEllipsoidSource; 32 33 class VTKIMAGINGMORPHOLOGICAL_EXPORT vtkImageContinuousErode3D : public vtkImageSpatialAlgorithm 34 { 35 public: 36 //@{ 37 /** 38 * Construct an instance of vtkImageContinuousErode3D filter. 39 * By default zero values are eroded. 40 */ 41 static vtkImageContinuousErode3D *New(); 42 vtkTypeMacro(vtkImageContinuousErode3D,vtkImageSpatialAlgorithm); 43 void PrintSelf(ostream& os, vtkIndent indent) override; 44 //@} 45 46 /** 47 * This method sets the size of the neighborhood. It also sets the 48 * default middle of the neighborhood and computes the elliptical foot print. 49 */ 50 void SetKernelSize(int size0, int size1, int size2); 51 52 protected: 53 vtkImageContinuousErode3D(); 54 ~vtkImageContinuousErode3D() override; 55 56 vtkImageEllipsoidSource *Ellipse; 57 58 void ThreadedRequestData(vtkInformation *request, 59 vtkInformationVector **inputVector, 60 vtkInformationVector *outputVector, 61 vtkImageData ***inData, vtkImageData **outData, 62 int extent[6], int id) override; 63 int RequestData(vtkInformation *request, 64 vtkInformationVector **inputVector, 65 vtkInformationVector *outputVector) override; 66 67 private: 68 vtkImageContinuousErode3D(const vtkImageContinuousErode3D&) = delete; 69 void operator=(const vtkImageContinuousErode3D&) = delete; 70 }; 71 72 #endif 73