[ITK-users] [ITK] Cast ITKv4 Transform from Float to Double

Ghayoor, Ali alii.ghayoor at gmail.com
Tue Apr 1 15:27:39 EDT 2014


Hi,

In the transform reader/writer classes, the template argument reflects the
"desired" output precision type for the input transform.

It means if you read your transforms by itkTransformFileReader (aka
itkTransforFileReaderTemplate<double>),
your transforms are read as double transforms no matter they are in single
or double precision. The same fact holds for the
itkTransformFileWriterTemplate class.

The following merged patch shows the works done on this feature:
http://review.source.kitware.com/#/c/12160/


Also, when does the previous listings belong to? The composite transform
should work properly on single precision now.
Please report any probable bugs.

Thanks,
Ali



On 4/1/14 1:46 PM, "Matt McCormick" <matt.mccormick at kitware.com> wrote:

>Hi Emma,
>
>Is there a self-contained, build example that illustrates the issue?
>
>The TransformFile{Writer,Reader} classes use an internal
>TransformIOHelper that has (not yet) exposed functionality to convert
>precision.
>
>HTH,
>Matt
>
>On Tue, Apr 1, 2014 at 2:18 PM, Emma Saunders <emmasaunders123 at gmail.com>
>wrote:
>> Hi everyone
>>
>> I am attempting to combine an affine and deformation field transforms
>>all
>> defined as float, using the
>>
>> itk::CompositeTransform<float, Dimension> CompositeTransformType
>>
>> From previous listings I have identified that this filter crashes when
>>used
>> with floats.  Is there a way therefore to convert my affine transform
>>and
>> displacement fields to double?
>>
>> Thanks
>>
>> Emma
>>
>> _____________________________________
>> 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.php
>>
>> 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
>>
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>>
>_____________________________________
>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.php
>
>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