Posts by jweste

    Hi, Marcel

    I am back.

    In this route you use:

    -- query all studies on modality

    routes:get('/api/dicom/rs/modalities/:modality/studies', function (params)
    querystudies(request.query, params.modality)
    end )

    But, in 'querystudies' function you have:

    function querystudies($query) {
    $defaultTags = [
    "00080005", "00080020", "00080030",
    "00080050", "00080054", "00080056",
    "00080061", "00080090", "00081190",
    "00080201", "00100010", "00100020",
    "00100030", "00100040", "0020000D",
    "00200010", "00201206", "00201208"];
    processData($query, $defaultTags, array("99990C00"=>"PatientName"), "STUDY");

    My question is where params.modality will be used?

    Another question os about 'remoteecho'. Are you executing a echo in a modality or in the server?


    Ah, the problem is that looks like a numeric IP address to Gethostbyname in socket.cxx (it starts with a number and contains a .) I have updated the source to now scan for any character not . and 0-9. Can you try the adapted servertask.exe?


    Hi, Marcel,

    It works like a charm.



    In what sense? QIDO WADO and STOW are compliant, but I do not think the other items are in the dicom standard.

    Basically I want to create a nice interface for a web-based GUI, so I can also just make these private e.g. /api/conquest/modalities


    I can help you with node version if you need.

    Hi, Marcel,

    I think I found the problem.

    If I use a IP all works well.

    But If I use a hostname, conquest is unable to resolve it to a IP and I get an error.

    For sample. This is ok:

    servertask -p10979 -hCONQUESTSRV1 -q3.132.159.158 "--dolua:dofile([[./queryfunctions.lua]]);echo([[CONQUESTSRV1]])"

    returns: 1

    But servertask -p10979 -hCONQUESTSRV1 "--dolua:dofile([[./queryfunctions.lua]]);echo([[CONQUESTSRV1]])"


    "DICOM ERROR connect failed on socket level (called not running)"

    Searching in Stackoverflow(…ost-ip-address-from-a-url) C++ would need do something as below to get an IP when using hostname :

    On Linux

    #include <stdio.h>
    #include <netdb.h>
    #include <arpa/inet.h>
    int main()
    struct hostent *he=gethostbyname("");
    char *ip=inet_ntoa(*(struct in_addr*)he->h_addr_list[0]);

    On Windows

    #include <stdio.h>
    #include <winsock.h>
    int main()
    WSADATA wsaData;
    struct hostent *he=gethostbyname("");
    char *ip=inet_ntoa(*(struct in_addr*)he->h_addr_list[0]);

    I have tested resolving hostname to IP in node API and it works.

    Here is the node code:

    const { lookup } = require("dns").promises;
    const resolvehost = async (h) => {
      try {
        const result = await lookup(h);
        return result.address;
      } catch (e) {
        return "";

    What do you think to do it right into servertask?


    I think the problem is here:


    else if (argv[i][1]=='h') strcpy(MYACRNEMA, argv[i]+2);

    else if (argv[i][1]=='p') strcpy(Port, argv[i]+2);

    else if (argv[i][1]=='q') strcpy(ServerCommandAddress, argv[i]+2);

    The argument hostname:port as "" should be parsed to fill 'MYACRNEMA' and 'Port'

    I am not a C++ programmer and I dont have a PC with a stack dev tools mounted to try change it.

    Hi, Marcel

    Some of my users from conquest has no public IP.

    Then, I am trying to use ngrok to manage it.

    I have tried:

    > ngrok tcp 5678
    Session Status online Account Luiz Oliveira (Plan: Free) Version 2.3.40
    Region United States (us)
    Web Interface
    Forwarding tcp://> localhost:5678
    Connections ttl opn rt1 rt5 p50 p90 0 0 0.00 0.00 0.00 0.00

    If I use:

    F:\Programas\vuejs\nuxt-iclindoctor\server_iclindoctor\api\dicomapi>servertask -p5678 -hCONQUESTSRV1 -q127.0.0.1 "--dolua:dofile([[./queryfunctions.lua]]);echo([[CONQUESTSRV1]])"


    works well.

    But if I use hostname It doesn´t work:

    F:\Programas\vuejs\nuxt-iclindoctor\server_iclindoctor\api\dicomapi>servertask -p5678 -hCONQUESTSRV1 -qtcp:// "--dolua:dofile([[./queryfunctions.lua]]);echo([[CONQUESTSRV1]])"

    DICOM ERROR connect failed on socket level (called not running)

    F:\Programas\vuejs\nuxt-iclindoctor\server_iclindoctor\api\dicomapi>servertask -p5678 -hCONQUESTSRV1 "--dolua:dofile([[./queryfunctions.lua]]);echo([[CONQUESTSRV1]])"

    DICOM ERROR connect failed on socket level (called not running)

    when ngrok starts, It bind the IP to a port. I think the problem the port is changing from

    tcp://> localhost:5678

    Is possible conquest dgate support ngrok syntax "hostname:port" without '-p' parameter? I tried dgate without -p but I had the same problem.

    Mr Marcel,

    When I looked into links and I just compared with qido dicom standard.

    But, I agree with you.

    Regards, Luiz


    The wadors is ok as well using node api:

    dicomWeb: [


    name: 'CONQUESTSRV1',

    wadoUriRoot: 'http://localhost:3002/api/dicom/wadouri',

    qidoRoot: 'http://localhost:3002/api/dicom/rs',

    wadoRoot: 'http://localhost:3002/api/dicom/rs',

    qidoSupportsIncludeField: true,

    imageRendering: 'wadors',

    thumbnailRendering: 'wadors',

    enableStudyLazyLoad: false,

    supportsFuzzyMatching: false,



    Hi, Marcel,

    It didn´t works.


    [CONQUESTSRV1] ***[JPEG Library]: Unsupported marker type 0xf7

    [CONQUESTSRV1] ***[DecompressImage]: JPEG library decompression error

    [CONQUESTSRV1] *** lua run error [string " local ae='CONQUESTSRV1';..."]:10: attempt to index global 'x' (a nil value) in ' local ae='CONQUESTSRV1'; local q2=DicomObject:new(); q2.QueryRetrieveLevel='IMAGE' q2.StudyInstanceUID='' q2.SeriesInstanceUID='' q2.SOPInstanceUID='' local fr=1 local r = dicomget(ae, 'IMAGE', q2) x=r[0] x=x:Compress('un') x=x:GetImage(tonumber(fr)-1) local s=tempfile('.txt') f =, 'wb') f:write(x); f:close() returnfile=s '

    Hi, Marcel,

    I tried add compress. I get an error. Could you fix it?


    [CONQUESTSRV1] *** lua run error [string " local ae='CONQUESTSRV1';..."]:11: attempt to index global 'x' (a nil value) in ' local ae='CONQUESTSRV1'; local


    In your PHP qido api, when the result dataset is empty the http status code to return is 204 instead of 200.

    Is it working this way?

    Just comment these lines in index.vue:

    >>I will look at the extensions as well, managed to build them this morning (had to remove --parallel option , makes it extremely slow and drowns all the PC resources).

    I had the same problem. It stucks my PC and I had to reset it to boot again. I disabled --parallel when I tried.

    Another weird thing is that the exported package dicom-rt and dicom-seg has the same import name 'OHIFExtDicomSeg' but in different folders.

    If you open and look into index.umd.js from both, you can see it.

    >>can you change your app back to disable the scroll bar and use the limit and offset as well?

    I will look at it