Conquest DICOM server and lua

  • Hi Marcel et al.,


    I am trying to automate a few tasks using the lua interface you added to the DICOM server. I used the following approach suggested by you:


    <q>
    Download and install server 1.4.17, download and unzip zerobranestudio 0.38. Run dicomserver/zerobranestudio/install.lua in zbs as described in its header and you have created a working scripting IDE in zbs with debugging, code completion and all.
    </q>


    After this I was able to run the "livecoding.lua" example, great!


    From the local console I tried an example described in overview.lua (from ZBS Local console):


    print(Association.Calling, Association.Called, Association.Thread, Association.ConnectedIP)


    This results in


    [string "print(Association.Calling, Associati..."]:1: attempt to index global 'Association' (a nil value)


    Do you know how to solve this? Perhaps zbstudio.exe should be in the same folder as dgate64.exe?


    Best regards & many thanks,


    Lennert.

  • Hi Lennert,


    I think this is maybe because the debugger has no formal DICOM association. You can use Association in importconverter and association events defined in dicom.ini. Similarly Data is not defined in a script started from ZBS because there is no data yet. So you need to do this:


    readdicom(file)
    print(Data.PatientID)


    or


    x = DicomObject:new()
    x:Read(file)
    print(x.PatientID)


    Regards,


    Marcel

Participate now!

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