[Insight-developers] Double to float conversion warning
kent williams
norman-k-williams at uiowa.edu
Mon Aug 20 15:10:31 EDT 2007
So I can do this to fix the matlab writer vnl I guess!
On 8/20/07 2:07 PM, "Luis Ibanez" <luis.ibanez at kitware.com> wrote:
>
> Hi Mathieu,
>
> VXL is third party but we have close ties
> to their developers community.
>
> What you could do is to open a bug for this issue,
> commit the fixes, and cc Brad King. (also cced in
> this email).
>
> In this way, your fixed will be migrated to future
> versions of VXL.
>
>
>
> Thanks
>
>
> Luis
>
>
>
> -------------------------------
> Mathieu Coursolle wrote:
>> Hi Luis,
>>
>> What about the vnl code? Is it 3rd party?
>>
>> It causes no error in 32 bits, however the following
>> causes warnings in 64 bits:
>>
>> inline int vnl_math_rnd(float x) { return lroundf(x); }
>>
>> lroundf returns a long, and vnl_math_rnd returns an int.
>> This produces a warning if long is not the same size as int,
>> which occurs in 64 bits.
>>
>> Should I cast the return value of lroundf to an int?
>>
>> Thanks.
>>
>> MAthieu
>>
>>
>>> Hi Mathieu,
>>>
>>> You can modify the DICOMParser. Please feel free to commit
>>> a fix to the repository.
>>>
>>>
>>> Note however that the use of this code is now discouraged
>>> because we consider that directory to be deprecated.
>>>
>>> We have moved to use GDCM as library providing DICOM
>>> reading and writing functionalities.
>>>
>>> I assume that you are not really using the code,
>>> and just want to solve the warning when you build
>>> ITK. Is that right ?
>>>
>>>
>>> Thanks
>>>
>>>
>>> Luis
>>>
>>>
>>> --------------------------
>>> Mathieu Coursolle wrote:
>>>
>>>> Hi,
>>>>
>>>> I currently use ITK to read some DICOM files from an XCode project.
>>>> However, I get
>>>> a warning coming from /Utilities/DICOMParser/DICOMAppHelper.h because
>>>> some double
>>>> values are set into float variables.
>>>>
>>>> ex:
>>>>
>>>> float x = 2.0;
>>>>
>>>> A sample fix would be :
>>>>
>>>> float x = 2.0f;
>>>>
>>>> However, my question is:
>>>>
>>>> Is DICOMParser part of the ITK code and can be modified, or is it code
>>>> from a 3rdParty
>>>> that is built as part of ITK? In the later, how can this be fixed?
>>>>
>>>> Thanks!
>>>>
>>>> Mathieu
>>>>
>>>
>>
>>
>>
> _______________________________________________
> Insight-developers mailing list
> Insight-developers at itk.org
> http://www.itk.org/mailman/listinfo/insight-developers
More information about the Insight-developers
mailing list