[Insight-users] Insight-users Digest, Vol 72, Issue 58

Laura Lara Rodríguez eirnos.aesira at gmail.com
Fri Apr 16 06:18:36 EDT 2010


Hello insight-users,

I'm experiencing some problems with the class itk::TransformFileWriter.
After setting the transform writing precision (by using its SetPrecision()
method) to a different set of values (for example, to 12), it has not effect
when writing its contents afterwards--looks like the matrix values in the
output transform file are stuck to a precision of 6 digits.

Code snippet:

    typedef itk::itkTransformFileWriter WriterType;
    WriterType::Pointer writer = WriterType::New();
    writer->SetFileName("transform.meta");
    writer->SetInput(transform); // a Rigid3DTransform_double_3_3
    *writer->SetPrecision(12);***
    writer->Update();

Output:

#Insight Transform File V1.0
# Transform 0
Transform: Rigid3DTransform_double_3_3
Parameters: 0.575034 -0.616953 0.537313 0.811503 0.513545 -0.278811
-0.103921 0.596356 0.795965 0.948698 0.626789 0.269539
FixedParameters: 0 0 0

I need those numbers to have more significant digits, because when I read
that file in a following step, an exception is thrown because the matrix is
non-orthogonal (but I verified that it is orthogonal before writing it into
the file).

Please, could anyone tell me how to force this class to apply a given
precision?

Thanks,

Laura Lara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100416/c12564d3/attachment.htm>


More information about the Insight-users mailing list