[Insight-users] MultiResolutionPDEDeformableRegistration and maximum kernel size warning
Maarten Beek
beekmaarten at yahoo.com
Thu May 6 12:07:11 EDT 2010
Hi all;
I am using the functions SetMaximumError( ), SetMaximumKernelWidth(
),
and SetMaximumRMSError( ) of the itk::PDEDeformableRegistrationFilter
class to set the values for these three parameters to 0.1, 45, 0.001,
respectively.
Using their respective Get* functions, I get the values I set
earlier
returned.
However when I run the registration algorithm I get the warning from the
itk::GaussianOperator class concerning the maximum kernel size. What I
don't understand is that the warning tells me the specified maximum
width is 32. Where did my value of 45 go? Also the source code of the
itk::GaussianOperator class tells me the default value for the
MaximumKernelWidth is 30.
What should I do to avoid this kernel size warning?
My code looks like this:
typedef itk::PDEDeformableRegistrationFilter<ImageType,
ImageType,
DeformType> ItkPDEType;
ItkPDEType::Pointer AlgoPtr = NULL;
switch ( portAlgorithm.getIndex() ) // to choose between various PDE algorithms
{
case 0: // Demons
typedef itk::DemonsRegistrationFilter<ImageType,
ImageType,
DeformType> DemonsType;
AlgoPtr = DemonsType::New();
break;
case 1:
...... <etc> .....
default:
break;
}
AlgoPtr->SetMaximumError( 0.1 );
AlgoPtr->SetMaximumKernelWidth( 45 );
AlgoPtr->SetMaximumRMSError( 0.001 );
typedef
itk::MultiResolutionPDEDeformableRegistration<ImageType,
ImageType, DeformType> ItkMultiResPDEType;
ItkMultiResPDEType::Pointer multiresfilter =
ItkMultiResPDEType::New();
multiresfilter->SetRegistrationFilter( AlgoPtr );
multiresfilter->SetFixedImage( pItkRefImage );
multiresfilter->SetMovingImage( pItkMovingImage );
multiresfilter->SetNumberOfLevels( levels );
multiresfilter->SetNumberOfIterations( iterations );
multiresfilter->SetNumberOfThreads( 4 );
try
{
double maxerror = AlgoPtr->GetMaximumError();
unsigned int width = AlgoPtr->GetMaximumKernelWidth();
double rmserror = AlgoPtr->GetMaximumRMSError();
theMsg->printf( "Maximum error: %f, Maximum kernel width: %d,
Maximum RMS error: %f",
maxerror, width, rmserror );
multiresfilter->Update();
}
catch( itk::ExceptionObject& err )
{
return;
}
Thanks - Maarten Beek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100506/eec2e9fb/attachment.htm>
More information about the Insight-users
mailing list