Posts by backsubzero

    Hello Marcel,


    How could I block all access to conquest, only authorizing if the AETITLE or IP is in dicom.ini or acrnema.map ? I search in manual but I didn't find it...


    How can I limit, for example, that only one AETITLE can access the worklist? I believe that features like this could help with security :)


    I try to use the acrnema.map to limite, but it was not possible :(


    thanks for help :)

    Hi,


    I try


    I put ' in your command

    in work/webserver

    ./servertask -p5678 -q192.168.200.222 servercommand'([[print(1)]])'


    in dgate server show

    0000,0002 18 UI AffectedSOPClassUID "1.2.840.10008.1.1"

    0000,0100 2 US CommandField 48

    0000,0110 2 US MessageID 1

    0000,0800 2 US DataSetType 257

    0002,0010 17 UI TransferSyntaxUID "1.2.840.10008.1.2"

    9999,0400 8 LO ConquestConsoleComma "print(1)"


    However, it still cannot list the patients, it doesn't give any message, is there a path I could try?


    The only change I made was this one, I didn't change anything from the standard example that's in 1.5.0c.


    :(

    Hi, Marcel


    I need help, I believe I'm trying something that's not possible :)


    Is there a way to use the servertask on a machine different from where the dgate is? I tried to do this from a machine where the webserver "nginx + php7.4" would be, leaving the one that runs conquest exclusively for the dgate.


    The IP of the web machine would be 192.168.200.240, the dgate/conquest runs on 192.168.200.222


    I'm doing this to try to make the OHIF V3 work lightly, besides that I had to leave a lot of things static in V3 :( JS is complex for me :)


    my api config...


    <?php

    // conquest server na workstation/webserver

    //$exe = 'servertask.exe -p4004 -q127.0.0.1';

    // conquest server no servidor linux

    $exe = 'servertask.exe -p5678 -q192.168.200.222';


    $quote = '""'; // quotes in command line


    if (PHP_OS_FAMILY != 'Windows') { // On Linux:

    $exe = './' . $exe; // start as ./servertask

    $quote = '\"'; // quotes in command line

    }

    $userlogin = false; // uses single file login system

    $wplogin = false; // uses wordpress login system



    thanks for help

    Hello, I noticed that you managed to get it to operate, is your xampp on port 3000? How was the image called? I didn't find in the files how to put it as the default viewer in the web environment.


    The OHF is beautiful but I don't know how to use it yet :)


    Thank you for your help :)

    Hello Marcel,


    I was in the delphi community compiling the GUI source, I realized that there are some interesting features that I didn't know about, is there any documentation of them?

    how can i use or activate these tabs?


    I'm talking about the tabs: Archiving, Tape backup, Weekly Checks.


    thanks for help :)

    Hi Marcel,


    I have a problem with Worklist now, I put in linux machine one Worklist, works fine with a old Mamography, but in new no math the patient by patientid


    Called Application Title : "WORKLIST "

    Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16352

    Number of Proposed Presentation Contexts: 1

    Presentation Context 0 "1.2.840.10008.5.1.4.31" 1

    Server Command := 0020

    Message ID := 0017

    0000,0002 22 UI AffectedSOPClassUID "1.2.840.10008.5.1.4.31"

    0000,0100 2 US CommandField 32

    0000,0110 2 US MessageID 23

    0000,0700 2 US Priority 0

    0000,0800 2 US DataSetType 0

    0002,0010 17 UI TransferSyntaxUID "1.2.840.10008.1.2"

    (ModalityWorkListQuery) search level:

    Query On Modality WorkList

    Queried item 0008 0030 is not in the database

    Queried item 0008 1110 is not in the database

    Queried item 0010 0021 is not in the database

    Queried item 0010 1000 is not in the database

    Queried item 0010 1010 is not in the database

    Queried item 0010 1020 is not in the database

    Queried item 0010 1030 is not in the database

    Queried item 0010 2154 is not in the database

    Queried item 0010 21b0 is not in the database

    Queried item 0010 21c0 is not in the database

    Queried item 0010 4000 is not in the database

    Queried item 0028 1300 is not in the database

    Queried item 0032 1033 is not in the database

    Queried item 0032 1064 is not in the database

    Queried item 0038 0010 is not in the database

    Queried item 0038 0011 is not in the database

    Queried item 0038 0050 is not in the database

    Queried item 0038 0300 is not in the database

    Queried item 0038 0500 is not in the database

    Queried item 0008 0100 is not in the database

    Queried item 0008 0102 is not in the database

    Queried item 0008 0103 is not in the database

    Queried item 0008 0104 is not in the database

    Queried item 0040 0020 is not in the database

    Queried item 0040 3001 is not in the database

    Queried item 0040 1010 is not in the database

    Queried item 0040 2016 is not in the database

    Queried item 0040 2017 is not in the database

    Queried item 0040 2400 is not in the database

    Issue Query on Columns: DICOMWorkList.SpecificCh, DICOMWorkList.StudyDate, DICOMWorkList.AccessionN, DICOMWorkList.ReferringP, DICOMWorkList.StudyDescr, DICOMWorkList.ReadingPhy, DICOMWorkList.Operator, DICOMWorkList.PatientNam, DICOMWorkList.PatientID, DICOMWorkList.PatientBir, DICOMWorkList.PatientSex, DICOMWorkList.MedicalAle, DICOMWorkList.ContrastAl, DICOMWorkList.StudyInsta, DICOMWorkList.ReqPhysici, DICOMWorkList.ReqProcDes, DICOMWorkList.Modality, DICOMWorkList.ReqContras, DICOMWorkList.ScheduledA, DICOMWorkList.StartDate, DICOMWorkList.StartTime, DICOMWorkList.PerfPhysic, DICOMWorkList.SchedPSDes, DICOMWorkList.SchedPSID, DICOMWorkList.PreMedicat, DICOMWorkList.ReqProcID

    Values: DICOMWorkList.SpecificCh = E'ISO_IR 100' and DICOMWorkList.PatientID = E'157828' and DICOMWorkList.Modality = E'MG' and DICOMWorkList.StartDate = E'20220224'

    Tables: DICOMWorkList

    Sorting (DICOMWorkList.PatientNam) DoSort := 1

    Records = 0

    C-Find (Modality Work List) located 0 records

    Arena 0:

    system bytes = 684032

    in use bytes = 510896

    Arena 1:

    system bytes = 544768

    in use bytes = 412496

    Total (incl. mmap):

    system bytes = 1363968

    in use bytes = 1058560

    max mmap regions = 2

    max mmap bytes = 446464

    UPACS THREAD 3: ENDED AT: Thu Feb 24 11:13:49 2022

    UPACS THREAD 3: TOTAL RUNNING TIME: 0 SECONDS


    config file.


    # This file contains configuration information for the DICOM server

    # Example Linux version using PostGres user postgres, pw postgres

    # Copy this file to dicom.ini to use it

    # 20051218: Set DoubleBackSlashToDB to 1 (needed for postgres)

    # 20100819: Set UseEscapeStringConstants to 1


    [sscscp]

    MicroPACS = sscscp

    Edition = Personal

    MyACRNema = WORKLIST

    TCPPort = 4031

    ACRNemaMap = acrnema.map

    kFactorFile = dicom.sql

    SOPClassList = dgatesop.lst

    SQLHost = 127.0.0.1

    SQLServer = pacs006

    Username = pacs_dbuser

    Password =

    PostGres = 1

    MySQL = 0

    SQLite = 0

    UseEscapeStringConstants = 1

    DoubleBackSlashToDB = 1

    TruncateFieldNames = 10

    MaxFieldLength = 254

    MaxFileNameLength = 255

    FixPhilips = 0

    FixKodak = 0

    UIDPrefix = 1.2.826.0.1.3680043.2.135.734410.36376560

    EnableReadAheadThread = 1

    PatientQuerySortOrder = 1

    StudyQuerySortOrder =

    SeriesQuerySortOrder =

    ImageQuerySortOrder =

    EnableComputedFields = 1

    TCPIPTimeOut = 500

    FailHoldOff = 60

    RetryDelay = 100

    QueueSize = 128

    WorkListMode = 0

    WorkListReturnsISO_IR = 100

    DebugLevel = 1

    Prefetcher = 0

    LRUSort =

    AllowTruncate =

    DecompressNon16BitsJpeg = 1

    UseBuiltInDecompressor = 1

    UseBuiltInJPEG = 1

    LossyQuality = 95

    IgnoreOutOfMemoryErrors = 0

    PadAEWithZeros = 0

    FileNameSyntax = 4

    DroppedFileCompression = j2

    IncomingCompression = j2

    ArchiveCompression = as

    PatientTableName = DICOMPatients

    StudyTableName = DICOMStudies

    SeriesTableName = DICOMSeries

    ImageTableName = DICOMImages

    DMarkTableName = DICOMAccessUpdates

    RegisteredMOPDeviceTable = RegisteredMOPIDs

    UIDToMOPIDTable = UIDToMOPID

    UIDToCDRIDTable = UIDToCDRID

    UTF8ToDB = 1

    UTF8FromDB = 1

    DebugLevel = 4

    PACSName = WORKLIST

    OperatorConsole = 127.0.0.1

    #WorkListReturnsISO_IR. = 100

    WorkListReturnsISO_IR_100 = 1

    MAGDeviceThreshhold = 0

    MAGDevices = 1

    MAGDevice0 = /dados3/DATA_MG2

    ForwardAssociationLevel = IMAGE

    ForwardAssociationCloseDelay = 5

    ForwardAssociationRefreshDelay = 3600

    ForwardAssociationRelease = 0

    ExportConverters = 0

    ForwardCollectDelay = 600

    MaximumExportRetries = 0

    MaximumDelayedFetchForwardRetries = 0

    [lua]

    QueryResultConverter0 = Data.SpecificCharacterSet = "ISO_IR 100"



    I have one patient id 157828 "test patient" today 2022/02/24 in database...


    Any idea howto debug these problem ?

    GE Senographe Pristina machine...



    thanks for help :)

    Hello,


    Data.PatientID return nil...


    Do I need to modify something in dgate.ini to send the patient data to the lua file?


    the Scaling problem I make one workaround and now in test :) I try to get DX and CR files to test :)


    Thanks for help

    Hi Marcel,


    now using


    iup-3.17-Lua51_Win64_dll10_lib.zip

    iup-3.17_Win64_dll10_lib.zip

    cd-5.9_Win64_dll10_lib.zip

    cd-5.9-Lua51_Win64_dll10_lib.zip

    im-3.10_Win64_dll10_lib.zip

    im-3.10-Lua51_Win64_dll10_lib.zip


    On windows 10 works "print to default printer and print to pdf, without GUI :)", however the image comes out cropped right, I tried to adjust but I couldn't, I'm looking at the GUI code to see why it looks perfect "without Lua printing".

    would it be possible to put the PatientID in the name of the PDF file? I try to use export... did not work, I don't know how to pass the patient's information through the print...


    print(command_line)

    require"cdlua"

    require"cdluapdf"

    require"imlua"

    require"cdluaim"


    if command_line=='createbasicfilmbox' then


    --canvas = cd.CreateCanvas(cd.PRINTER, "test5")

    --canvas = cd.CreateCanvas(cd.PDF, "cd_pdf.pdf -w210 -h297 -s120")

    -- PatientID

    canvas = cd.CreateCanvas(cd.PDF, "saida\\cd_pdf.pdf -w210 -h297 -s120")


    canvas_w, canvas_h = canvas:GetSize()

    print(canvas_w, canvas_h)

    end


    if string.find(command_line, '%.dcm') then

    local c = (Data.WindowCenter or 0) if c=='' then c=0 end

    local w = (Data.WindowWidth or 0) if w=='' then w=0 end

    local s = (Data.RescaleSlope or 1) if s=='' then s=1 end

    local i = (Data.RescaleIntercept or 0) if i=='' then i=0 end


    if string.find(c, '%\\') then

    c = string.match(c, '(.-)\\')

    end


    if string.find(w, '%\\') then

    w = string.match(w, '(.-)\\')

    end


    w = tonumber(w)/tonumber(s)

    c = tonumber(c)/tonumber(s)


    local vr = Data:GetVR(0x2020, 0x0110)

    vr[0]:Script('save jpg level '..math.floor(c)..' window '..(math.ceil(w/2)) .. ' to x.jpg')

    local image = im.FileImageLoad('x.jpg')

    local iw = image:Width()

    local ih = image:Height()


    local rows, cols, num = command_line:match('.*%.(.-)%.(.-)%.(.-)%.(.-)$')

    rows = tonumber(rows)

    cols = tonumber(cols)

    num = tonumber(num)

    local margin=100


    local row = num % rows

    local col = math.floor(num/rows)

    local sizex = (canvas_w-2*margin)/rows

    local sizey = (canvas_h-2*margin)/cols

    local posx = margin + row*sizex

    local posy = (canvas_h-sizey) - (margin + col*sizey)


    if iw>ih then sizey = sizex*ih/iw

    else sizex = sizey*iw/ih end


    image:cdCanvasPutImageRect(canvas, posx, posy, sizex, sizey, 0,0,0,0)

    canvas:Text(posx, posy-40, num)


    end


    if command_line=='printbasicfilmbox' then

    --print("OEF -> final... ")

    canvas:Kill()

    end



    I've already managed to solve part of the problem in Centos7, when I solve the libs post here the solution to install.


    thanks for help :)

    Hi,


    cdpdf is likely dependant on other modules, in particular pdflib.dll, cd.dll, cdpdf.dll, and msvcr80.dll. Are these all there?


    Marcel

    Hi again :)


    Yes, all files is here... I download from


    https://sourceforge.net/projects/imtoolkit/files/

    https://sourceforge.net/projects/iup/files/

    https://sourceforge.net/projects/canvasdraw/files/

    https://sourceforge.net/projects/luabinaries/files/


    I try to use "regsvr32 /i msvcr80.dll" but no resolv the fail too :(


    my test is windows10 pro version.

    Hi Marcel,


    Which of these versions are you using?

    https://sourceforge.net/projects/imtoolkit/files/


    I tried several on windows64 bits and I couldn't understand if the error is in the lua version or not.

    in this moment I install these file -> im-3.7_Win64_dll8_lib.zip


    I look in your file readme.txt, but im file name not found :)


    "

    Place lua external libraries here such as IUP and CD for use within the DICOM server.

    Only work correctly with a dgate.exe that uses an external lua5.1.dll (64 bits for now)

    iuplua51.dll and iup.dll are required to run console.wlua and notepad.wlua


    For 64 bits windows use:


    cd-5.4.1_Win64_dll8_lib.zip

    iup-3.5_Win64_dll8_lib.zip

    lua-5.1.4_Win64_dll10_lib.zip

    iup, iuplua51, socket/core as provided


    For 32 bits windows use:


    cd-5.4.1_Win32_dll8_lib.zip

    iup-3.5_Win32_dll8_lib.zip

    lua-5.1.4_Win32_dll10_lib.zip

    socket/core.dll not required (built-in)

    "


    I talked to one of the maintainers of the package, Antonio Sucuri , he gave me some tips, but the errors in the libs are not very clear where I am going wrong.

    print(command_line)

    require"cdlua"

    require"imlua"

    require"cdluaim"

    require"cdpdf" <-- even being in the correct directory causes an error :(




    [CONQUESTPRINT01] UPACS THREAD 3: STARTED AT: Fri Sep 17 11:34:36 2021

    [CONQUESTPRINT01] A-ASSOCIATE-RQ Packet Dump

    [CONQUESTPRINT01] Calling Application Title : "TestPrint"

    [CONQUESTPRINT01] Called Application Title : "CONQUESTPRINT01"

    [CONQUESTPRINT01] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 16384

    [CONQUESTPRINT01] Number of Proposed Presentation Contexts: 1

    [CONQUESTPRINT01] Presentation Context 0 "1.2.840.10008.5.1.1.9" 1

    [CONQUESTPRINT01] Server Command := 0110

    [CONQUESTPRINT01] Message ID := 0003

    [CONQUESTPRINT01] gettingprinter

    [CONQUESTPRINT01] *** lua run error error loading module 'cdpdf' from file 'D:\PACS\Prototipo_Lua\clibs\cdpdf.dll': Não foi possível encontrar o procedimento especificado. in 'dofile('lua/print.lua')'

    [CONQUESTPRINT01] Server Command := 0140

    [CONQUESTPRINT01] Message ID := 0005

    [CONQUESTPRINT01] creatingbasicfilmsession

    [CONQUESTPRINT01] *** lua run error error loading module 'cdpdf' from file 'D:\PACS\Prototipo_Lua\clibs\cdpdf.dll': Não foi possível encontrar o procedimento especificado. in 'dofile('lua/print.lua')'

    [CONQUESTPRINT01] Server Command := 0140

    [CONQUESTPRINT01] Message ID := 0007

    [CONQUESTPRINT01] createbasicfilmbox

    [CONQUESTPRINT01] *** lua run error error loading module 'cdpdf' from file 'D:\PACS\Prototipo_Lua\clibs\cdpdf.dll': Não foi possível encontrar o procedimento especificado. in 'dofile('lua/print.lua')'

    [CONQUESTPRINT01] Server Command := 0120

    [CONQUESTPRINT01] Message ID := 0009

    [CONQUESTPRINT01] D:\PACS\Prototipo_Lua\Data\printer_files\1.2.826.0.1.3680043.2.135.738028.60948977.6.1631889.0.1.1.0.dcm

    [CONQUESTPRINT01] *** lua run error error loading module 'cdpdf' from file 'D:\PACS\Prototipo_Lua\clibs\cdpdf.dll': Não foi possível encontrar o procedimento especificado. in 'dofile('lua/print.lua')'

    [CONQUESTPRINT01] Server Command := 0130

    [CONQUESTPRINT01] Message ID := 000b

    [CONQUESTPRINT01] printbasicfilmbox

    [CONQUESTPRINT01] *** lua run error error loading module 'cdpdf' from file 'D:\PACS\Prototipo_Lua\clibs\cdpdf.dll': Não foi possível encontrar o procedimento especificado. in 'dofile('lua/print.lua')'

    [CONQUESTPRINT01] Server Command := 0150

    [CONQUESTPRINT01] Message ID := 000d

    [CONQUESTPRINT01] deletebasicfilmbox

    [CONQUESTPRINT01] *** lua run error error loading module 'cdpdf' from file 'D:\PACS\Prototipo_Lua\clibs\cdpdf.dll': Não foi possível encontrar o procedimento especificado. in 'dofile('lua/print.lua')'

    [CONQUESTPRINT01] UPACS THREAD 3: ENDED AT: Fri Sep 17 11:34:36 2021

    [CONQUESTPRINT01] UPACS THREAD 3: TOTAL RUNNING TIME: 0 SECONDS




    Não foi possível encontrar o procedimento especificado -> Could not find the specified procedure


    Do you have any idea what it might be?



    On linux it's even worse, the libs are conflicting, i downloaded the source based on the versions you recommended for windows and i'm compiling now on Centos7 i'll inform you as soon as i have some good news :)

    Hi marcelvanherk,


    There are several libs problems with updated versions of Centos and Ubuntu, so far I haven't been able to make it work, while I haven't solved it, I put your last script in lua on windows 7 by downloading the libs for win32 and putting it in the clibs folder, Okay, printing to the default windows printer works perfectly, without using the GUI.


    I have 2 questions:


    1 - how can I save in pdf with the Patient id number "I used exportconverter for this before"


    2 - I liked the idea of header and footer, I tried to insert it and it didn't work, any tips?


    I only save 2 files, print_header.bmp and print_footer.bmp in conquest directory :)


    thanks for help,

    about linux I will inform you as soon as I can solve this libs/compatibility problem.

    Unfortunately on Centos 7.x I had several problems with the lua libs, I tried new installation on Ubuntu 16.04 server, just to test, I also had several problems, as a proof of concept I took a windows7 that I use for delphi and put in it, the lua libs operate perfect on windows, i'll keep trying to solve this and as soon as i get it i put here a step by step with the right libs for download :)


    Now I try to put a header and a footer so that the presentation looks nice, I also believe that generating PDF is important, because for testing I don't have a printer at home :)

    Hi Marcel,


    Thanks for the help, you've already given a way :)


    I can't find some lua files in the repository, could you tell me where to get them?


    these 3 files I didn't find...

    cdlua

    imlua

    cdluaim


    log error



    Server Command := 0150

    Message ID := 0021

    deletebasicfilmsession

    *** lua run error lua/print.lua:2: module 'cdlua' not found:

    no field package.preload['cdlua']

    no file './cdlua.lua'

    no file '/usr/local/share/lua/5.1/cdlua.lua'

    no file '/usr/local/share/lua/5.1/cdlua/init.lua'

    no file '/usr/local/lib/lua/5.1/cdlua.lua'

    no file '/usr/local/lib/lua/5.1/cdlua/init.lua'

    no file '/usr/share/lua/5.1/cdlua.lua'

    no file '/usr/share/lua/5.1/cdlua/init.lua'

    no file './lua/cdlua.lua'

    no file './cdlua.so'

    no file '/usr/local/lib/lua/5.1/cdlua.so'

    no file '/usr/lib/x86_64-linux-gnu/lua/5.1/cdlua.so'

    no file '/usr/lib/lua/5.1/cdlua.so'

    no file '/usr/local/lib/lua/5.1/loadall.so' in 'dofile('lua/print.lua')'

    UPACS THREAD 0: ENDED AT: Mon Aug 23 17:54:26 2021

    UPACS THREAD 0: TOTAL RUNNING TIME: 7 SECONDS

    Hi Marcel,

    Is there any way to use printing on linux without the graphical interface?


    thanks for help.


    Hello Marcel,


    I saw how printing works and I believe that now after doing several tests, I hope I understand ...


    Please correct me if I'm wrong


    Dgate.exe receives the dicom package containing one or several images for printing, it stores in data \ printer_files \ xxx.dcm in my case


    There must be a "very fast" timer on the frontend which captures this .dcm converts to bmp and sends it to the windows default printer.


    I say "very fast" because soon after it disappears, I imagine you have a delete in the process.


    So I thought, if it's just a DCM file in the folder, can I intercept it using Lua or python? If yes I could convert it from DCM to BMP or PDF "I believe that PDF gets better on linux" and send to the cups automatically, indicating only to use the default printer, keeping the same idea of your initial design but in linux,


    This way I can disable the XP machine that I have hj here :)


    If I'm going in the right way, please let me know.


    Thank you for your help.


    [DICOMPRINT]
    [DICOMPRINT] UPACS THREAD 19: STARTED AT: Tue Jun 06 11:48:14 2017
    [DICOMPRINT] Calling Application Title : "PR_AW45 "
    [DICOMPRINT] Called Application Title : "DICOMPRINT "
    [DICOMPRINT] Application Context : "1.2.840.10008.3.1.1.1", PDU length: 28672
    [DICOMPRINT] Presentation Context 0 "1.2.840.10008.5.1.1.18" 1
    [DICOMPRINT] getting Printer
    [DICOMPRINT] Creating Basic Film Session
    [DICOMPRINT] Creating Basic Film Box with 1 Image boxes - PORTRAIT - Film# 9
    [DICOMPRINT] Print file: C:\CONQUEST_PRINTER\Data\printer_files\1.2.826.0.1.3680043.2.135.735734.37088592.6.1496760.9.1.1.0.dcm
    [DICOMPRINT] Printing Basic Film Box
    [DICOMPRINT] Deleting Basic Film Box
    [DICOMPRINT] Deleting Basic Film Session
    [DICOMPRINT] UPACS THREAD 19: ENDED AT: Tue Jun 06 11:48:15 2017
    [DICOMPRINT] UPACS THREAD 19: TOTAL RUNNING TIME: 1 SECONDS

    Thank you so much, I had not realized commit, it is standard on older machines as logicbooks and all the lunar/densitometers, already deactivated and it worked, releases immediately ...


    Thanks again :)




    of course :) , I again put it all together in one file, bugreport with the timeout and the complete log of the machine, I believe that helps :)

    Quote from marcelvanherk

    Hi,


    if you can record another attempt to save an image we can see if the error is reproducible.


    Marcel

    Files

    • Downloads.rar

      (140.65 kB, downloaded 419 times, last: )

    the log file is the alpha 1.4.19, however it is the same with 1.4.17d and any I try, it's like he had a timeout or something as missing to complete the communication.


    I try send in RGB, monocrome and do not work...
    (0028,0004) 4 Photometric Interpretation RGB