Hello insight-users,<br><div class="gmail_quote"><div><div class="h5"><br>I'm experiencing some problems with the class itk::TransformFileWriter.<br>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.<br>
<br>Code snippet:<br><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> typedef itk::itkTransformFileWriter WriterType;</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> WriterType::Pointer writer = WriterType::New();</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;"> writer->SetFileName("transform.meta");</span><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"></span><span style="font-family: courier new,monospace;"></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> writer->SetInput(transform);</span><span style="font-family: courier new,monospace;"> // a Rigid3DTransform_double_3_3<br> <b>writer->SetPrecision(12);</b></span><b><span style="font-family: courier new,monospace;"></span></b><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;"> writer->Update();</span><br><br>Output:<br><br><div style="margin-left: 40px; font-family: courier new,monospace;">#Insight Transform File V1.0<br># Transform 0<br>
Transform: Rigid3DTransform_double_3_3<br>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<br>FixedParameters: 0 0 0<br></div><br>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).<br>
<br>Please, could anyone tell me how to force this class to apply a given precision?<br><br>Thanks,<br><br>Laura Lara<br>
</div></div></div><br>