+
+}
+//--------------------------------------------------------------------
+
+
+//--------------------------------------------------------------------
+// Update with the number of dimensions and the pixeltype
+//--------------------------------------------------------------------
+template<class args_info_type>
+template<class InputImageType>
+void
+MedianImageGenericFilter<args_info_type>::UpdateWithInputImageType()
+{
+ // Reading input
+ typename InputImageType::Pointer input = this->template GetInput<InputImageType>(0);
+ // Typedef
+ typedef typename InputImageType::PixelType PixelType;
+
+ // typedef itk::Image<PixelType,InputImageType::ImageDimension> OutputImageType;
+
+ // Main filter
+ typedef itk::Image<PixelType, InputImageType::ImageDimension> OutputImageType;
+ typename InputImageType::SizeType indexRadius;
+
+ // Filter
+ typedef itk::MedianImageFilter<InputImageType, OutputImageType> MedianImageFilterType;
+ typename MedianImageFilterType::Pointer thresholdFilter=MedianImageFilterType::New();
+ thresholdFilter->SetInput(input);
+
+ indexRadius[0]=mArgsInfo.radius_arg[0];
+ indexRadius[1]=mArgsInfo.radius_arg[1];
+ indexRadius[2]=mArgsInfo.radius_arg[2];
+
+ // indexRadius[0] = 1;
+ // indexRadius[1] = 1;
+
+ thresholdFilter->SetRadius( indexRadius );
+
+ typename OutputImageType::Pointer outputImage = thresholdFilter->GetOutput();
+ thresholdFilter->Update();
+
+ // Write/Save results
+ this->template SetNextOutput<OutputImageType>(outputImage);
+}
+
+//--------------------------------------------------------------------