MCPcopy Create free account
hub / github.com/MITK/MITK / itkClosingBinary

Method itkClosingBinary

Modules/Classification/CLUtilities/src/mitkCLUtil.cpp:340–356  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

338
339template<typename TImageType>
340void mitk::CLUtil::itkClosingBinary(TImageType * sourceImage, mitk::Image::Pointer& resultImage, int factor, MorphologicalDimensions d)
341{
342 typedef itk::BinaryBallStructuringElement<typename TImageType::PixelType, 3> BallType;
343 typedef itk::BinaryMorphologicalClosingImageFilter<TImageType, TImageType, BallType> FilterType;
344
345 BallType strElem;
346 itkFitStructuringElement(strElem,d,factor);
347
348 typename FilterType::Pointer erodeFilter = FilterType::New();
349 erodeFilter->SetKernel(strElem);
350 erodeFilter->SetInput(sourceImage);
351 erodeFilter->SetForegroundValue(1);
352 erodeFilter->Update();
353
354 mitk::CastToMitkImage(erodeFilter->GetOutput(), resultImage);
355
356}
357
358template<typename TImageType>
359void mitk::CLUtil::itkDilateBinary(TImageType * sourceImage, mitk::Image::Pointer& resultImage, int factor, MorphologicalDimensions d)

Callers

nothing calls this directly

Calls 5

CastToMitkImageFunction · 0.85
NewFunction · 0.50
SetInputMethod · 0.45
UpdateMethod · 0.45
GetOutputMethod · 0.45

Tested by

no test coverage detected