[Insight-users] parameters = registration->GetLastTransformParameters(); ?

Luis Ibanez luis.ibanez at kitware.com
Tue Oct 6 14:25:51 EDT 2009


Hi Motes,

Yes,
it should work fine as long as the file contains the parameters
in the same order.....

                                   AND

You don't change any of the BSpline grid parameters,
not the fixed grid parameters, such as origin, orientation and spacing.


Note however, that a better way of doing this is to use the
existing Trasform Writer and Reader classes.

See:

  Insight/Testing/Code/Review/itkTransformFileReaderWriterTest.cxx



     Regards,


          Luis


----------------------------------------------------
On Mon, Oct 5, 2009 at 6:42 PM, motes motes <mort.motes at gmail.com> wrote:
> After the registration has completed I do:
>
>      parameters = registration->GetLastTransformParameters();
>
>
> where the transform is a BSplineDeformableTransform.
>
> When I print 'parameters' I get a long list of values. Is it correct
> that the list of values are to be understood as:
>
> x0,x1,x2,...,xN, y0,y1,y2,...,yN, z0,z1,z2, ..., zN
>
> for 3D case ?
>
> I would like to write this array to a file and then later read it back
> into a parameters array from this file. Something like:
>
>    std::ifstream infile;
>    infile.open(coeff_path.c_str(), std::ios_base::in);
>    for(unsigned int n=0; n < numberOfCoefficient; n++) {
>      infile >>  parameters[n];
>    }
>    infile.close();
>
> I assume this should work fine as long as the file contains the
> parameters in the same sequence.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.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
>


More information about the Insight-users mailing list