17 #ifndef mitkMorphologicalOperations_h
18 #define mitkMorphologicalOperations_h
47 static void Closing(
mitk::Image::Pointer &image,
int factor, StructuralElementType structuralElement);
48 static void Erode(
mitk::Image::Pointer &image,
int factor, StructuralElementType structuralElement);
49 static void Dilate(
mitk::Image::Pointer &image,
int factor, StructuralElementType structuralElement);
50 static void Opening(
mitk::Image::Pointer &image,
int factor, StructuralElementType structuralElement);
57 template <
class TStructuringElement>
58 static TStructuringElement CreateStructuringElement(StructuralElementType structuralElementFlag,
int factor)
60 TStructuringElement strElem;
61 typename TStructuringElement::SizeType size;
63 switch (structuralElementFlag)
67 size.SetElement(0, factor);
68 size.SetElement(1, factor);
72 size.SetElement(0, factor);
73 size.SetElement(2, factor);
77 size.SetElement(1, factor);
78 size.SetElement(2, factor);
86 strElem.SetRadius(size);
87 strElem.CreateStructuringElement();
94 template <
typename TPixel,
unsigned int VDimension>
95 void static itkClosing(itk::Image<TPixel, VDimension> *sourceImage,
98 StructuralElementType structuralElement);
100 template <
typename TPixel,
unsigned int VDimension>
101 void static itkErode(itk::Image<TPixel, VDimension> *sourceImage,
104 StructuralElementType structuralElement);
106 template <
typename TPixel,
unsigned int VDimension>
107 void static itkDilate(itk::Image<TPixel, VDimension> *sourceImage,
110 StructuralElementType structuralElement);
112 template <
typename TPixel,
unsigned int VDimension>
113 void static itkOpening(itk::Image<TPixel, VDimension> *sourceImage,
116 StructuralElementType structuralElement);
118 template <
typename TPixel,
unsigned int VDimension>
119 void static itkFillHoles(itk::Image<TPixel, VDimension> *sourceImage,
mitk::Image::Pointer &resultImage);
Encapsulates several morphological operations that can be performed on segmentations.
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.