[Insight-users] Anisotropic Diffusion filtering
rashed.vtk at googlemail.com
Thu Aug 9 11:47:38 EDT 2007
Thanks for your reply. I am working with GIPL images, and so after you asked
me to test the anisotropic filter with a single slice of my image, I started
trying to use the ExtractImageFilter to extract a slice. So to read and
write GIPL images by setting ImageIO explicitly:
typedef itk::GiplImageIO ImageIOType;
ImageIOType::Pointer giplIO = ImageIOType::New();
I am not able to extract a slice of my image (after adding these lines to
the example code of ExtractImageFilter). Now I am getting the feeling that
perhaps there are some issues with GIPL Input/Output in ITK??
However, i have tested flushing a GIPL reader's output to a GIPL writer's
input without a filter in between, and that works perfectly fine.
Luis Ibanez wrote:
> Hi Rashed,
> 1) Could you post somewhere in a public web site
> a slice of one of your 3D images ?
> 2) The numerical values recommended for the parameters
> of this filter, are for a typical MRI image.
> If your images happen to have a very different
> appearance then you need to explore different settings
> for the parameters.
> I would strongly suggest you to do this first in a single
> slice of the 3D image (use the ExtractImageFilter), since
> it will be a lot faster to try many different combinations
> of the filter parameters.
> 3) 50 iterations, should be more than enough for producing
> a visible effect in the images... unless your images are
> very particular,
> What is the modality of your images ? (CT? MRI? Ultrasound ?)
> What is the content of the image ? brain?, liver?
> 4) The time step should be small. The critical values are in the
> order of 0.625. Whenever you go higher than that the filter
> becomes numerically unstable. You should probably stay below
> half that value, just to be safe.
> Note however, that there is a relationship between the time
> step and the number of iterations. After all, this filter is
> simulating the melting of the material in your image as if it
> were a physical problem. This is a discretization of a continuous
> physical model. If you use half of the time steps, you will need
> double the iterations in order to cover the same process.
> That being said, this is just a simile, there is no real melting
> happening here, so you simply use the physical model as an analogy
> for smoothing the image.
> 5) A Gaussian smoothing of 20-30 is *HUGE*.
> What specific filter did you use for the smoothing ?
> What is the pixel spacing of your images ?
> Please give us more information,
> rashed karim wrote:
>> Hi everyone,
>> 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).
>> 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.
>> 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?
>> Here is part of my code if it helps:
>> typedef itk::Image< PixelType, 3 > InputImageType;
>> typedef itk::Image< PixelType, 3 > OutputImageType;
>> typedef itk::ImageFileReader< InputImageType > ReaderType;
>> typedef itk::ImageFileWriter< OutputImageType > WriterType;
>> typedef itk::GiplImageIO ImageIOType;
>> typedef itk::GradientAnisotropicDiffusionImageFilter<InputImageType,
>> OutputImageType > FilterType;
>> ReaderType::Pointer reader = ReaderType::New();
>> WriterType::Pointer writer = WriterType::New();
>> ImageIOType::Pointer giplIO = ImageIOType::New();
>> FilterType::Pointer filter = FilterType::New();
>> reader->SetFileName( argv );
>> writer->SetFileName( argv );
>> // for GIPL files
>> filter->SetNumberOfIterations( numberOfIterations );
>> filter->SetTimeStep( timeStep );
>> filter->SetConductanceParameter( conductance );
>> Thanks for any suggestions,
>> Rashed Karim.
>> Insight-users mailing list
>> Insight-users at itk.org
> Insight-users mailing list
> Insight-users at itk.org
View this message in context: http://www.nabble.com/Anisotropic-Diffusion-filtering-tf4199946.html#a12074897
Sent from the ITK - Users mailing list archive at Nabble.com.
More information about the Insight-users