Conquest as an automatic image-converter?

  • Hi,
    This is question about whether Conquest is what I need or not. A very "noob" question. Sorry about that.


    I am looking for a piece of software (looks like Conquest at the moment) to listen for new images from a few machines (Siemens ultrasound machines). It should then automatically convert these to jpeg (or possibly png) ant put the converted files in some folder. That is basically it. Preferably this should run on Linux (Windows could work) and work over a "normal" office-network.


    My client (I am a consultant of sorts) has this very specific need for their small practice. They are not interested in a big PACS system and would prefer not to even notice this server doing its job. Does this sound like something I should use Conquest for?


    When looking at the documents I have found I am not sure about the process-flow this would take:
    Listens for new images through a daemon. (The ultrasound machine is the one actively sending data)
    Triggers conversion on receiving new images. (alternative triggers an external script where I convert using ImageMagick which should work AFAIK)
    Saves converted images using with filename taken from some info sent from the ultrasound. (idnum, patient-id+number...)


    I would be grateful for any tips regarding setting up this kind of converter.
    thanks.
    /Martin

  • in your dicom.ini file you can add an export converter:
    Export converter:

    Code
    # Make directory using bat script# Convert images and add them in the correct directory##################################Exportconverters = 2ExportConverter0 = "mkdcmdir.bat %i"ExportConverter1 = "dcmj2pnm.exe +oj +Wm --scale-x-size 600 %f D:\www\temp\%i\%b.jpg"


    mkdcmdir.bat file:

    Code
    @ECHO OFF
    REM %1 = name of the directory to create
    REM # CREATE DIRECTORY TO HOLD JPG IMAGES IN WWW FOLDER
    mkdir D:\www\temp\%1
    @ECHO ON


    this should do the trick for you. - just hollar if you need any help.

  • hello
    i am interested in this functionality but I wonder what are the variables %i , %f, etc.
    would it be possible to create the JPEG in a folder with the patient name and a subfolder with the date?
    thanks

  • Hi,


    Sure, you can use a number of predefined tags like %f (filename) and %i (patient ID) in the converter string, but also any entry in the DICOM header (%V0010,0010), this is the patient name. Just look the syntax up in the manual.


    Marcel

  • I'm not at work I can't try it for now but do you have a sample file of a Linux bash script?
    I fear there will be a problem with the spaces when creating a folder with the patients name.
    will this command work?
    mkdir /home/jpegimages/$1
    $1 being the first argument containing %V0010,0010 (patname)


    It's out of topic but if anybody know...

  • Hum,
    Is ther something wrong in my syntax?


    What i tried:
    In dicom.ini:

    Code
    ExportConverters = 2ExportConverter0 = ./mkdcmdir.sh '%V0010,0010' '/%V0008,0020'ExportConverter1 = dcmj2pnm +oj +Wm +Sxv 1024 %f /home/dicom/jpeg/%V0010,0010/%V0008,0020/%b.jpg


    In mkdcmdir.sh

    Bash
    #!/bin/bashcd /home/dicom/jpegmkdir "$1"cd "$1"mkdir "$2"cd "$2"mkdir "$3"cd "$3"


    Note that if ina shell i run

    Code
    ./mkdcmdir.sh 'name firstname' 'year month day'

    it works.

  • You don't need a separate script to make the directories. mkdir with the switch --parents will make necessary parent directories so this should do what you want

    Code
    ExportConverters = 2
    ExportConverter0 = mkdir --parents "/home/dicom/jpeg/%V0010,0010/%V0008,0020"
    ExportConverter1 = dcmj2pnm +oj +Wm +Sxv 1024 %f "/home/dicom/jpeg/%V0010,0010/%V0008,0020/%b.jpg"
  • Hi,


    Im trying to do the same thing with windows but i cant seem to get any jpeg images
    my dicom ini is as follows


    ExportConverters = 2
    ExportConverter0 = mkdir "R:\LOCALPACS\Data\jpeg\%V0010,0010\%V0020,0011"
    ExportConverter1 = dcmj2pnm +oj +Wm +a %f "R:\LOCALPACS\Data\jpeg\%V0010,0010\%V0020,0011\%b.jpg"


    the server log shows
    [CONQUESTSRV2] Exportconverter0.0 executes: mkdir "R:\PACS_SERVERS\LOCALPACS_MR_2\Data\jpeg\DandyWalker\4"
    [CONQUESTSRV2] Exportconverter1.0 executes: dcmj2pnm +oj +Wm +a R:\LOCALPACS\data\0110817\1.3.12.2.1107.5.1.4.54546.30000006060500411659300011191_0004_000084_12384099970053.dcm "R:\PACS_SERVERS\LOCALPACS_MR_2\Data\jpeg\DandyWalker\4\1.3.12.2.1107.5.1.4.54546.30000006060500411659300011191_0004_000084_12384099970053.jpg"



    but when i look at the directory it only shows the dicom image files. There are no jpeg files


    anyone with an idea what going on?


    ajg

  • Just a few correction the dicom ini is


    ExportConverters = 1
    ExportConverter0 = cmd /c mkdir "R:\LOCALPACS\Data\jpeg\%V0010,0010\%V0020,0011"; dcmj2pnm +oj +Wm +a %f "R:\LOCALPACS\Data\jpeg\%V0010,0010\%V0020,0011\%b.jpg"


    The directories are properly created but there are no jpeg images


    ajg

  • Hi,


    This is a typical de-identification routine for 1.4.15alpha (all on one line):


    ImportConverter0 = newuids; set 0010,0010 to ""; set 0010,0020 to "%A0010,0020_%A0010,0030"; set 0010,0030 to "%V0010,0030[0,3]0101"; set 0010,1040 to ""; set 0010,2154 to ""; set 0032,4000 to ""; set 0032,1030 to ""; set 0033,100e to ""


    The accession number can be accessed with %V0008,0050


    So combining the two should be doable.


    Marcel

  • We're good with the de-identify process. We're just unable to get something similar to the process below to work. A folder is created, but no jpegs live there...


    So, in essence, we'd like to be able to send studies to a conquest instance, change the patient name to the accession number, then output images of that accession number as standard jpegs to a folder of that name (accession number not patientname)


    Quote from jasonslan

    in your dicom.ini file you can add an export converter:
    Export converter:

    Code
    # Make directory using bat script# Convert images and add them in the correct directory##################################Exportconverters = 2ExportConverter0 = "mkdcmdir.bat %i"ExportConverter1 = "dcmj2pnm.exe +oj +Wm --scale-x-size 600 %f D:\www\temp\%i\%b.jpg"


    mkdcmdir.bat file:

    Code
    @ECHO OFF
    REM %1 = name of the directory to create
    REM # CREATE DIRECTORY TO HOLD JPG IMAGES IN WWW FOLDER
    mkdir D:\www\temp\%1
    @ECHO ON


    this should do the trick for you. - just hollar if you need any help.

  • Hi,


    I believe placing an export converter in "" is wrong. "" are used around strings inside the export converter.


    For debugging, if you precede your exportconverter1 with a nop (no operation), the log will show what line it wanted to execute....


    Code
    ExportConverter1 = nop dcmj2pnm.exe +oj +Wm --scale-x-size 600 %f D:\www\temp\%i\%b.jpg


    In 1.4.15alpha, there is also a convert to jpg dgate command:


    Try


    Code
    ExportConverter1 = dgate.exe "--convert_to_jpg:%f,600,D:\www\temp\%i\%b.jpg,//0"


    This should print frame 0 with automatic level and window.


    Marcel

  • Marcel,


    Thanks again, that worked great. We made some changes as shown below. When we set %i, it used the patient's real ID. We therefore used import converters to change the name field to the accession number, then used that as folder name for the jpegs. We wanted larger images, so we experimented with the scale-x-size setting. Setting it to 5000 gives us 600K-600K images which we think will be okay. How does that setting work? What if we wanted larger jpegs?


    ExportConverter1 = nop dcmj2pnm.exe +oj +Wm --scale-x-size 5000 %f D:\retinal\%V0010,0010\%b.jpg


    Thanks again!


    Mike.

  • Hi,


    You will have to look that up for dcmj2pnm wich is not my product. For dgate --convert_to_jpg, the software does an integral (1, 2, 3, ..) downsize to below the specified size for the horizontal axis.


    Marcel

Participate now!

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