[Insight-users] error with itkDiscreteGaussianImageFilter

Miller, James V (Research) millerjv at crd.ge.com
Wed Aug 10 13:40:41 EDT 2005


What is the spacing between the pixels in your image?
 
The defaults are to specify the variance in physical coordinates (mm) and build a kernel to have a maximum of 1% error
to the ideal Gaussian.  If your pixel size is small, it could take a very large kernel to get to 1% error.
 
The error message says to try to raise the width using the SetMaximumKernelWidth() but from your code it only looks 
like you tried lowering the width.  If the default of 32 is too small, then I would raise it to 64 (not reduce it to 5).
 
But my guess is that a variance of 3mm is very large with respect to your pixel size.
 
Jim

-----Original Message-----
From: insight-users-bounces+millerjv=crd.ge.com at itk.org [mailto:insight-users-bounces+millerjv=crd.ge.com at itk.org]On Behalf Of Renaud Isabelle
Sent: Wednesday, August 10, 2005 11:04 AM
To: insight-users at itk.org
Subject: [Insight-users] error with itkDiscreteGaussianImageFilter


Hi,
 
I'm triing to use itkDiscreteGaussianImageFilter to smooth each 2D slice of my 3D image. 
 
But I'm still having this exception no matter the maximum width of kernel I set: 
 
"Kernel size has exceeded the specified maximum width of MaximumKernelWidth and has been truncated to MaximumKernelWidth+1 elements. You can raise the maximum width using the SetMaximumKernelWidth method."

Could someone tell me why? Here is what I did:

typedef itk::DiscreteGaussianImageFilter<WorkImageType,WorkImageType>GaussianFilterType;
GaussianFilterType::Pointer gaussFilter = GaussianFilterType::New();

 GaussianFilterType::ArrayType v;
 v[0]=3.0;
 v[1]=3.0;
 v[2]=3.0;
 gaussFilter->SetVariance(v);

gaussFilter->SetMaximumKernelWidth(5);//I ried with default value=32, 5, 20, nothing works

 gaussFilter->SetFilterDimensionality(2);//smooth only each slice but not in time

 gaussFilter->SetInput(reader->GetOutput());

gaussFilter->Update();

rescaleFilter->SetInput(gaussFilter->GetOutput());

rescaleFilter->Update();

Isabelle


 

 

 




  _____  

Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger
Téléchargez  <http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com> le ici ! 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050810/f0f1f65b/attachment.htm


More information about the Insight-users mailing list