[Insight-users] DiscreteGaussianImageFilter in function
G G
greenlander1986 at gmail.com
Fri Apr 1 05:37:28 EDT 2011
Hi, I dont solve it, so I try to ask here...
I have this function
template<typename TImageTypePointer, typename TImageType> void
WatershedCompute::
discreteGaussianFilter(TImageTypePointer inputImage, void *poutputImage)
{
typedef itk::DiscreteGaussianImageFilter< TImageType, TImageType >
DiscreteGaussianFilterType;
DiscreteGaussianFilterType::Pointer discreteGaussianFilter =
DiscreteGaussianFilterType::New();
discreteGaussianFilter->SetInput( inputImage );
const double gaussianVariance =
this->params->Get_discrete_gaussian_variance();
const unsigned int maxKernelWidth =
this->params->Get_discrete_gaussian_kernel_width();
discreteGaussianFilter->SetVariance( gaussianVariance );
discreteGaussianFilter->SetMaximumKernelWidth( maxKernelWidth );
discreteGaussianFilter->Update(); // this line
TImageTypePointer *Pout = (TImageTypePointer *)poutputImage;
*Pout = discreteGaussianFilter->GetOutput();
return;
}
And in // this line 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 :(
I have another function for example
template<typename TImageTypePointer, typename TImageType> void
WatershedCompute::
rescaleIntensityFilter(TImageTypePointer inputImage, void *poutputImage,
int min, int max)
{
typedef itk::RescaleIntensityImageFilter< TImageType, TImageType >
RescaleFilterType;
RescaleFilterType::Pointer rescaler = RescaleFilterType::New();
rescaler->SetOutputMinimum( min );
rescaler->SetOutputMaximum( max );
rescaler->SetInput( inputImage );
rescaler->Update();
TImageTypePointer *Pout = (TImageTypePointer *)poutputImage;
*Pout = rescaler->GetOutput();
return;
}
When I call only rescaleIntensityFilter and dont call
discreteGaussianFilterit is OK. Could someone help me, please?
Thanks a lot :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110401/28cf4866/attachment.htm>
More information about the Insight-users
mailing list