Small numbers getting rounded to 0

  • Hi marcelvanherk


    Conquest Version: 1.5.0c


    I am using the webserver to query the metadata from conquest:


    http://127.0.0.1/api/dicom/rs/studies/<UID>/series/<UID>/instances/<UID>/metadata


    For the tag 3004, 000E (DoseGridScaling), I get the value 0 (Postman API result)


    Whereas the actual value is 6.66056188E-9 (Taken from CQ webserver - header in browser)


    I also double checked by writing the API output to a file through curl but the value is 0.


    This rounding causing a major issue as its not accurate and the data from the API is treated as 0 from then on.

    What's causing this issue? I suppose PHP can handle such small values without any problem as it follows double precision floating point (64 bit)!!!
    Could you please guide me to rectify this behaviour?

    Thank you so much.

  • marcelvanherk

    When viewing the data (headers) in Conquest, I see the value without any problem.

    The problem is only when I query the webserver of Conquest. I am not sure whether the issue is with lua or php code inside \webserver\htdocs\api\dicom.

    I tried to call the specific getmetadata(...) function in rquery.lua from command line directly using dgate. But I believe the syntax is wrong and I can't get any result to debug this more.

    dgate64.exe "--lua:dofile(\"./webserver/htdocs/api/dicom/rquery.lua getmetadata <AETITLE> <STUDYUID> <SERIESUID> <INSTANCEUID>\")"

    Could you please look into this? Thank you.

  • Hi,


    the DICOM object is processed by the (lua) Serialize method (line 46 in rquery.lua), and is not touched after that.


    This is the call in qido.php that does not look like yours at all:


    passthru($exe.' "--dolua:dofile([[rquery.lua]]);getmetadata(nil,[['.$st.']],[['.$se.']],[['.$sop.']])"');


    Marcel

  • marcelvanherk

    Thank you.

    But unfortunately, when I call servertask "--dolua:dofile([[rquery.lua]]);getmetadata(nil,[['.$st.']],[['.$se.']],[['.$sop.']])", the result is the same



    I don't know why the result is 0.000000 whereas the Conquest headers show the full value ?(.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!