<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi all;
<br>
<br>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.
<br>Using their respective Get* functions, I get the values I set 
earlier 
returned.
<br>
<br>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.<br><br>What should I do to avoid this kernel size warning?<br>
<br>My code looks like this:
<br>&nbsp;&nbsp;&nbsp; typedef itk::PDEDeformableRegistrationFilter&lt;ImageType, 
ImageType, 
DeformType&gt; ItkPDEType;
<br>&nbsp;&nbsp;&nbsp; ItkPDEType::Pointer AlgoPtr = NULL;
<br>&nbsp;&nbsp;&nbsp; switch ( portAlgorithm.getIndex() ) // to choose between various
 
PDE algorithms
<br>&nbsp;&nbsp;&nbsp; {
<br>&nbsp;&nbsp;&nbsp; case 0:&nbsp;&nbsp;&nbsp; // Demons
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; typedef itk::DemonsRegistrationFilter&lt;ImageType, 
ImageType, 
DeformType&gt; DemonsType;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AlgoPtr = DemonsType::New();
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;
<br>&nbsp;&nbsp;&nbsp; case 1:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ......
&lt;etc&gt; .....<br>&nbsp;&nbsp;&nbsp; default:
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; break;
<br>&nbsp;&nbsp;&nbsp; }
<br>
<br>&nbsp;&nbsp;&nbsp; AlgoPtr-&gt;SetMaximumError( 0.1 );
<br>&nbsp;&nbsp;&nbsp; AlgoPtr-&gt;SetMaximumKernelWidth( 45 );
<br>&nbsp;&nbsp;&nbsp; AlgoPtr-&gt;SetMaximumRMSError( 0.001 );
<br>
<br>&nbsp;&nbsp;&nbsp; typedef 
itk::MultiResolutionPDEDeformableRegistration&lt;ImageType, 
ImageType, DeformType&gt; ItkMultiResPDEType;
<br>&nbsp;&nbsp;&nbsp; ItkMultiResPDEType::Pointer multiresfilter = 
ItkMultiResPDEType::New();
<br>&nbsp;&nbsp;&nbsp; multiresfilter-&gt;SetRegistrationFilter( AlgoPtr );
<br>&nbsp;&nbsp;&nbsp; multiresfilter-&gt;SetFixedImage( pItkRefImage );
<br>&nbsp;&nbsp;&nbsp; multiresfilter-&gt;SetMovingImage( pItkMovingImage );
<br>&nbsp;&nbsp;&nbsp; multiresfilter-&gt;SetNumberOfLevels( levels );
<br>&nbsp;&nbsp;&nbsp; multiresfilter-&gt;SetNumberOfIterations( iterations );
<br>&nbsp;&nbsp;&nbsp; multiresfilter-&gt;SetNumberOfThreads( 4 );
<br>
<br>&nbsp;&nbsp;&nbsp; try
<br>&nbsp;&nbsp;&nbsp; {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double maxerror = AlgoPtr-&gt;GetMaximumError();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned int width = AlgoPtr-&gt;GetMaximumKernelWidth();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; double rmserror = AlgoPtr-&gt;GetMaximumRMSError();
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; theMsg-&gt;printf( "Maximum error: %f, Maximum kernel width:
 %d, 
Maximum RMS error: %f",
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; maxerror, width, rmserror );
<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; multiresfilter-&gt;Update();
<br>&nbsp;&nbsp;&nbsp; }
<br>&nbsp;&nbsp;&nbsp; catch( itk::ExceptionObject&amp; err )
<br>&nbsp;&nbsp;&nbsp; {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return;
<br>&nbsp;&nbsp;&nbsp; }
<br>
<br>Thanks - Maarten Beek
</div>
</div><br>

      </body></html>