<div>Hi everyone, </div>
<div> </div>
<div>I am trying to use the itkGradientAnisotropicDiffusionImageFilter class for smoothing my MRI images. To my dismay, my images are not responding to the filter even when I run 50 or so iterations with a conductance of about
3.0 (i.e. output image is the same as the input image with no visible difference). An earlier forum post had suggested to use a 3.0 conductance level, but such a high conductance rate makes the output image unrecognizable (lots of salt-pepper noise).
</div>
<div> </div>
<div>So has anyone used this filter before, and if so, what sort of parameter values (number of iterations, conductance and time step) should I be looking to use. Although I know that these values depend on the type of my images I am working with, but any suggestions will be very useful.
</div>
<div> </div>
<div>Also in the documentation it says somewhere that the time step parameter is similar to the width of the gaussian kernel. I have tried values of 20.0 - 30.0. However, I get a warning message telling me that this sort of value is an "unstable time step" for my images. The message also suggests a timestep which is usually a very small value (~
0.05). What i dont understand, is that I had no problems (isotropic) Gaussian smoothing my images with widths ranging from 20.0 - 30.0, then why does the anisotropic filter complain for such widths? </div>
<div> </div>
<div>Here is part of my code if it helps: </div>
<div> </div>
<div> typedef itk::Image< PixelType, 3 > InputImageType;<br> typedef itk::Image< PixelType, 3 > OutputImageType;<br> typedef itk::ImageFileReader< InputImageType > ReaderType;<br> typedef itk::ImageFileWriter< OutputImageType > WriterType;
<br> typedef itk::GiplImageIO ImageIOType; <br> typedef itk::GradientAnisotropicDiffusionImageFilter<InputImageType, OutputImageType > FilterType;<br> </div>
<div>
<p> ReaderType::Pointer reader = ReaderType::New();<br> WriterType::Pointer writer = WriterType::New();<br> ImageIOType::Pointer giplIO = ImageIOType::New(); <br> FilterType::Pointer filter = FilterType::New();</p>
<p> reader->SetFileName( argv[1] );<br> writer->SetFileName( argv[2] ); <br> <br> <br> // for GIPL files<br> reader->SetImageIO(giplIO); <br> writer->SetImageIO(giplIO); <br> <br> //reader->Update();<br> <br>
writer->SetInput(filter->GetOutput()); <br> filter->SetInput(reader->GetOutput());<br> filter->SetNumberOfIterations( numberOfIterations );<br> filter->SetTimeStep( timeStep );<br> filter->SetConductanceParameter( conductance );
<br> writer->Update();</p>
<p>Thanks for any suggestions, </p>
<p> </p>
<p>Regards, </p>
<p>Rashed Karim. </p></div>