Changing VR Type or Contents with ImportConverter

  • I'm using Conquest to assist me with a data migration project, but I'm having some trouble with data manipulation. I've got some studies that have an incorrect VR type for 0040,9210 (LUTLabel); the VR in the header is SS, but should be SH. I'd like to either change or remove the VR so I can bring the study into my main PACS system.


    I couldn't find any commands to change VR type, but I did see in the manual that "delete xxxx,yyyy" is a valid command, so I've configured thusly:


    Code
    ImportConverters = 1ImportConverter0 = ifequal "%u", "DCMSND"; delete 0040,9210; forward series compressed as jk to MIGRATION_AE


    However, the change doesn't appear to be made, as nothing is logged stating so; the only ImportConverter event is:


    Code
    Fri Feb 15 16:20:49 2013 Importconverter0.2: queued forward ser - (single object of 48-241038290) to MIGRATION_AE


    And MIGRATION_AE is still rejecting the images:


    Code
    DCM Incorrect VR (SS) for attribute with tag (0040, 9210)- Expected VR (SH)


    Am I missing something in the configuration for the ImportConverter, or do I misunderstand how the delete command should work?


    Thank you.

  • Hi,


    You are on Linux I assume. When running a dgate, start another one with dgate --debuglevel:2


    By the way:


    ifequal "%u", "DCMSND"; delete 0040,9210; forward series compressed as jk to MIGRATION_AE


    means


    ifequal "%u", "DCMSND"; { delete 0040,9210; }
    forward series compressed as jk to MIGRATION_AE


    To test if a a converter is reached put "nop" in from if it, then it will log it bu not execute.


    Marcel

  • I've split the forward and delete into two separate converters with very little logic:


    Code
    ImportConverters = 1ImportConverter0 = delete 0040,9210ExportConverters = 1ExportConverter0 = forward series compressed as jk to AISMIGRATION


    And still all I see is this, no mention of the ImportConverter at all in the log:


    Code
    Mon Feb 18 15:36:20 2013 Exportconverter0.0: queued forward ser - (single object of 48-241038290) to AISMIGRATION


    I also don't notice any difference in the logging after issuing the debuglevel:2 command.

  • Hi,


    have you tried to enter dgate --debuglevel:4 at a command prompt? The only reason I know why the delete would not work is that the item does not exist. At debuglevel that would be printed.


    You have some more flexibility with this:


    ImportConverters = 2
    ImportConverter1 = forward series compressed as jk to AISMIGRATION
    [lua]
    ImportConverter0 = print('before' .. Data['0040,9210']); Data['0040,9210'] = nil; print('after' .. Data['0040,9210']);


    All on one line. You can change these entries in dicom.ini without restarting.


    Marcel

  • I have tried dgate --debuglevel:4, but the only change in the log is:


    Mon Feb 18 17:08:15 2013 Server command sent using DGATE -- option


    Don't see any mention of delete failing because the item is missing...


    Code
    Mon Feb 18 17:08:59 2013 [recompress]: recompressed with mode = jk (strip=0)
    Mon Feb 18 17:08:59 2013 Importconverter1.0: queued forward ser - (single object of 48-241038290) to AISMIGRATION
    Mon Feb 18 17:08:59 2013 Rewritten file: /usr/local/conquest/data/2.16.840.1.114151.4.580.39312.5003.2367946/1.3.46.670589.11.17235.5.0.2248.2007082212580292391/1.2.840.113837.2947041227.20120224165613.1.dcm


    I'll try the lua.

  • Using your lua:


    Code
    Tue Feb 19 16:01:09 2013 *** lua run error [string "print('before' .. Data['0040,9210']); Data[..."]:1: attempt to concatenate field '0040,9210' (a nil value) in 'print('before' .. Data['0040,9210']); Data['0040,9210'] = nil; print('after' .. Data['0040,9210']);'
  • Hi Chris,


    Sorry, I forgot....


    The answer is simple, the data is in a sequence:


    (2005,140f)
    (0040,9210)


    So to delete it use lua:


    [lua]
    ImportConverter0 = if Data['2005,140f'] then Data['2005,140f'].LUTLabel = nil end


    Marcel

Participate now!

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