Multi Compression With One instance of DGATE

  • Hi,


    kFactorFile = /home/user/data/dicom.sql
    ACRNemaMap = /home/user/data/acrnema.map
    SOPClassList = /home/user/data/dgatesop.lst


    These are correct.


    My /home/user/data/acrnema.map :
    CONQUESTSRV1 localhost 20000 un

  • Hm,


    can you try with a different browser? I ran it with firefox 25.0.0.1 on a windows 7 machine and it just works. I may be generating a strange syntax for the XML file that is not allowed in different browsers. Can you maybe also compare the generated XML file syntax with the samples on the weasis website? I used those as reference.


    Marcel

  • Hello Marcel,


    I can't make dgate works with weasis in wado connexion...
    But it works fine with the directdownloadfile directive.


    In one of your precedent post, you've said that it is possible to make a script to save the same study withg differents compressions (in different directories).
    Can you help me to do this because i don't even know the lua syntax to do that.
    All i want is : for one study have the uncompressed files, j1 compressed files in j1 directory and jk compressed files in jk directory :
    e.g :
    dicom/patientid/all_dcm_uncompressed
    dicom/patientid/j1/all_dcm_j1compressed
    dicom/patientid/jk/all_dcm_jkcompressed


    Many thanks.

  • Hi,


    too bad you cant get Weasis to work in WADO mode. It may be a Linux specific issue.


    For the multiple compression try something like:


    Code
    [lua]
    ImportConverter0=mkdir('dicom/'..Data.PatientID..'/j1'); script('compression j1'); Data:Write('dicom/'..Data.PatientID..'/j1'..Data.SOPInstanceUID..'.dcm')
    ImportConverter1=mkdir('dicom/'..Data.PatientID..'/jk'); script('compression jk'); Data:Write('dicom/'..Data.PatientID..'/jk'..Data.SOPInstanceUID..'.dcm')
    ImportConverter2=script('compression un')


    Marcel

  • Hi,


    I just found this. The entries:


    [weasisseriesxml]
    source = viewers\weasisseriesxml.lua


    [weasisstudyxml]
    source = viewers\weasisstudyxml.lua


    are missing from the dicom.ini from the windows distribution. If you add those everything works from the box, even though the folders / ip addresses in dicom.ini may need changing.


    Marcel

  • Hi Marcel,


    sorry for my late answer !!!


    When i use Importconverter with lua script it returns an error :

    Code
    *** lua run error compress.lua:1: attempt to call global 'mkdir' (a nil value)


    I have tested with /bin/mkdir but it does not work at all.


    Any idea ?


    Thanks

  • Hi Marcel,


    Many thanks for all.
    I do not need to create directory really !
    I simply rename the dcm with j1- or jk- prefix....
    So it si good for me like this.


    Is there any documentation about the whole syntax for scripting ni lua in dgate ?
    In order not to ask you for the next Times !!!!


    I Will try to make wado work....


    Thanks before.

  • Hi,


    when i'm using this in my dicom.ini :

    Code
    [lua]ImportConverter0 = script('compression jk'); Data:Write('dicom/'..Data.PatientID..'/jk-'..Data.SOPInstanceUID..'.dcm')ImportConverter1 = script('compression un')


    dgate only convert dcm to jk but not un !!!
    It says for each file :

    Code
    Wed Jan 15 23:52:00 2014 Written file: /home/user/dicom/6009/1.2.840.113619.2.55.3.2265615377.749.1389012136.720.59.dcm
    Wed Jan 15 23:52:00 2014 Importconverter-1.0: compression to un
    Wed Jan 15 23:52:00 2014 [recompress]: recompressed with mode = un (strip=0)
    Wed Jan 15 23:52:00 2014 Importconverter-1.0: compression to jk
    Wed Jan 15 23:52:01 2014 [recompress]: recompressed with mode = jk (strip=0)


    Two files are created but with only one compression (the same : jk).
    When i'm using separatly each one it works...


    Is there any problems with this method ?

  • Hi,


    It's working when the un instruction is the last one.
    Now it works.
    But there is a problem with compression by using lua scripts !
    When i'm using the dropfilecompression in dicom.ini to compress, the result is good.
    With the lua instruction (using inportconverter0 = compress.lua) the dcm are not good and very compressed (not usable) !!!


    Is there any difference between the two algorithms of compression ???
    And so, is it possible to do the same thing using directly inportconverts without lua ?


    Thanks.

  • Hi,


    the compression command compresses the file without backup, so if you compress to another mode it has to uncompress and the compress to the other mode. This may cause the issue. The lua code uses the same scripts.


    There is no way to avoid this other by saving the uncompressed image to disk, compress it, save it compressed and then load the uncompressed image again.


    Can you try this?


    Marcel

  • Hi,


    i'm going to try this.


    When i'm using jlXX (jl10) compression on CT studies, there is a sort of frame or grid which appears in the background of each slide.
    That don't in jk compression.


    Is there any problem with these algorithms or it's my bug ?


    Thanks

  • Hi Esteraph,


    I have not written the jpeg2000 implementation (it uses the Jasper one) nor its interface. I guess a good test would be to compress jpeg2000 with different programs and compare the results. How much compression do you get with JL10?


    Marcel

  • Hi,


    i'm using gdcmconv to compress in j2k too and it's fine.
    With JL10, it depends on studies, generally we have /10 (i think jl10 means 100/10 = 10, jl5 means 100/5 = 20) ???


    Using gdcmconv works fine but it is slower and i don't want to use many other system but dgate !!!
    If it is a Jasper problem, perhaps it is because i'm working under linux....


    If anyone can test it under windows...


    Thanks

  • Hi all,


    after many changes made with Marcel, i give you the way to do good compression in Conquest by using lua scripting :


    What is important to have (for me) :
    Context :
    - dgate-1.4.17c-64bits
    - linux server Ubuntu 12.04.4 LTS 64 Bits
    - postgresql 9.1.12


    dicom.ini :

    Code
    FileNameSyntax = %id/%sopuid.dcm# Configuration of compression for incoming images and archivalDroppedFileCompression = unIncomingCompression = unExportConverters = 1[lua]ExportConverter0 = dofile('compress.lua')


    compress.lua :

    Code
    x = DicomObject:new()
    x:Read('dicom/'..Data.PatientID..'/'..Data.SOPInstanceUID..'.dcm')
    print('compressing with jk')
    x:Script('compression jk');
    x:Write('dicom/'..Data.PatientID..'/jk-'..Data.SOPInstanceUID..'.dcm')
    x:Read('dicom/'..Data.PatientID..'/'..Data.SOPInstanceUID..'.dcm')
    print('compressing with jl')
    x:Script('compression jl');
    x:Write('dicom/'..Data.PatientID..'/jl-'..Data.SOPInstanceUID..'.dcm')


    The result is that my studies are available in three compression mode :
    - un
    - jk
    - jl


    Very intressting for those who can't make Weasis works in wado mode with linux...
    You can use downloading mode instead !


    Bye, and many thanks to Marcel !

Participate now!

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