Web server

  • Hi, Marcel


    In this function, is there a way to compress the dcm file on tye fly to reduce the amount of data in the network and get a faster image load?


  • Hi,


    no this works on x in memory of course after you read it and before you write it. Usually I read the compression by getting the filesize on disk. In straight lua:


    Code
    function filesize(f)
    local h = io.open(f)
    if h==nil then
    return 0
    else
    local s = h:seek('end', 0)
    h:close()
    return s
    end
    end
  • Hi, Marcel


    I have readng about wado specs.


    As I understood a WADO request is simply a HTTP GET request that contains the Study, Series, and Instance identifiers.


    For instance,

    Code
    http://localhost/wado?studyUID=1.2.840.113845.11.1000000001951524609.20121203131451.1457891&
    seriesUID=1.2.840.113619.2.278.3.262930758.589.1354512768.115&
    objectUID=1.2.840.113619.2.278.3.262930758.589.1354512768.116.1&
    contentType=application%2Fdicom&
    requestType=WADO

    My question is how I set the query string to search studies by patient name or patient id using WADO.


    If this is possible, my intent will be change the API to become WADO compatible.

  • Hi


    That is a good idea, but WADO only provides access to objects, it has no query functionality. For that you need to implement dicomweb, as explained here:


    https://en.wikipedia.org/wiki/DICOMweb


    and here:


    https://www.dicomstandard.org/…4/dicomweb-cheatsheet.pdf


    If you want to export WADO through node.js, conquest has a WADO interface that is exposed to servercommand as follows (in C):


    Code
    sprintf(obj, "%s\\%s\\%s", studyUID, seriesUID, objectUID);
    sprintf(lwfq, "%d/%d/%d/%d", atoi(windowCenter), atoi(windowWidth), atoi(frameNumber), atoi(imageQuality)
    sprintf(size, "%d/%d", atoi(rows), atoi(columns))
    sprintf(command, "wadorequest:%s,%s,%s,%s,%s,%s,%s,%s,%s", obj, lwfq, size, region, contentType, transferSyntax, anonymize, annotation, bridge);
    SendServerCommand("", command, console, NULL, FALSE);

    in lua the last line would be servercommand(command, 'cgi')


    Marcel

  • Luiz,


    if you use the binary dgate.dic (it is in the distribution look for ~150k size) instead of the text one your server will be faster. You do need to have your additions.


    Marcel

    Hi, Marcel


    But I need add in dgate.dic the next tags. And I can´t do it into binary.

    Code
        ConquestDevice: "",
        ConquestObjectFile: "",
        ConquestImageDate: "",
        ConquestImageTime: "",
  • Marcel,

    Does conquest dgate can return a json dicomweb(qido,wadors) compatible for studies, series......? If yes, I can do the qido api.


    I have seen https://github.com/knopkem/dic…se-native/tree/master/src, but I don´t use c++. It´s compiled and used in dicom-dimse-native (https://github.com/knopkem/dicom-dimse-native) with javascript.


    But, But if use these module, I wouldn´t need use dgate.

    And I think dgate is faster than dicom-dimse-native.


    The studies results in dicomweb format will need something as:



    Luiz

  • Hi,


    it does not. It returns json using the dicom tag name as key. On possibility is to code the translation using the dictionary in js. Another is to extend the code is function luaSerialize in dgate.cpp with yet another flag. All the information is there.


    Can you show a longer example of the dicomweb format?


    Marcel

  • It´s hard find return samples. But I found it:

    // The following example is a QIDO-RS SearchForStudies response consisting

    // of two matching studies, corresponding to the example QIDO-RS request:

    // GET http://qido.nema.org/studies?P…&includefield=all&limit=2

  • The code should be changed as follows (this is for myself):


    add parameter dicomweb


    every check for an item having one value should be bypassed for dicomweb e.g.


    if (vr->Length==4 && !dicomweb)

    if (vr->Length>4 | | dicomweb)


    For dicomweb the variable name should be generated as folllows, e.g.:


    "00201208": {

    "vr": "IS",

    "Value":


    Then add a variable br3 that is empty except for dicomweb where it would be "}"


    to add the the closing } all sprintf lines like 7779 should then become:


    Index+=sprintf(result+Index, "%s%c\"%s\"%s,", name, eq, t, br3);


    I think this would bring it a long way for query results, it would not be enough for images.


    Marcel

  • Great,

    My 'c++' and dicom knowledge is poor. Otherwise, I'd help on it.


    Luiz

Participate now!

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