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<typename TImageTypePointer, typename TImageType> 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< TImageType, TImageType > 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->SetInput( inputImage );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> const double gaussianVariance = this->params->Get_discrete_gaussian_variance();</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> const unsigned int maxKernelWidth = this->params->Get_discrete_gaussian_kernel_width();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> discreteGaussianFilter->SetVariance( gaussianVariance );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> discreteGaussianFilter->SetMaximumKernelWidth( maxKernelWidth );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> discreteGaussianFilter->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->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 "error"... 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<typename TImageTypePointer, typename TImageType> 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< TImageType, TImageType > 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->SetOutputMinimum( min );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> rescaler->SetOutputMaximum( max );</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> rescaler->SetInput( inputImage );</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> rescaler->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->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>