<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
.MsoPapDefault
        {mso-style-type:export-only;
        mso-margin-top-alt:auto;
        mso-margin-bottom-alt:auto;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=DE-AT link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Writing the error message will give a better idea for us about what you are facing. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Anyways from what i know, the outputimagetype for discretegaussian is a float image.&nbsp; So in your definition<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-family:"Courier New"'>typedef itk::DiscreteGaussianImageFilter&lt; TImageType, TImageType &gt; DiscreteGaussianFilterType;<br></span><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>TImageType should be of float type. So your input image should be a float too. &nbsp;If this is true then i don&#8217;t know the bug.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>If your input image is not float then you should change the definition as <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-family:"Courier New"'>typedef itk::DiscreteGaussianImageFilter&lt; TImageType, TOutputImageType &gt; DiscreteGaussianFilterType;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-family:"Courier New"'>TOutputImageType should be a float image.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-family:"Courier New"'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This is the only thought sparked in my mind. Please check for this.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>All the best<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Regards,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Kana </span><span lang=EN-GB style='font-family:"Courier New"'><br><br></span><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-GB style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> insight-users-bounces@itk.org [mailto:insight-users-bounces@itk.org] <b>On Behalf Of </b>G G<br><b>Sent:</b> 01 April 2011 11:37<br><b>To:</b> insight-users<br><b>Subject:</b> [Insight-users] DiscreteGaussianImageFilter in function<o:p></o:p></span></p></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Hi, I dont solve it, so I try to ask here...<br>I have this function<br><br><span style='font-family:"Courier New"'>template&lt;typename TImageTypePointer, typename TImageType&gt; void WatershedCompute::<br>&nbsp;&nbsp;&nbsp; discreteGaussianFilter(TImageTypePointer inputImage, void *poutputImage)<br>{<br>&nbsp;&nbsp;&nbsp; typedef itk::DiscreteGaussianImageFilter&lt; TImageType, TImageType &gt; DiscreteGaussianFilterType;<br>&nbsp;&nbsp;&nbsp; DiscreteGaussianFilterType::Pointer discreteGaussianFilter = DiscreteGaussianFilterType::New();<br>&nbsp;&nbsp;&nbsp; discreteGaussianFilter-&gt;SetInput( inputImage );<br>&nbsp;&nbsp;&nbsp; const double gaussianVariance = this-&gt;params-&gt;Get_discrete_gaussian_variance();<br>&nbsp;&nbsp;&nbsp; const unsigned int maxKernelWidth = this-&gt;params-&gt;Get_discrete_gaussian_kernel_width();<br>&nbsp;&nbsp;&nbsp; discreteGaussianFilter-&gt;SetVariance( gaussianVariance );<br>&nbsp;&nbsp;&nbsp; discreteGaussianFilter-&gt;SetMaximumKernelWidth( maxKernelWidth );<br>&nbsp;&nbsp;&nbsp; discreteGaussianFilter-&gt;Update(); // this line<br>&nbsp;&nbsp;&nbsp; TImageTypePointer *Pout = (TImageTypePointer *)poutputImage;<br>&nbsp;&nbsp;&nbsp; *Pout = discreteGaussianFilter-&gt;GetOutput();<br>&nbsp;&nbsp;&nbsp; return;<br>}</span><br><br>And in <span style='font-family:"Courier New"'>// this line</span> I have &quot;error&quot;... I dont know, if it is error, because I get code from another function, which I dont call, I dont know what is the problem :(<br><br><br>I have another function for example <br><br><span style='font-family:"Courier New"'>template&lt;typename TImageTypePointer, typename TImageType&gt; void WatershedCompute::<br>&nbsp;&nbsp;&nbsp; rescaleIntensityFilter(TImageTypePointer inputImage, void *poutputImage, int min, int max)<br>{<br>&nbsp;&nbsp;&nbsp; typedef itk::RescaleIntensityImageFilter&lt; TImageType, TImageType &gt; RescaleFilterType;<br>&nbsp;&nbsp;&nbsp; RescaleFilterType::Pointer rescaler = RescaleFilterType::New();<br>&nbsp;&nbsp;&nbsp; rescaler-&gt;SetOutputMinimum( min );<br>&nbsp;&nbsp;&nbsp; rescaler-&gt;SetOutputMaximum( max );<br>&nbsp;&nbsp;&nbsp; rescaler-&gt;SetInput( inputImage );<br>&nbsp;&nbsp;&nbsp; rescaler-&gt;Update();<br>&nbsp;&nbsp;&nbsp; TImageTypePointer *Pout = (TImageTypePointer *)poutputImage;<br>&nbsp;&nbsp;&nbsp; *Pout = rescaler-&gt;GetOutput();<br>&nbsp;&nbsp;&nbsp; return;<br>}</span><br><br>When I call only <span style='font-family:"Courier New"'>rescaleIntensityFilter</span> and dont call <span style='font-family:"Courier New"'>discreteGaussianFilter</span> it is OK. Could someone help me, please? <br>Thanks a lot :-)<o:p></o:p></p></div></body></html>