[Insight-users] AdaptiveHistogramEqualizationImageFilter speed

longbottom at byu.edu longbottom at byu.edu
Mon Sep 20 20:04:13 EDT 2004


All,

I am using the AdaptiveHistogramEqualizationImageFilter, and it seems to work 
fine.  However, if I use a window size that is very large it takes forever to 
run.  It takes several minutes to run with a 10x10 window on a 512x512 image.  
I set it to a 512x512 window, i.e. no window, and it had to run overnight.  I 
am running it on a G5.  

I set up the filter as follows:

  typedef itk::AdaptiveHistogramEqualizationImageFilter< OutputImageType >  
FilterType;

  FilterType::Pointer filter = FilterType::New();
  filter->SetAlpha(1.0);  //alpha = 0.0->hist eq, alpha = 1.0 -> unsharp mask
  filter->SetBeta(1.0);  //beta = 0.0 -> unsharp mask, beta = 1.0 -> pass 
through

  FilterType::ImageSizeType Radius;
  
  Radius[0] = 10; // radius along x
  Radius[1] = 10; // radius along y

  filter->SetRadius( Radius );

  typedef itk::ImageFileWriter< InputImageType >  WriterType;

  WriterType::Pointer writer = WriterType::New();

  writer->SetFileName( argv[2] );

  ucharToFloatCastFilter->SetInput( inputImage );
  filter->SetInput( ucharToFloatCastFilter->GetOutput() );
  floatToUcharCastFilter->SetInput( filter->GetOutput() );
  writer->SetInput(floatToUcharCastFilter->GetOutput());
  writer->Update();

Can anyone help, or is this filter just incredibly slow?

Thanks,
David


More information about the Insight-users mailing list