ImportConverter Crash Issues - solved

  • Hi Johnny,


    I will look at the forward crash issue. Some crash details (version and crash address) would be useful. But your system is violating the DICOM standard I think using different patient IDs for the same study. This very dirty trick may work to fix that:


    at the end of dicom.ini add:


    [lua]
    ImportConverter0 = Data.PatientID = Data.StudyInstanceUID

  • Hi,


    you can add a test for SC in the statement to change the patientID. Or you can actually fix the patient ID in the script if you know that data with correct patient ID has been sent before. You do this by querying for the study, if it exists you replace the patient ID by the one stored earlier. But it really depends on your setup.


    I will look at the crash later.


    Marcel

  • for the script try something like this (use version 1.4.17 or 1.4.16k or so):


    Put at the end of dicom.ini (this replaces importconverter0, name others 1, 2, etc):


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


    create file checkpatid.lua

    Code
    if Data.Modality=='CR' and Data.PatientID=='00000000' then
    print('Checking PatientID in study database')
    PatientID = dbquery('DICOMStudies', 'PatientID', 'StudyInsta = "'..Data.StudyInstanceUID..'");
    if #PatientID>0 then -- any records found?
    print('PatientID in database = ', PatientID[1][1], 'In object = ', Data.PatientID)
    Data.PatientID = PatientID[1][1]
    end
    end
  • Hi,


    To forward without a database you use the importconverter with a destroy command. I have not yet had time to look at the crashes. You can expand the script to store the incorrect images somewhere and write a timer script to forward them later.


    Marcel

  • Hi,


    one crash seems to be in function DeleteSeries. But I am not able to duplicate the crash (SQLite backend) with a 'forward to DEST; destroy' converter. Can you post the dicom.ini related to the crash?


    By the way, you can run conquest without database, but exportconverters will not work - they use the database to get to the images. So this will not help.


    Marcel

  • Hi,


    this is definitevely not normal. When I tested it yesterday things worked fine between conquests on different machines. Let me have a look a your previous post again to see if anything obvious is wrong.


    Marcel

  • Hi,


    here is some (untested) coding help. The query returns a table (records) of tables (requested fields). The call script('forward to DEST channel 19') mimics ImportConverter19 which is bound to be unused.


    regards,


    Marcel


  • Hi,


    Thanks for this thought. The problem is that images cannot easily be changed once they have been entered in the database. I would:


    detect incoming OT not in the database
    write them in holding folder, e.g., with name studyUID_sequencenum
    then when any another image comes in with the same studyUID:
    read them back, fix them and put them in


    The scripting should support all this.


    Marcel

  • Hi,


    importconverters work object by object before they hit the database, so you need to be able to deal with the order in which they come in the script.


    I tried:


    ImportConverter0 = script('forward to CF-T8 channel 19'); script('destroy')


    and it works fine. How are you testing this? If you do it from ZBS you need to read some data first, e.g.,


    readdicom('0009703828:1.3.46.670589.5.2.10.2156913941.892665340.475317')
    script('forward to CF-T8 channel 19');
    script('destroy') -- does nothing from ZBS


    Marcel

  • Hi,


    FixImage runs indeed before any of the converters. The only ones that run earlier are the programmed compression and the worklist processing. I will add disabling FixImage as option.


    You might try the programmed compression one as follows:


    in dicom ini, set:


    IncomingCompression = s0


    and add:


    [lua]
    CompressionConverter0 = dofile(....)


    Regards,


    Marcel

  • Hi,


    I need more info to reproduce this issue. But I would misuse compressionconverter to set the patientid to something such that fiximage does not change it. Does the crash only occur with this data? I cannot reproduce it.


    Marcel

  • Hi,


    First test: can you send a normal image to DEST from the conquest GUI?


    The fiximage request will go in a subsequent release. Not sure yet what mechanism I would put in place instead.


    Marcel

  • Hi,


    after a webex session we concluded that the crash is related to a JK compressed forward of an invalid dicom object. Catching these and switching them to uncompressed seems to solve the issue. Version 1.4.17b also greatly improves the reliability of 'forward to' import converters during high load, fixing issues I found during stress testing.


    Marcel

Participate now!

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