16 #include <itkBilateralImageFilter.h> 19 : m_DomainSigma(2.0f), m_RangeSigma(50.0f), m_AutoKernel(true), m_KernelRadius(1u)
31 if ((inputImage->GetDimension() > 4) || (inputImage->GetDimension() < 2))
33 MITK_ERROR <<
"mitk::BilateralFilter:GenerateData works only with 2D, 2D+t, 3D, 3D+t and 4D images, sorry." 35 itkExceptionMacro(
"mitk::BilateralFilter:GenerateData works only with 2D, 2D+t, 3D, 3D+t and 4D images, sorry.");
38 switch (inputImage->GetDimension())
60 template <
typename TPixel,
unsigned int VImageDimension>
64 typedef itk::Image<TPixel, VImageDimension> ItkImageType;
67 typename BilateralFilterType::Pointer bilateralFilter = BilateralFilterType::New();
68 bilateralFilter->SetInput(itkImage);
77 bilateralFilter->UpdateLargestPossibleRegion();
88 itkDebugMacro(<<
"GenerateOutputInformation()");
89 if (inputImage.IsNull())
#define AccessFixedDimensionByItk(mitkImage, itkImageTypeFunction, dimension)
Access a mitk-image with known dimension by an itk-image.
BilateralFilter()
standard constructor
void GenerateOutputInformation() override
Method generating the output information of this filter (e.g. image dimension, image type...
itk::BilateralImageFilter< ItkImageType2D, ItkImageType2D > BilateralFilterType
float m_RangeSigma
Sigma of the gaussian kernel. See ITK docu.
~BilateralFilter() override
standard destructor
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...
InputImageType * GetInput(void)
void CastToMitkImage(const itk::SmartPointer< ItkOutputImageType > &itkimage, itk::SmartPointer< mitk::Image > &mitkoutputimage)
Cast an itk::Image (with a specific type) to an mitk::Image.
bool m_AutoKernel
Sigma of the range mask kernel. See ITK docu.
void GenerateData() override
Method generating the output of this filter. Called in the updated process of the pipeline...
OutputType * GetOutput()
Get the output data of this image source object.
unsigned int m_KernelRadius