Import and Export Converter Not Executed

  • Hi


    I had define three export converter that works fine . Details of Export converter is as follow:-
    1. First Export Converter copy incoming images to a specified folder
    2. Second Export Converter make a log file of the incoming dicom images.
    3. Third Export Converter make Jpeg of incoming dicom images


    All of the above three converters work fine. But when i add an Import Converter in the end of dicom.ini file that calls a lua script then Export Converters are executed but import converter don't call the lua script.


    My dicom.ini file is something like this



    ExportConverters = 3
    ExportConverter0 = copy files to folder
    ExportConverter1 = make log file
    ExportConverter2 = make JPEG



    [lua]
    ImportConverter0 = dofile('script.lua')


    And i also want to make one thing clear that Export Converter are always define before [lua] tag starts or i can define after the [lua] Import Converter ..........
    In this scenario the export converter is not executed just like import converter .


    Please also define the sequence in which both of them are define.


    --HM

  • Hi,


    This looks fine to me.


    Converters can be under section [sscscp], in which case they use an own language, or in section [lua], in which case they use Lua as language. Each named converter can only appear once. So it is invalid to have ImportConverter0 both under [sscscp] and [lua]. But as far as I see that is not the case for you.


    can you post the actual ini file?


    Marcel

  • But as i mentioned in my case only export converters were executed not import one.


    Please update me is there any time difference between the execution of bot converters i mean import converters will run after x seconds after export or vice versa.

  • Execution goes as follows:


    One by one:
    ImportConverter0
    ImportConverter1
    ...
    ImportConverter99


    Image stored in database
    Image stored on disk


    ExportConverter0 .. ExportConverter19 are all running in parallel


    Some converters e.g. "forward study" are put in a queue and are executed delayed (typically 5 minutes after last image). The delay can be configured. All commands are explained in some detail in the manual, as well as this sequence.


    To debug the ini file you need to post it in full.


    Marcel

  • Marcel i also figure some strange working in the flow and sequence of converters. Instead of Export Converter 0 to be executed first 1 is executed first then 0 and in the last 2. Why is that?? Appended below is my server log:-



    [PACS] Monitoring for files in: D:\Images\incoming\
    [PACS] DGATE (1.4.17d, build Sun Mar 09 15:18:24 2014, bits 64) is running as threaded server
    [PACS] Database type: native MySQL connection
    [PACS] Started 3 export queue thread(s)
    [PACS] User interface test: local server is running!
    [PACS]
    [PACS] UPACS THREAD 1: STARTED AT: Thu Dec 10 21:59:49 2015
    [PACS] Calling Application Title : "DCMSND "
    [PACS] Called Application Title : "PACS "
    [PACS] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384
    [PACS] Presentation Context 0 "1.2.840.10008.5.1.4.1.1.1" 1
    [PACS] Importconverter-1.0: sets preferred storage to MAG1
    [PACS] [recompress]: recompressed with mode = jk (strip=1)
    [PACS] Written file: D:\QIH\10801\1.2.826.0.1.3680043.2.135.735925.9725531.7.1449071366.828.2_1001_001001_14498135930000.dcm
    [PACS] Exportconverter1.0 executes: append "Thu Dec 10 21:59:53 2015 DCMSND 10801 ru0 " to c:\incoming.txt
    [PACS] Exportconverter0.0 executes: copy D:\QIH\10801\1.2.826.0.1.3680043.2.135.735925.9725531.7.1449071366.828.2_1001_001001_14498135930000.dcm to D:\TestFolder
    [PACS] Exportconverter2.0 executes: save jpg as C:\JPG\10801-CR.jpg

  • Hi,


    as explained above exportconverters run in parallel - order not defined.


    For the fifth time can you please post your dicom.ini - I am trying to find the error in the images, but all seems to work.


    Marcel

  • Sorry for the late reply. Please find my dicom.ini enteries


    MAGDevices = 6
    MAGDevice0 = D:\Images\
    MAGDevice1 = D:\QIH\
    MAGDevice2 = D:\UMC\
    MAGDevice3 = D:\AH\
    MAGDevice4 = D:\PMH\
    MAGDevice5 = D:\hY9\


    NightlyCleanThreshhold = 0
    NightlyMoveThreshhold = 0
    NightlyMoveTarget =



    ExportConverters =3
    ExportConverter0 = copy %f to D:\TestFolder
    ExportConverter1 = append "%d%t%t%t%u%t%t%t%i%t%t%t%s%n" to c:\log.txt
    ExportConverter2 = save jpg as C:\JPG\%i-%m.jpg


    [lua]
    ImportConverter0 = dofile('storage.lua')



    I wanted to know if i want to set a DICOM Tag of incoming Image and then forward it. Should i add these lines in the end or should i use lua to do the required tasks.


    [lua]
    ImportConvertor = 2
    ImportConverter0 = dofile('hammad.lua')
    ImportConverter1 = set 0008,0080 to "XXXXX"


    On running the above line i get the following error


    [PACS] *** lua run error [string "set (0008,0080) to "XXXXX""]:1: attempt to call global 'set' (a nil value) in 'set (0008,0080) to "XXXXX"'


    --HM

Participate now!

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