20 #include <itkBilateralImageFilter.h>
23 : m_DomainSigma(2.0f), m_RangeSigma(50.0f), m_AutoKernel(true), m_KernelRadius(1u)
35 if ((inputImage->GetDimension() > 4) || (inputImage->GetDimension() < 2))
37 MITK_ERROR <<
"mitk::BilateralFilter:GenerateData works only with 2D, 2D+t, 3D, 3D+t and 4D images, sorry."
39 itkExceptionMacro(
"mitk::BilateralFilter:GenerateData works only with 2D, 2D+t, 3D, 3D+t and 4D images, sorry.");
42 switch (inputImage->GetDimension())
64 template <
typename TPixel,
unsigned int VImageDimension>
68 typedef itk::Image<TPixel, VImageDimension> ItkImageType;
72 bilateralFilter->SetInput(itkImage);
76 bilateralFilter->SetAutomaticKernelSize(m_AutoKernel);
77 bilateralFilter->SetRadius(m_KernelRadius);
79 bilateralFilter->SetDomainSigma(m_DomainSigma);
80 bilateralFilter->SetRangeSigma(m_RangeSigma);
81 bilateralFilter->UpdateLargestPossibleRegion();
92 itkDebugMacro(<<
"GenerateOutputInformation()");
93 if (inputImage.IsNull())
itk::SmartPointer< Self > Pointer
#define AccessFixedDimensionByItk(mitkImage, itkImageTypeFunction, dimension)
Access a mitk-image with known dimension by an itk-image.
BilateralFilter()
standard constructor
virtual void GenerateOutputInformation() override
Method generating the output information of this filter (e.g. image dimension, image type...
itk::BilateralImageFilter< ItkImageType2D, ItkImageType2D > BilateralFilterType
Image class for storing images.
void ItkImageProcessing(const itk::Image< TPixel, VImageDimension > *itkImage)
Internal templated method calling the ITK bilteral filter. Here the actual filtering is performed...
~BilateralFilter()
standard destructor
void CastToMitkImage(const itk::SmartPointer< ItkOutputImageType > &itkimage, itk::SmartPointer< mitk::Image > &mitkoutputimage)
Cast an itk::Image (with a specific type) to an mitk::Image.
virtual void GenerateData() override
Method generating the output of this filter. Called in the updated process of the pipeline...
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.