Export Converter Script Execution

  • marcelvanherk

    Thanks Marcel.


    I did try the above like:


    [lua]

    Association = local list = {}; local list2={}

    ImportConverters =1

    ImportConverter0 = list[Data.SeriesInstanceUID]= Data.SeriesInstanceUID; list2[Data.StudyInstanceUID]= Data.StudyInstanceUID

    EndAssociation = local f=io.open(list2[1], 'wt') f:write(table.concat(list, '\n') f:close()


    But I get lua error in the console, for the line io.open(list2[1], 'wt') as list2 is nil when I restarted the server after changing dicom.ini.
    I thought EndAssociation will only be called after something comes in. May be I am understanding incorrectly?
    Please guide on me to properly configure dicom.ini to record data in a single association.

    Also, could you please clarify one more thing?

    In ImportConverters or ExportConverters, can I call two scripts in one converter?

    Currently, I call a lua script like this:


    ExportConverters = 1

    ExportConverter0 = process series after 10 by F:\myApp\processSeries1.lua "%u"|"%i"

    Can I call two lua scripts instead of one in the same converter?

    Thank you.

  • Hi,


    association is called for any connection. SO you have to change it to:


    EndAssociation = if list2[1] then local f=io.open(list2[1], 'wt') f:write(table.concat(list, '\n') f:close() end


    Yes you can call two scripts using a ; to seperate. But they would be run sequentually.


    Marcel

Participate now!

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