<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">Hi Luis,<br><br>We are using ITK within Amira, so I'll do my best to
only send the code I think is required to duplicate this issue:<br>The
DICOM images are quite big so I didn't attached them (yet), but I can
give the following info:<br>fixed: size: 206x212x210, voxelsize:
0.0349x0.0349x0.0349001<br>moving: size: 243x229x242, voxelsize:
0.0349x0.0349x0.0349001<br>The warnings only appear on 64 bit system for
pyramid levels of 6 and greater.<br>Since the smoothing of the deform
field and update field are turned off in the pde filter, I think the
warnings only originate from the image pyramids. The warnings include
both truncations to 33 (DiscreteGaussianImageFilter) and to 31
(GaussianOperator).<br><br>Main while I
have created a class which inherits from <font face="Tahoma" size="2">MultiResolutionPyramidImageFilter,
but for which I overloaded the functions </font>GenerateInputRequestedRegion()
and GenerateData() to remove all smoothing. This removes the 33
truncation warnings but still leaves me with 6 31 truncution warnings.<br><br>
const unsigned int Dimension = 3;<br> typedef float ImagePixelType;<br>
typedef itk::Image<ImagePixelType, Dimension> ImageType;<br>
typedef itk::Vector<float, Dimension> VectorPixelType;<br>
typedef itk::Image<VectorPixelType, Dimension> DeformType;<br><br>
// Via the Amira interface we can choose various PDE filters<br>
typedef itk::PDEDeformableRegistrationFilter<ImageType, ImageType,
DeformType> ItkPDEType;<br> ItkPDEType::Pointer AlgoPtr =
NULL;<br> switch ( portAlgorithm.getIndex() )<br> {<br> case
0: // Demons<br> typedef
itk::DemonsRegistrationFilter<ImageType, ImageType, DeformType>
DemonsType;<br> AlgoPtr = DemonsType::New();<br><br>
static_cast<DemonsType*>(AlgoPtr.GetPointer())-><br>
SetIntensityDifferenceThreshold( 0.001 );<br> break;<br> case
1:<br> <other PDE filters><br><br> default:<br>
<...><br> break;<br> }<br><br> // set some additional
options<br>
AlgoPtr->UseImageSpacingOff();
// default: off<br> // used to smooth the deformation and
update field if requested<br> AlgoPtr->SetMaximumError( 0.1 );<br>
AlgoPtr->SetMaximumKernelWidth( 45 );<br>
AlgoPtr->SetMaximumRMSError( 0.001 );<br>
AlgoPtr->SetSmoothDeformationField( 0 ); // default: on<br>
AlgoPtr->SetSmoothUpdateField( 0 ); // default: off<br><br>
int levels = portLevels.getValue(); // here we set the no. of levels
in Amira<br> if ( levels < 1 ) { levels = 1;
}<br> unsigned int* iterations = new unsigned int[levels];<br>
for ( int i = 0; i < levels; i++ )<br> {<br> iterations[i] =
10;<br> }<br><br> // set up the multi res registration filter<br>
typedef itk::MultiResolutionPDEDeformableRegistration<ImageType,
ImageType, DeformType> ItkMultiResPDEType;<br>
ItkMultiResPDEType::Pointer multiresfilter = ItkMultiResPDEType::New();<br>
multiresfilter->SetRegistrationFilter( AlgoPtr );<br>
multiresfilter->SetFixedImage( pItkRefImage );<br>
multiresfilter->SetMovingImage( pItkMovingImage );<br>
multiresfilter->SetNumberOfLevels( levels );<br>
multiresfilter->SetNumberOfIterations( iterations );<br>
multiresfilter->SetNumberOfThreads( 4 );<br><br> try <br> {<br>
multiresfilter->Update();<br> }<br> catch(
itk::ExceptionObject& err )<br> {<br> }<br><br>I hope this
additional info will help.<br><br>Thanks -
Maarten<div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> Luis Ibanez <luis.ibanez@kitware.com><br><b><span style="font-weight: bold;">To:</span></b> Maarten Beek <beekmaarten@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> insight-users@itk.org<br><b><span style="font-weight: bold;">Sent:</span></b> Wed, May 26, 2010 1:48:43 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Insight-users] MultiResolutionPyramidImageFilter: different behavior 32 bit vs 64 bit<br></font><br>
<meta http-equiv="x-dns-prefetch-control" content="off"><br>Hi Maarten,<br><br>The computation precision should be the same<br>in a 64 bits machine (for float/double numbers).<br><br>However, the fact that you only get the warning<br>in 64bits build certainly shows that the platform<br>
matters.<br><br>Could you please post to the list a minimal <br>snippet of code that illustrates this problem ?<br><br>(including all the numerical parameters that<br>you are using).<br><br><br>It will be very helpful if we manage to replicate<br>
the warning message.<br><br><br> Thanks<br><br> <br> Luis<br><br><br><br>-------------------------------------------------------------<br><div class="gmail_quote">On Tue, May 25, 2010 at 1:05 PM, Maarten Beek <span dir="ltr"><<a rel="nofollow" ymailto="mailto:beekmaarten@yahoo.com" target="_blank" href="mailto:beekmaarten@yahoo.com">beekmaarten@yahoo.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><div>Hi all,<br>
<br>The MultiResolutionPDEDeformableRegistration filter (with any of the PDEDeformableRegistrationFilter filters) uses the MultiResolutionPyramidImageFilter class to create image pyramids for the fixed and moving image. This MultiResolutionPyramidImageFilter class gives a warning about a kernel being truncated because it is growing too big when run on 64 bit system, while the warning doesn't appear when run on a 32 bit system (of course with the same values for the various parameters, like max error, variance).<br>
<br>Is this caused by the machine precision? How can I prevent this warning on a 64 bit machine?<br><br>Thanks - Maarten<br></div>
</div><br>
</div><br>_____________________________________<br>
Powered by <a rel="nofollow" target="_blank" href="http://www.kitware.com">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br><span>
<a target="_blank" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a></span><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br><span>
<a target="_blank" href="http://www.kitware.com/products/protraining.html">http://www.kitware.com/products/protraining.html</a></span><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br><span>
<a target="_blank" href="http://www.itk.org/Wiki/ITK_FAQ">http://www.itk.org/Wiki/ITK_FAQ</a></span><br>
<br>
Follow this link to subscribe/unsubscribe:<br><span>
<a target="_blank" href="http://www.itk.org/mailman/listinfo/insight-users">http://www.itk.org/mailman/listinfo/insight-users</a></span><br>
<br></blockquote></div><br>
<meta http-equiv="x-dns-prefetch-control" content="on"></div></div>
</div><br>
</body></html>