Restrict incoming objects

  • Dear Marcel,


    I'm annoyed with unauthorized or unsupported C-Store connections to conquest when a new modality is set up too quickly. I would like to be able to validate such things to avoid troubles, misconfiguration, even server crash.


    I tried to search on the forum but did not get not one single relevant input (!?)


    So, is there a way to setup a kind of acrnema.map with available modalities, and reject unrecognized C-Store requests ?


    Thanks !

  • Hi,


    you can specify accepted AE titles in dgatesop.lst. For programmatic rejecting you can use the 'destroy' or 'reject' commands of the ImportConverters. If you do this in lua it is quite powerful, e.g. (untested),


    [lua]
    ImportConverter0 = if Data.Modality=='SR' and Association.Calling=='CT' then script('reject') end


    Marcel

  • Hello Marcel,


    Thanks once again for your quick reply. I did try dgatesop.lst in the past, but this was without lua scripting, so the result was not so good... It seems to be easy to set up, I will give it a try soon.


    Have a nice day !

  • I have been trying to do something similar in 1.4.17 - rejecting images without a patient ID using lua. Here's my code:


    local n = Data.PatientID
    --Reject images without patient ID
    if not n then
    script('reject')
    print ("No patient ID - image rejected")
    end


    This rejects the images. However, the server won't accept any further store requests - i have to kill and restart the server. Do I need to cleanly close the association somehow when using script('reject')?


    Ben

  • One other test I had an issue with is testing if the ImageType attribute is correct. I wanted to only accept images with the image attribute equal to "ORIGINAL\\PRIMARY\\PORTAL". However, because of the double backslash I think Data.ImageType becomes "ORIGINAL\PRIMARY\PORTAL" when viewed by lua. See this example:


    This test doesn't work as expected:


    Code
    if (Data.ImageType ~= [[ORIGINAL\\PRIMARY\\PORTAL]]) thenscript('reject')print("RT image not acquired by EPID - image rejected")end


    But this does work:


    Code
    if (Data.ImageType ~= [[ORIGINAL\PRIMARY\PORTAL]]) then
    script('reject')
    print("RT image not acquired by EPID - image rejected")
    end


    Is this a bug or something to expect when testing attributes with special characters?


    Also, I was wondering is there a way when rejecting an image to pass a message back to the SCU of the reason for the image rejection? At the moment it's just blank.


    Thanks for your help,


    Ben

Participate now!

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