<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2900.2668" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff size=2>What 
is the spacing between the pixels in your image?</FONT></SPAN></DIV>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff size=2>The 
defaults are to specify the variance in physical coordinates (mm) and build a 
kernel to have a maximum of 1% error</FONT></SPAN></DIV>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff size=2>to the 
ideal Gaussian.&nbsp; If your pixel size is small, it could take a very large 
kernel to get to 1% error.</FONT></SPAN></DIV>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff size=2>The 
error message says to try to raise the width using the SetMaximumKernelWidth() 
but from your code it only looks </FONT></SPAN></DIV>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff size=2>like 
you tried lowering the width.&nbsp; If the default of 32 is too small, then I 
would raise it to 64 (not reduce it to 5).</FONT></SPAN></DIV>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff size=2>But my 
guess is that a variance of 3mm is very large with respect to your pixel 
size.</FONT></SPAN></DIV>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=146053617-10082005><FONT face=Arial color=#0000ff 
size=2>Jim</FONT></SPAN></DIV>
<BLOCKQUOTE>
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> 
  insight-users-bounces+millerjv=crd.ge.com@itk.org 
  [mailto:insight-users-bounces+millerjv=crd.ge.com@itk.org]<B>On Behalf Of 
  </B>Renaud Isabelle<BR><B>Sent:</B> Wednesday, August 10, 2005 11:04 
  AM<BR><B>To:</B> insight-users@itk.org<BR><B>Subject:</B> [Insight-users] 
  error with itkDiscreteGaussianImageFilter<BR><BR></FONT></DIV>
  <DIV>Hi,</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>I'm triing to use itkDiscreteGaussianImageFilter to smooth each 2D slice 
  of my 3D image. </DIV>
  <DIV>&nbsp;</DIV>
  <DIV>But I'm still having this exception no matter the maximum width of kernel 
  I set: </DIV>
  <DIV>&nbsp;</DIV>
  <DIV><STRONG>"Kernel size has exceeded the specified maximum width of 
  <EM>MaximumKernelWidth</EM>&nbsp;and has been truncated to 
  <EM>MaximumKernelWidth+1</EM>&nbsp;elements.&nbsp;You can raise the maximum 
  width using the SetMaximumKernelWidth method."</STRONG></DIV>
  <P>Could someone tell me why? Here is what I did:</P>
  <P><STRONG>typedef 
  itk::DiscreteGaussianImageFilter&lt;WorkImageType,WorkImageType&gt;GaussianFilterType;<BR>GaussianFilterType::Pointer 
  gaussFilter = GaussianFilterType::New();</STRONG></P>
  <P><STRONG>&nbsp;GaussianFilterType::ArrayType 
  v;<BR>&nbsp;v[0]=3.0;<BR>&nbsp;v[1]=3.0;<BR>&nbsp;v[2]=3.0;<BR>&nbsp;gaussFilter-&gt;SetVariance(v);</STRONG></P>
  <P><STRONG>gaussFilter-&gt;SetMaximumKernelWidth(5);//I ried with default 
  value=32, 5, 20, nothing works</STRONG></P>
  <P><STRONG>&nbsp;gaussFilter-&gt;SetFilterDimensionality(2);//smooth only each 
  slice but not in time</STRONG></P>
  <P><STRONG>&nbsp;gaussFilter-&gt;SetInput(reader-&gt;GetOutput());</STRONG></P>
  <P><STRONG>gaussFilter-&gt;Update();</STRONG></P>
  <P><STRONG>rescaleFilter-&gt;SetInput(gaussFilter-&gt;GetOutput());</STRONG></P>
  <P><STRONG>rescaleFilter-&gt;Update();</STRONG></P>
  <P>Isabelle</P>
  <P><BR>&nbsp;</P>
  <P>&nbsp;</P>
  <P><STRONG>&nbsp;</P>
  <DIV><BR></DIV></STRONG>
  <P>
  <HR SIZE=1>
  <B><FONT color=#ff0000>Appel audio GRATUIT</FONT> partout dans le monde</B> 
  avec le nouveau Yahoo! Messenger<BR><A 
  href="http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.messenger.yahoo.com">Téléchargez 
  le ici !</A> </BLOCKQUOTE></BODY></HTML>