[Insight-users] Precision for affine parameters?

Luis Ibanez luis.ibanez at kitware.com
Sun Apr 25 11:15:33 EDT 2010


Hi Motes,

I have not been able to replicate the problem that you report.


When printing the array of parameters from a the registration
that uses an Affine transform I only get 6 digits of precision.

Please do the following

   double pre = std::cout.precision();
   std::cout << "PRECISION = " << pre << std::endl;
   std::cout << "PARAMETERS = " <<
registration->GetLastTransformParameters() << std::endl;


and post back to the mailing list the value that you get for
"PRECISION".  It if it larger than six, it means that some code
is altering the precision of the cout stream before you get to
print the values of the Transform.

You can reset the precision value by doing:

                     std::cout.precision( 6 );

before you call

   std::cout << "PARAMETERS = " <<
registration->GetLastTransformParameters() << std::endl;



     Regards,


          Luis


----------------------------------------------------
On Tue, Apr 20, 2010 at 10:27 AM, motes motes <mort.motes at gmail.com> wrote:

> I use Ubuntu 9.10 (Intel Core 2 Duo 8400 , 6GB RAM) and itk 3.16.0.
>
> I did not do anything with std::cout before printing.
>
>
> On Tue, Apr 20, 2010 at 3:56 PM, Luis Ibanez <luis.ibanez at kitware.com>
> wrote:
> >
> > Hi Motes,
> >
> > What is your platform ?
> > (hardware, OS, compiler, ITK version)
> >
> > Did you configure the "precision" and "width"
> > parameters of std::cout before you printed
> > out the transform parameters array ?
> >
> >
> >    Thanks
> >
> >
> >         Luis
> >
> >
> > ---------------------------------------------
> > On Tue, Apr 20, 2010 at 9:32 AM, motes motes <mort.motes at gmail.com>
> wrote:
> >>
> >> I run an affine transform registration method on some 3D volumes of
> >> lungs. When the registration is finished I print the final parameters
> >> and get something like this:
> >>
> >>    std::cout <<
> >> this->GetRegistrationMethod()->GetLastTransformParameters() <<
> >> std::endl;
> >>
> >>
> >>
> >> [0.951667582727522831653743651259, 0.0728499208745208848281293967375,
> >> 0.0310351798340151377453288716879, -0.0561726243236064515240713035382,
> >> 0.961160170937920277367538801627, -0.146546731618589859413859244341,
> >> 0.0123860197386243559708463024549, 0.0651848989513143378671244931866,
> >> 1.18828264295300267683330730506, 3.12243433628694821990734453721,
> >> -6.24760280608263318669060026878, 21.9959449816921157605520420475]
> >>
> >> there seems to be something wrong with the precision, is it meant to
> >> be that large for the affine transform parameters?
> >> _____________________________________
> >> Powered by www.kitware.com
> >>
> >> Visit other Kitware open-source projects at
> >> http://www.kitware.com/opensource/opensource.html
> >>
> >> Kitware offers ITK Training Courses, for more information visit:
> >> http://www.kitware.com/products/protraining.html
> >>
> >> Please keep messages on-topic and check the ITK FAQ at:
> >> http://www.itk.org/Wiki/ITK_FAQ
> >>
> >> Follow this link to subscribe/unsubscribe:
> >> http://www.itk.org/mailman/listinfo/insight-users
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100425/9c1fc899/attachment.htm>


More information about the Insight-users mailing list