comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » 8 byte to double?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: 8 byte to double? [message #92600 is a reply to message #92599] Wed, 20 January 2016 04:58 Go to previous messageGo to previous message
Lajos Foldy is currently offline  Lajos Foldy
Messages: 176
Registered: December 2011
Senior Member
On Wednesday, January 20, 2016 at 1:39:07 PM UTC+1, LNpellen wrote:
> I'm lost - and I thought I had solved this previously, but I simply can't find it (maybe it was in php or something...).
>
> Some values in the DICOM header for some vendors happens to save floating (double-presition?) values as 8-bytearrays
>
> Is there a simple way in IDL to convert this bytearray to a double without coding the type conversion yourself?
>
> I couldn't manage to use the DOUBLE function for this.
>
> Ex.:
> I have the byte array [205 204 204 204 204 204 49 64] and it think from my annoyingly short notes that it should be 17.8...?
>
> Best regards,
> Ellen

IDL> b=[205b,204b,204b,204b,204b,204b,49b,64b]
IDL> print, fix(b, 0, 1, type=5)
17.800000

regards,
Lajos
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: MODIS Conversion ToolKit is not working? Can anyone help me?
Next Topic: HDF_SD_START: Invalid HDF file or filename: problem related to network issues

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:33:38 PDT 2025

Total time taken to generate the page: 0.00440 seconds