Hi, I dont solve it, so I try to ask here...<br>I have this function<br><br><span style="font-family: courier new,monospace;">template&lt;typename TImageTypePointer, typename TImageType&gt; void WatershedCompute::</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    discreteGaussianFilter(TImageTypePointer inputImage, void *poutputImage)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">{</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    typedef itk::DiscreteGaussianImageFilter&lt; TImageType, TImageType &gt; DiscreteGaussianFilterType;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    DiscreteGaussianFilterType::Pointer discreteGaussianFilter = DiscreteGaussianFilterType::New();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    discreteGaussianFilter-&gt;SetInput( inputImage );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    const double gaussianVariance = this-&gt;params-&gt;Get_discrete_gaussian_variance();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    const unsigned int maxKernelWidth = this-&gt;params-&gt;Get_discrete_gaussian_kernel_width();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    discreteGaussianFilter-&gt;SetVariance( gaussianVariance );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    discreteGaussianFilter-&gt;SetMaximumKernelWidth( maxKernelWidth );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    discreteGaussianFilter-&gt;Update(); // this line</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    TImageTypePointer *Pout = (TImageTypePointer *)poutputImage;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    *Pout = discreteGaussianFilter-&gt;GetOutput();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    return;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br><br>And in <span style="font-family: courier new,monospace;">// 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,monospace;">template&lt;typename TImageTypePointer, typename TImageType&gt; void WatershedCompute::</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    rescaleIntensityFilter(TImageTypePointer inputImage, void *poutputImage, int min, int max)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">{</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    typedef itk::RescaleIntensityImageFilter&lt; TImageType, TImageType &gt; RescaleFilterType;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    RescaleFilterType::Pointer rescaler = RescaleFilterType::New();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    rescaler-&gt;SetOutputMinimum( min );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    rescaler-&gt;SetOutputMaximum( max );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    rescaler-&gt;SetInput( inputImage );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    rescaler-&gt;Update();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    TImageTypePointer *Pout = (TImageTypePointer *)poutputImage;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    *Pout = rescaler-&gt;GetOutput();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">    return;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">}</span><br><br>When I call only <span style="font-family: courier new,monospace;">rescaleIntensityFilter</span> and dont call <span style="font-family: courier new,monospace;">discreteGaussianFilter</span> it is OK. Could someone help me, please? <br>
Thanks a lot :-)<br>