forward compressed as xx to

  • Marcel,


    I'm having trouble getting the "forward compressed as xx to" script command working. It seems like whatever is defined in acrnema.map takes precedence.


    For me, the following:


    acrnema.map

    Code
    TEST 127.0.0.1 4006 j1


    dicom.ini

    Code
    ExportConverter0 = forward compressed as j4 to TEST


    Results in this:


    ServerStatus.log

    Code
    UPACS THREAD 0: STARTED AT: Wed Dec 12 17:03:54 2012 Calling Application Title : "EFILM " Called Application Title : "CONQUEST " Application Context : "1.2.840.10008.3.1.1.1", PDU length: 28672 Presentation Context 0 "1.2.840.10008.5.1.4.1.1.1" 1 Presentation Context 1 "1.2.840.10008.5.1.4.1.1.1" 1Rewritten file: ./data/PatientID/StudyUID/SeriesUID/SOPUID.dcmUPACS THREAD 0: ENDED AT: Wed Dec 12 17:03:56 2012UPACS THREAD 0: TOTAL RUNNING TIME: 2 SECONDSExportConverter0.0: forward ./data/PatientID/StudyUID/SeriesUID/SOPUID.dcm to TESTAccepted compression: j1[recompress]: recompressed with mode = j1 (strip=1)


    This is 1416k, btw. I started poking around a bit in dgate.cpp, and I think I see what's happening.


    Starting around line 4549, it parses the compression type defined in the export converter:

    Code
    // preprocess the forwarder string if (memicmp(line, "forward compressed as ", 22)==0) offset = 28; // xx to where xx = 'is', 'un', 'n0'..'n4', or 'jl', 'jk', 'j0'..'j6' // xxNN same as above but NN is lossy quality // offer transfer syntax (compression) from forward string if (offset==28) { compress[0] = line[22]; compress[1] = line[23]; compress[2] = 0; if (line[24] != ' ') { compress[2] = line[24]; compress[3] = line[25]; compress[4] = 0; offset = 30; } }


    Everything is fine until it gets down to this chunk of code starting at line 4591:

    Code
    // get the to AE q = strchr(line+offset, ' '); if (q) *q=0; if(!GetACRNema(line+offset, (char *)host, (char *)port, (char *)compress)) { // it does not exist: get host:port strcpy(host, line+offset); p = strchr(host, ':'); if (p) { *p=0; strcpy(port, p+1); } else strcpy(port, "5678"); strcpy(compress, "UN"); }


    After it calls GetACRNema, I think what was stored in compress is overwritten with what's defined in acrnema.map.


    If I change those two blocks of code to something like the following, it works as expected:


    There's a similiar block of code for import converters starting around line 7008.


    I haven't tried it with the 1417alpha yet. But looking at its dgate.cpp, those sections of code didn't changed much.


    I apologize if this is a known issue, or it's not really an issue and I'm totally missing something. I searched around the forum, but I didn't find any similiar posts.

Participate now!

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