Web server

  • Hi, Marcel,

    Would be possible I create my owner web viewer from scratch?

    I´d like to use vuejs and papaya viewer(for sample) in the front end(the front end, I guess will be easier).

    On backend, I´d like to use nodejs(javascript). I wouldn´t prefer to use lua script or apache (or IIS) as web server.

    My main problem is how submit the query´s to conquest and take the result to send to front end.

    If this is possible, I will put the code to community.



  • Hi Luiz,

    this is definitively possible. You do need a gateway to conquest, which in its most simple form is dgate.php(which runs dgate,exe to do queries). This would run start.lua that contains commands to do queries. Once you have done the queries you can best access the images through WADO, which can also be done through dgate.php.

    Of course this is not node.js based. If you want to do that you can probably access the database directly, or use a DICOM library to access conquest.


  • Hi, Marcel

    I am lost.

    I´d like to run dgate.exe in a node child process without to use dgate.php and get the results to patients, study, series and images.

    Is it possible?

    My problem with dgate.php is that many html are hard coded and It needs a web server.

    I don´t need the html generated by dgate.php.

    My intent is create a nodejs rest api running dgate.exe in a child process and get the studies, get series .....

    I need only issue a dgate command using nodejs and get the data results in the backend to send to front.

    I tried to use dgate.php but I had no look, because I have no CGI envs such as




    But I did a test, following your sugestions:

    Regards, Luiz

  • Yeah, you need to set environment variables to run the CGI interface. Of course you can all use the --commands to do queries


    Thanks, Marcel

    I get success with some --comands.

    Now, I need a list the dicom image files with path and filename.

    I need this data to format and send to front end.

    I am stuck with this comand:

    --imagefinder:srv|str|fmt|file --- List images on server

    dgate.exe "--imagefinder:CONQUESTSRV1|="

    This command list the images fields, but no location of the files

    So, I am trying the next(I don´t know if this will return the complete path+filename):

    --imagelister:srv|pat|ser|fmt|file List (local) files in a series

    dgate.exe "--imagelister:CONQUESTSRV1|66971|"

    But I get a empty result.



  • Hi, Marcel

    It doesn´t work here:

    F:\Programas\AppProg\dicomserver1419b>dgate.exe "--imagelister:CONQUESTSRV1|66971"

    There is no result in windows cmd console

    Here is the conquest log:

  • You need to use local as AE.


    Hi, Marcel

    It´s working.

    I had success to create a basic nodejs api to get patients, studies, series, series and images.

    And, I papaya can access the images in my local PC conquest installation

    For now, I have conquest running in local PC and my nodejs api too.

    In production cases, the nodejs api will not running in the same PC as conquest.

    For sample, this code works well in my dev PC withg nodejs and conquest installed:

    const { exec } = require("child_process");
        `F:\\Programas\\AppProg\\dicomserver1419b\\dgate.exe   "--query:DICOMPatients|PatientID,PatientNam|PatientNam like 'paciente01%'|%s,%s" `,
        function (error, stdout, stderr) {
          res.send({ data: stdout });

    How could I execute dgate in my backend PC, without conquest installed, to access the data in the remote PC with conquest?

    In my backend PC, If I create a folder such as "dicomapi", for example, and copy "dgate.exe" and "dicom.ini" to it, do I can run dgate.exe to get the data? Something as:

    F:\\dicomapi\\dgate.exe   "--query:DICOMPatients|PatientID,PatientNam|PatientNam like 'paciente01%'|%s,%s"  

    Is yes, is there some configuration I have to do?

  • Hi,

    you can remote using the -p -h and -q options.

    GATE: UCDMC/NKI DICOM server thread and PACS utility application 1.5.0c


    1) DGATE <-!#|-v|-u#> Report as in dicom.ini|stdout|UDP(#=port)

    [-^|-l|-Lfile] GUI/Normal/Debug log to file

    [-p#|-hAE|-qIP|-b] Set port|AE|Target IP|Single thread debug mode

    [-wDIR] Set the working directory for dgate(ini,dic,...)



  • When I execute the dgate command, it ask for dicom.ini, dgate.dic.... Do I need these conquest files or install conquest in my backend PC to get data from remote conquest server in other machine?

  • Yeah, minimal is dgate.dic and for dicom.ini - the information is not important:

    TCPPort = 5678
    Dictionary = dgate.dic


    Hi, Marcel

    I have working some days in this project and now I have something working.

    Here is a video showing my progress API making an nodejs api with papaya, node.js and vue.js.

    I think the api will be better if dgate "--comands" had an option to results in json format.

    For now, I didn´t need a standalone app. I have used an existent app of mine to make tests.

    Firstly, I´d like to submit the code to your analysis in private. If this is possible, please tell me how I can do that.

    In the front end, I am using vue with vuetify framework. But the devs can use others options. The most important is the API.

    If you approve you can add it to community.



  • Hi Luiz,

    the current version in github has lua command Serialize with json output. It is not hard to add json versions or use -- commands to send lua code to get json out.

    Let me contact you via a pm.


  • This is one way:

    local s=tempfile('.txt') local f=io.open(s, "wb") f:write('data to return') returnfile=s f:close();

    returnfile is loaded into a private dicom tag and then passed to the client where it is printed.


  • I sent the code to your email.

    Could you post a complete sample returning dicom studies with lua and json output format to stdout?

Participate now!

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