Dicom Routing for neewbie

  • Hi,

    I'm new to Conquest, not to PACS (DCM4CHEE).

    I've setup a server today.

    it works fine.

    I can send manually dicom files to other nodes in the local network

    I can send dicom files to the CONQUESTSRV2 node


    I've add intov the know dicom nodes the nodes I want to be able to retrieve and to be automatic forwarded. (example MYAE_TITLE)

    I've put into the dicom.ini from the windows manual :


    ForwardAssociationLevel = SERIES
    ForwardAssociationCloseDelay = 5
    ForwardAssociationRefreshDelay = 3600
    ExportConverters = 1
    DelayedForwarderThreads = 5
    ExportModality0 = DX
    ExportStationName0 = XX
    ExportCalledAE0 = CONQUESTSRV2
    ExportCallingAE0 = MYDX_NODE
    ExportConverter0 = forward to MYAE_TITLE


    In the logs I see the forwarding process starting. But I always get the error :
    Failed to send DICOM image(s) to host


    I've looked around but I don't know what to modifiy.


    Again I can send manually to that host (HOROS) without any problem.


    Thank you very much for the help.

    Antoine

  • Hi again, Marcel I've plaid with the HOROS preferences and it's working.


    May I ask something else :
    How to filter to transfert only DX ? something like that : ExportModality0 = DX

    And I know it's possible to convert automaticly Dx to jpeg and store them in a directory ? But I have no clue to write that easily.


    Thank you.

    Antoine

  • Dear Marcel

    thank you very much for this reply and example.


    I've tried to read a lot today about Lua scripts.

    they have to start with

    [lua] ?

    or not ?

    And lua scripts have to be written into the dicom.ini ?


    And in your example if I want to specify a path for a different folder how would you write it ?

    ImportConverter0 = lua:if Data.Modality=='DX' then Data:Script('save jpg to C:\PATH\'..Data.SOPInstanceUID..'.jpg') end


    regards.

    Antoine

  • Hi Antoine,


    Yes scripts have to be written in dicom.ini, but they can call external lua files.


    These examples are equivalent (dofile is a lua function to call a lua file):


    ImportConverter0 = lua:dofile('lua/file.lua')


    [lua]

    ImportConverter0 = dofile('lua/file.lua')


    And then you can also do this, as a type of import converter (see manual):


    ImportConverter0 = lua/file.lua


    The final question is correct.


    You can try lua from :

    console.bat

    modify image - advanced

    zerobrane studio


    Marcel

  • Sorry to ask again.

    the script gives me an error, syntax error with a . or ' problem, I'm not sure.

    I've tried to changer Data:Script for Data.Script but it was not the solution.


    other question (I didn't find the solution on the manual or the forum)

    ExportModality0 = DX

    ExportStationName0 = NAME_MODALITY

    ExportCalledAE0

    ExportCallingAE0

    Can they be set for multiple exportconverter ? Or they have to be wrtitten for converter0 , converter1, etc ...


    And is it the same to write 4 exportconverter forward to nodes in 4 lines or in one line separeted by ";" ? It looked to me that on one line if one fails then the next on the line is not done ?


    And finally, is there something different to get images from ultrasound modality ? Because the modality see the conquest, the conquest see the modality but the is an error in the image export and no images in conquest DB.


    Thank you for the help.

    Antoine

  • Hi


    I think the c:\path\ must be c:\\path\\


    This works, just tested:


    ImportConverter0 = lua:if Data.Modality=='MR' then Data:Script('save jpg to C:\\work\\'..Data.SOPInstanceUID..'.jpg') end


    Note that if you have lua: in the converter it must be above the [lua] section. Below it all converters are already in lua.


    Items like ExportModality0 musty be set for each export converter.


    Each numbered export converter runs in parallel. One one line with ; they run serial. And indeed if one fails the whole line stops, and if possible retries.


    Marcel

  • Hi again,


    I tested it and I must do something wrong because I still have an error. I put the error and the dicom part later in this message if you can have a look to my mistake.


    Is there a way of filtering the modality on importconverter without lua ? Something like importmodality="" ?


    Can you also help me with the retryiing exportconverter. What is the exact formulation for : try once but do not retry ?


    And finally is there a variable with the patient name, something like %patientname ? for save as or mkdir to include the patient name ?


    thank you very much.


    *** lua syntax error [string "lua:if Data.Modality=='DX' then Data:Script('save jpg to C:\\wo..."]:1: '<name>' expected near 'if' in 'lua:if Data.Modality=='DX' then Data:Script('save jpg to C:\\work\\'..Data.SOPInstanceUID..'.jpg')'


    # Dicom Routing

    ImportConverter0 = mkdir C:\Users\PC\Dropbox\Etoy\RX_ETOY\%VStudyInstanceUID\; save jpg to C:\Users\PC\Dropbox\Etoy\RX_ETOY\%VStudyInstanceUID\%V0010,0020-%V0008,0018.jpg

    [lua]

    ImportConverter1 = lua:if Data.Modality=='DX' then Data:Script('save jpg to C:\\work\\'..Data.SOPInstanceUID..'.jpg')

  • 1) As I said, below [lua] do not use lua:


    2) if Data.Modality=='DX' then end


    3) There are parameters to control retry


    4) Data.PatientName


    These find can be found in the manual, have a look there first.

    Marcel

  • thank you.

    I will go and read again ! Believe I did already but not deep enough.


    2) if Data.Modality=='DX' then end

    it means that modality filtering is has to be done only in a lua script ?

    Antoine

Participate now!

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