Image corruption when uncompressing

  • I have a lot of data resulting from an acquired hospital's migration that must not be fully DICOM compliant. Our PACS displays them as sort of a ghost outline with a grey background. Once uncompressed, these images display fine in my PACS, but conquest doesn't properly uncompress the file (using builtinJPEG or without). Sante DICOM editor can/does uncompress them successfully, as well as command line tool gdcmconv.exe (part of the Grassroots dicom package - documentation here - http://gdcm.sourceforge.net/html/gdcmconv.html)


    Neither of those tools are particularly user friendly, and I hope to be able to automate using one of my Conquest instances. The manual hints about being able to use an external program to modify files (as part of an exportconverter), but I couldn't find any examples of how to do this. Can this also be done with an importconverter? (I'd need to run the executable, as well as some command line options - including the path to where the file is located)


    Also - if you would want to take a look at some of the files to see WHY it failed in the first place, please let me know.


    Thanks in advance!

  • Hi,


    which version of conquest did you use?


    To run an external program on incoming dicom data you can use:


    ImportConverter0 = process with decompress.bat


    Where the first and only command line parameter passed to decompress.bat is the filename of a file you should process.


    hope this helps.


    Marcel

  • on version - 1.4.17d


    I am trying to duplicate from within a lua script. I've tried:
    os.execute ('C:\\DicomWorking\\UC.bat '..Filename)
    print(script('forward to PACS'))
    In the above example, UC.bat runs gdcmconv on the file, but the file that conquest forwards to PACS and stores is still the original/bad DICOM.


    I also tried modifying UC.bat to run gdcmconv and send via storescu (and removed the forward to pacs in the lua) - this results in Good images in PACS, but conquest is still storing the orginal/bad DICOM in it's database. Is there something other than "Filename" that I should be referencing?

  • Hi,


    try to run this script on an ImportConverter. And to make it work for dropped files, set ImportExportDragAndDrop to 1 in dicom.ini.



    Data:Write('tempfile'..Data.SOPInstanceUID)
    os.execute('uc.bat tempfile'..Data.SOPInstanceUID)
    Data:Read('tempfile'..Data.SOPInstanceUID)


    where tempfile could be anywhere.


    Marcel

  • yep - running my lua script as my only importconverter and ImportExportDragAndDrop is enabled. I'm using a watchfolder to drop the file into.


    Using your script results in a new file being saved under c:\dicomserver (this new file gets decompressed creating a much larger file size). Unfortunately the file stored to the mag device is the original DICOM file, and not the expanded/fixed DICOM file.

  • Hi,


    the sample script reads the file with the name specified


    'tempfile'..Data.SOPInstanceUID


    Is the is name the decompressed image is stored to?


    Marcel


    B.T.W. I have asked Bruce Barton to look at the file - he integrated jpeg2000 in the server.

Participate now!

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