VMTK
vtkvmtkGrayscaleMorphologyImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3 Program: VMTK
4 Module: $RCSfile: vtkvmtkGrayscaleMorphologyImageFilter.h,v $
5 Language: C++
6 
7  Copyright (c) Luca Antiga, David Steinman. All rights reserved.
8  See LICENSE file for details.
9 
10  Portions of this code are covered under the VTK copyright.
11  See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
12  for details.
13 
14  Portions of this code are covered under the ITK copyright.
15  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm
16  for details.
17 
18  This software is distributed WITHOUT ANY WARRANTY; without even
19  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
20  PURPOSE. See the above copyright notices for more information.
21 
22 =========================================================================*/
23 
33 #ifndef __vtkvmtkGrayscaleMorphologyImageFilter_h
34 #define __vtkvmtkGrayscaleMorphologyImageFilter_h
35 
36 #include "vtkSimpleImageToImageFilter.h"
37 #include "vtkvmtkWin32Header.h"
38 
39 class VTK_VMTK_SEGMENTATION_EXPORT vtkvmtkGrayscaleMorphologyImageFilter : public vtkSimpleImageToImageFilter
40 {
41  public:
43  vtkTypeMacro(vtkvmtkGrayscaleMorphologyImageFilter, vtkSimpleImageToImageFilter);
44 
45  vtkGetVectorMacro(BallRadius,int,3);
46  vtkSetVectorMacro(BallRadius,int,3);
47 
48  vtkSetMacro(Operation,int);
49  vtkGetMacro(Operation,int);
51  { this->SetOperation(DILATE); }
53  { this->SetOperation(ERODE); }
55  { this->SetOperation(CLOSE); }
57  { this->SetOperation(OPEN); }
58 
59  enum
60  {
64  OPEN
65  };
66 
67 protected:
70 
71  virtual void SimpleExecute(vtkImageData* input, vtkImageData* output) VTK_OVERRIDE;
72  virtual int RequestInformation(vtkInformation * vtkNotUsed(request), vtkInformationVector **inputVector, vtkInformationVector *outputVector) VTK_OVERRIDE;
73 
74  int BallRadius[3];
75  int Operation;
76 
77 private:
79  void operator=(const vtkvmtkGrayscaleMorphologyImageFilter&); // Not implemented.
80 };
81 
82 #endif
83 
84 
85 
86 
Wrapper class around itk::GrayscaleMorphologyImageFilter.