Posts by jaimerojast

    This is a display status from my server:


    DICOM server 'DICOMSRV0174' (version 1.5.0b, port 43844, bits 64) was started on Mon Nov 9 19:27:43 2020

    Old JPEG decoder=0, JPEGLIB jpeg codec=1, LIBJASPER jpeg2000 codec=1

    Run time (s) total 3, query 0, load 0, save 0, compress 2, process 0, gpps 0

    Associations=0; Threads=55 (1 open); Images sent=0, recieved=0, forwarded=0

    Images printed=0, in color=0

    Activity: Echo:0, Find:0, Move:0, Unknown:0, gpps:721

    Images (de)compressed: NKI 0, JPEG 34, JPEG2000 0, RLE 0, Planes removed 0, Palettes removed 0, Downsize 0

    Space on MAG0 : 42760 MByte

    Database type: native PostGres connection


    regards,

    James.

    Hi Marcel,


    For a long time I had this problem, that when from OSIRIX / HOROS I was looking for multiple modalities, the conquest showed nothing.


    Searching the manual, I found the QueryResultConverter0, and did the following:



    dicom.ini

    Code
    QueryConverter0 = queryconverter.lua
    QueryResultConverter0 = queryresultconverter.lua


    queryconverter.lua

    Code
    modalities=Data.ModalitiesInStudy
    if string.find(Data.ModalitiesInStudy,'\\') then
    Data.ModalitiesInStudy=""
    end


    queryresultconverter.lua

    Code
    if string.find(modalities,'\\') then
    if not string.find(modalities,Data.ModalitiesInStudy) then
    destroy()
    end
    end


    At least it works for me until now.

    I wanted to know if you can give me some additional suggestions to make sure everything goes well.

    Thank you,


    Jaime.

    Marcel,


    it's work!, thnks!


    Code
    local state = servercommand('echo:SERVER2')
    if string.find(state,'DOWN') then
    print(state)
    script('reject')
    end
    if string.find(state,'UP') then
    script('forward to DICOMSRV001 channel *')
    end


    but, i don't understand yet, how could be used this:


    Quote

    [lua]

    association = local flag

    have you an example with more details?


    thnks for you help...


    James

    Marcel,


    First, say hello and I hope you are very well.


    I need your help, you could tell me how to control a disconnect error when I do an Import please.


    when this error occurs, or similar:


    "Forward failed to connect to host"


    i need to send a reject command for to stop the forward in progress.


    It's posible something like this?


    ImportConverter0 = ifnoterror {forward to DICOMSRV1 channel *}, reject;

    if not script("forward to DICOMSRV1 channel *") then script('reject');


    it's just an idea as an example


    or a try catch or something..


    thanks for your help

    regards

    Marcel,


    Find a way for the blocked AETITLE to appear. I do not know if it is the most appropriate, but, it serves me for now.


    deivr.cxx file


    Function


    BOOL DicomError(int error, const char *message, int info)


    Before


    Code
    printf("DICOM ERROR "); printf(message, info); return FALSE;


    Now


    Code
    printf("DICOM ERROR "); printf(message, info); char msgerror[500]; sprintf(msgerror, "DICOM ERROR %s\n", message); OperatorConsole.printf(msgerror); return FALSE;


    With this change the message appears, and others that did not appear.


    I also managed to locate where the message "Calling AE title not accepted" came from and also did some tests, and also worked.


    pdu.cxx file.


    Function


    BOOL PDU_Service :: InterogateAAssociateRQ()


    Before


    Code
    char *msg = "Calling AE title not accepted: "; char *aet = (char*)AAssociateRQ :: CallingApTitle; char msgshow[100]; sprintf(msgshow, "%s%s", msg, aet); DicomError(DCM_ERROR_ASSOCIATION, msgshow, 0); return ( FALSE );


    With added code


    Code
    char *msg = "Calling AE title not accepted: ";
    char *aet = (char*)AAssociateRQ :: CallingApTitle;
    char msgshow[100];
    sprintf(msgshow, "%s%s", msg, aet);
    DicomError(DCM_ERROR_ASSOCIATION, msgshow, 0);
    OperatorConsole.printf(msgshow);
    return ( FALSE );


    And worked well too.


    For now I'll keep changing the file deivr.cxx.


    Of course, I'm awaiting me what you suggest it, to make it more optimal.


    Regards,


    James.

    Hi,


    I would like to limit access by registering the AETITLES in the file dgtesop.lst with RemoteAE, my question is, it may appear in the log which is the AETITLE that is blocking?


    Example: *** multiplex: connection terminated [CONQUESTSVR1]


    In this case CONQUESTSVR1 would not be registered in the dgtesop.lst file with Remote AE.


    I have examined the code, and I still can not put that record.


    Currently it is like this:


    Code
    OperatorConsole.printf ("*** multiplex: connection terminated\n");


    Could there be anything like this?


    Code
    OperatorConsole.printf ("*** multiplex: connection terminated [%s]\n", CallingApTitle);


    Regards,


    James.

    Hi,


    Here are more examples.


    Sintaxis: --modifystudy:patientid,studyid,script


    PatientID -> ./dgate --modifystudy:1122334-4,81617,"set 0010,0020 to \"1122334-4\"; "
    PatientName -> ./dgate --modifystudy:1122334-4,81617,"set 0010,0010 to \"JHON^REDS\"; "
    PatientSex -> ./dgate --modifystudy:1122334-4,81617,"set 0010,0040 to \"M\"; "
    PatientBirthDate -> ./dgate --modifystudy:1122334-4,81617,"set 0010,0030 to \""19620323\"; "
    AccessionNumber -> ./dgate --modifystudy:1122334-4,81617,"set 0008,0050 to \"77777\"; "
    StudyDate -> ./dgate --modifystudy:1122334-4,81617,"set 0008,0020 to \"20160920\"; "
    StudyTime -> ./dgate --modifystudy:1122334-4,81617,"set 0008,0030 to \"133000\"; "
    StudyDescription -> ./dgate --modifystudy:1122334-4,81617,"set 0008,1030 to \"RX Abdomen\"; "
    ReferPhysician -> ./dgate --modifystudy:1122334-4,81617,"set 0008,0090 to \"ReferPhysician\"; "
    Modality -> ./dgate --modifystudy:1122334-4,81617,"set 0008,0060 to \"CR\"; "


    regards,


    James.

    lua code after a studio is fully imported?
    Sent: Fri Nov 25, 2016 5:56 pm
    by jaimerojast


    Dear Marcel,


    A question, how can I run a lua code after a studio is fully imported?


    It's possible?


    Regards,


    James.


    Re: lua code after a studio is fully imported?
    Sent: Sat Nov 26, 2016 12:15 pm
    From: marcelvanherk
    To: jaimerojast


    Hi


    process study after 300 by test.lua %VStudyInstanceUID


    Starts after 300 s, the StudyInstanceUID shows up as command_line.


    Marcel

    get file size from dicomimages table
    Sent: Sat Nov 26, 2016 12:21 pm
    by jaimerojast


    Master,


    Is it possible to get the file size from the dicomimages table?


    Or how can I do it?


    Regards,



    Re: get file size from dicomimages table
    Sent: Sun Nov 27, 2016 10:22 am
    From: marcelvanherk
    To: jaimerojast


    Hi,


    it is not, unless you can calculate it from Rows and Columns ;->>>>


    I would prefer if you post these questions on the forum, my forum mailbox is very small and it fills. Also other can use the answers.


    Marcel

    Hi Marcel,


    I have a problem with Lua Script. I dont know why i can't to make this work. :(


    Am using ubuntu 14 x64 y apache 2.4.7.


    In my cgi-bin directory, this files exists:


      acrnema.map
      dgate
      dicom.ini
      dicom.sql
      sample.lua


    The apache conf file, have this


    Code
    ScriptAlias /cgi-bin/ /server/conquestdicom/webserver/cgi-bin/ <Directory "/server/conquestdicom/webserver/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Require all granted </Directory>


    Inside dicom.ini, i put this:


    Code
    [sample]source = sample.lua


    This is the url to navigate : http://192.168.1.22:8080/cgi-bin/dgate?mode=sample


    this is the contents of sample.lua


    HTML
    HTML('Content-type: text/html\n\n')print([[<!DOCTYPE html>]])print([[<html>]])print([[<head> <title>sample 1</title> <meta charset="UTF-8"/></head>]])print([[<body>]])b=newdicomobject(); b.PatientName = '*'; a=dicomquery('CONQUESTSRV1', 'PATIENT', b);print('patientname: ',a[0].PatientName);print('ACR: ', get_amap(0),[[</br>]])print([[</body>]])print([[</html>]])


    and when browsing the website, this is the source from the page



    in the command line i run this


    Code
    ./dgate --luastart:"dofile('webserver/cgi-bin/sample.lua')"


    and serverstatus.log show this



    i run this to


    Code
    ./dgate --dolua:"b=newdicomobject(); b.PatientName = '*'; a=dicomquery('CONQUESTSRV1', 'PATIENT', b);print('patientname:', a[0].PatientName);"


    and return


    Quote

    patientname: XXXXXXXX.


    apparently, some error occurs with cgi, since HTML code is shown truncated.


    what is i need to configure that LUA work correctly?


    help me, please..


    Regards,


    James.

    Thnks Marcel,


    It worked!


    dgate64 --deleteimagefile:E:\CONQUEST\data\09050951-9\1.2.392.200036.9125.3.18417211130146153.64698688751.4556356_1006_001006_14206880020005.dcm



    [CONQUESTSRV1] Server command sent using DGATE -- option
    [CONQUESTSRV1] Deleting database entry for image: E:\CONQUEST\data\09050951-9\1.2.392.200036.9125.3.18417211130146153.64698688751.4556356_1006_001006_14206880020005.dcm
    [CONQUESTSRV1] Removed file: [MAG0:09050951-9\1.2.392.200036.9125.3.18417211130146153.64698688751.4556356_1006_001006_14206880020005.dcm]



    Regards..

    Hi Marcel,


    Might you help me with this command please... I tried to find the correct way to remove an image file , but nothing has been good to me ....



    i run this..


    dgate64 --deleteimagefile:09050951-9\1.2.392.200036.9125.3.18417211130146153.64698688751.4556356_1006_001006_14206880020005.dcm



    but in the logs, appears this..


    [CONQUESTSRV1] Server command sent using DGATE -- option
    [CONQUESTSRV1] ***[DeleteImageFile] 09050951-9\1.2.392.200036.9125.3.18417211130146153.64698688751.4556356_1006_001006_14206880020005.dcm -FAILED: Error on Load



    regards..

    Marcel, how i could enable the delete link on the conquest web?


    The manual appears thus: "the delete link to remove the current series (not enabled by default)"


    Thank you very much for your help ...


    Jaime.