12#ifndef mitkToFCompositeFilter_h
13#define mitkToFCompositeFilter_h
16#include "mitkImageToImageFilter.h"
17#include <MitkToFProcessingExports.h>
18#include <itkBilateralImageFilter.h>
19#include <opencv2/core/types_c.h>
61 using itk::ProcessObject::SetInput;
67 void SetInput(
const InputImageType* distanceImage)
override;
74 void SetInput(
unsigned int idx,
const InputImageType* distanceImage)
override;
84 Image* GetInput(
unsigned int idx);
89 void SetTemporalMedianFilterParameter(
int tmporalMedianFilterNumOfFrames);
95 void SetThresholdFilterParameter(
int min,
int max);
102 void SetBilateralFilterParameter(
double domainSigma,
double rangeSigma,
int kernelRadius);
113 void GenerateOutputInformation()
override;
118 void GenerateData()
override;
126 void CreateOutputsForAllInputs();
132 void ProcessSegmentation(IplImage* inputIplImage);
136 ItkImageType2D::Pointer ProcessItkBilateralFilter(ItkImageType2D::Pointer inputItkImage);
140 void ProcessCVBilateralFilter(IplImage* inputIplImage, IplImage* outputIplImage);
144 void ProcessCVMedianFilter(IplImage* inputIplImage, IplImage* outputIplImage,
int radius = 3);
148 void ProcessStreamedQuickSelectMedianImageFilter(IplImage* inputIplImage);
156 float quick_select(
float arr[],
int n);
160 void CreateItkImage(ItkImageType2D::Pointer &itkInputImage);
Applies a common filter-pipeline to the first input of this filter.
itkSetMacro(SegmentationMask, mitk::Image::Pointer)
IplImage * m_IplOutputImage
OpenCV-representation of the output image.
int m_ThresholdFilterMin
Lower threshold of the threshold filter. Pixels with values below will be assigned value 0 when apply...
itkGetConstMacro(ApplyBilateralFilter, bool)
bool m_ApplyMedianFilter
Flag indicating if the spatial median filter is currently active for processing the distance image.
itkSetMacro(ApplyBilateralFilter, bool)
itkGetConstMacro(ApplyAverageFilter, bool)
itkSetMacro(ApplyThresholdFilter, bool)
bool m_ApplyAverageFilter
Flag indicating if the average filter is currently active for processing the distance image.
itkGetConstMacro(ApplyThresholdFilter, bool)
int m_ThresholdFilterMax
Lower threshold of the threshold filter. Pixels with values above will be assigned value 0 when apply...
itkSetMacro(ApplyAverageFilter, bool)
mitkClassMacro(ToFCompositeFilter, ImageToImageFilter)
int m_ImageHeight
y-dimension of the image
itkGetConstMacro(ApplyTemporalMedianFilter, bool)
int m_BilateralFilterKernelRadius
Kernel radius of the bilateral filter mask.
double m_BilateralFilterDomainSigma
Parameter of the bilateral filter controlling the smoothing effect of the filter. Default value: 2.
int m_ImageWidth
x-dimension of the image
itkGetConstMacro(ApplyMedianFilter, bool)
itkSetMacro(ApplyMaskSegmentation, bool)
bool m_ApplyMaskSegmentation
Flag indicating if a mask segmentation is performed.
float ** m_DataBuffer
Buffer used for calculating the pixel-wise median over the last n (m_TemporalMedianFilterNumOfFrames)...
IplImage * m_IplDistanceImage
OpenCV-representation of the distance image.
ItkImageType2D::Pointer m_ItkInputImage
ITK representation of the distance image.
int m_DataBufferMaxSize
Maximal size for the buffer of the temporal median filter (m_DataBuffer)
itkGetConstMacro(ApplyMaskSegmentation, bool)
bool m_ApplyBilateralFilter
Flag indicating if the bilateral filter is currently active for processing the distance image.
double m_BilateralFilterRangeSigma
Parameter of the bilateral filter controlling the edge preserving effect of the filter....
bool m_ApplyTemporalMedianFilter
Flag indicating if the temporal median filter is currently active for processing the distance image.
itkSetMacro(ApplyTemporalMedianFilter, bool)
int m_ImageSize
size of the image in bytes
int m_TemporalMedianFilterNumOfFrames
Number of frames to be used in the calculation of the temporal median.
mitk::Image::Pointer m_SegmentationMask
mask image used for segmenting the image
bool m_ApplyThresholdFilter
Flag indicating if the threshold filter is currently active for processing the distance image.
itkSetMacro(ApplyMedianFilter, bool)
itkFactorylessNewMacro(Self)
int m_DataBufferCurrentIndex
Current index in the buffer of the temporal median filter.
itk::Image< float, 3 > ItkImageType3D
itk::Image< float, 2 > ItkImageType2D
itk::BilateralImageFilter< ItkImageType2D, ItkImageType2D > BilateralFilterType