Feature Request: at end of transfer

  • I'm not sure this is the correct area to put this, as I see mostly help requests in the forum topics.


    Would it be possible to add a control to the export converters that simply tells them 'run this task once transfer has terminated'. I'd much rather know that the transfer is complete and have the jobs all kick off, as opposed to the sleep timer method available now.


    -Garrett

  • Hi Garrett,


    there is an "endassociation" event, but that does not know anything about the images that were recieved. The timer method is intended to detect all images at one level even if they come in at different associations. If you know all images of e.g., one study come in on one association, something like this may however work:


    Code
    [lua]
    association = studyuid = ''';
    importconverter1 = studyuid = Data.StudyInstanceUID;
    endassociation = system('process.bat ' + studyuid);


    Marcel

  • Marcel,
    I'm not quite clear what the implications here are, currently I'm running the export converters as:


    Code
    #Configure Export Converters
    ForwardCollectDelay = 600
    ExportConverters = 1
    ExportModality = *
    ExportConverter0 = process series by /mnt/cd/usr_pni/os/linux/scripts/dicom/conquest_dicom_qa.sh %p %V0020,0011


    If I'm understanding the example provided the %p wouldn't be available at the execution of 'endassociation', nor would the %V0020,0011. However they are available before this, so could I simply accumulate unique values from %V0020,0011 and cache %p so I can deliver it to the system call in a loop?

  • Hi, this is correct.


    Each association keeps its own lua context, so you can create as many variables or tables (arrays) to record information about what has been recieved; and then process these at EndAssociation. However, association/EndAssociation pairs would also occur for e.g., queries.


    Marcel

  • Quote from marcelvanherk

    Hi, this is correct.


    Each association keeps its own lua context, so you can create as many variables or tables (arrays) to record information about what has been recieved; and then process these at EndAssociation. However, association/EndAssociation pairs would also occur for e.g., queries.


    Marcel


    I'm not sure what you mean (i'm not at all familiar with lua), do you mean that these lua scripts would also attempt to run when people query data from the system? I have the system designed for the null /black hole driver presently so that shouldn't be a problem.


    On the association itself, does this refer to the communication between one scanner device and the conquest server for transferring a block of data / study / session? If this is the case, how would you wind up getting data for one block from multiple devices?

  • Hi,


    Indeed, each association is like an FTP session. The sender defines when to start a session, how much and what to do in a session and when to end it. The proposed lua construct allows you to analyze this and respond accordingly. In agree that this is more difficult than the wait option I created earlier (this is independent of how the sender does things), but it also allows much more flexibility of when processing occurs. To test things out, you can just put a few print statements into the different lines and see what activity occurs.


    I added lua as scripting luangage as it is a fast and simple general purpose language (there is lots of info on the internet) and it allows you to do whatever you like....


    Marcel

Participate now!

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