Posts by qcor

    Another 'random' question, I hope you don't mind. :)

    How does the processing queue work? I realize this is a complex question so let me narrow it down a bit to a specific case which I don't understand.

    I'm forwarding all MG studies to a specific workstation, like this:

    ExportModality0 = MG

    ExportConverter0 = forward compressed as j2 to MGWORKSTATION;

    Unfortunately this machine (MGWORKSTATION) was turned OFF for almost 2 weeks. I saw the 'export failed' and queue retries in the log and I thought everything will just queue up and will be send as soon as the workstation is be back ON.

    Then I got reports from the staff about studies ( other than MG ) not "coming through" so I began investigating and found a bunch of 'holding processing of ...' messages on studies like CT, MR etc..

    Then I turned on the MGWORSTATION as a test and now I'm seeing bunch of "Queue: retrying processing of file ... CT"

    So it looks to me like a growing backlog of MG studies was somehow able to stop the processing of other unrelated studies. I didn't expect this... so my question is - why is this happening? how to prevent it? How are autorouting failures disrupting other stuff?

    Using 1.5.0c (b + few hotfixes by Marcel) I can confirm that dgate64.exe uses about 200Mb while idle and can EASILY use up to 4Gb of ram (or even more) while 'working' but I've >never< seen it crash. Also the memory usage goes down after a while so it doesn't look like a memory leak.

    Back when I had 1.5.0b it was running 24/7 literally for months with zero issues (under moderate load - 150ish MR/CT per day)

    The difference is I'm using PostgresSQL. Maybe it's a db specific issue?

    Interesting.. It's quite the opposite for me.

    I'm seeing mostly socketupdates.

    While the log is idle it always stops on a socketupdate. (for example after echo it stays at socketupdate)

    Under heavy log load I sometimes see scrollupdate flickering here and there so it looks like this one is working.

    I've never seen a timer update.

    yes - it's the ‎8 II ‎2021, ‏‎22:03:36 version

    umm.. honestly I'm not sure. We do have one in the network but I'm not sure if it's being used any more. If yes then it would be on veeeery rare cases.

    no no, it is NOT permanently missing. Just not shown until next trigger.

    In fact it's easy to reproduce - I used 2 dicomechos in a row (via the console.bat) and got this (attached)

    As you can see there are 2 echo responses in the serverstatus.log (on the left) and only one in the GUI window on the right.

    It WILL show up in the GUI eventually, so it's not totally missing for sure... it's more like it's still waiting in the buffer waiting for next trigger.

    this version was much better. refresh rate is much smoother and no gui freezing.

    However I'm still missing few last lines (usually 1-3 lines). In the previous version I've seen much bigger chunks missing so I think there is an improvement (or maybe I'm just luck today :) )

    I've been testing this version for a while under a 'normal load' (which for me means 0-2 people downloading/uploading a study simultaneously) and honestly it's behavior is hard to describe.

    The updates are happening at a semi-random intervals.. I'd say somewhere between 1 - 3sec (with 1 being very common, 3 being very rare). That's far from being 'smooth' but that's not the worst part.

    The worst part is that sometimes there is stuff missing in the window. Sometimes it's just last 1-2lines, but sometimes it's a LOT of lines.

    (see attached screenshot) In this particular case you can see that there is plenty of stuff in the log (on the left) but everything below the red line is missing in the conquest window.

    And it stays like that until something will trigger the next update.

    Maybe it's still waiting in the buffer?... but then it should be flushed after 0.1s, shouldn't it?

    and bonus question:

    What does the 'ui' compression mean? Can't find it the manual. I'd expect a 'j2' (as defined in the arcnema) but I'm getting 'ui' instead. (transfer between 2 dgates 1.5)

    This is not at all what I'm observing here. I see this:

    - when the buffer is full - yes

    - when data comes in - no

    - it has not been refreshed for 0.1 s - no

    - on a timer, 0.1 s after last data came - no

    I've tried giving it a nudge with the console and by dropping in single file. It looks like the "buffer is full" is the ONLY one working.

    yeah.. I just noticed it too. I must have been lucky the first few times.

    Now the serverstatus window is just empty.

    edit1: umm.. wait a sec.. I alt-tabbed back there and it was working again.. o.O testing further.. I'll be back

    edit2: ok so it looks/acts as if you are using some kind of a log buffer (of fixed size?) and waiting for it to get full before flushing it into the status window.

    This would cause 2 exact problems I'm observing now:

    1) if nothing is happening (aka nothing new is being logged) when the gui opens then you are stuck with an empty status window.

    2) you are always missing last X lines which are currently in the buffer (and haven't been flushed yet cause of low log activity)

    If that's the case the solution should be simple - wait till buffer full OR time_passed>X. The real question is: are YOU causing this or the OS?

    I think you fixed it. No more freezing.

    I didn't test it *extensively* but in 300 seconds of serverstatus scrolling non-stop (sending images with debug lvl 1 so it was a LOT of text) - 0 freezes. :thumbup:

    While testing I've noticed another thing - the progress bar, nor the text updates are not happening while transferring studies.

    After I click "copy to destination" I get this (attached) and it stays like that forever. It IS WORKING.. just not updating. It should do the "copied X out of Y images", right? Green progress bar is frozen like that too.

    It stopped working around the time I turned off the EnableComputedFields because of some Agfa dicom clients butchering my database with stupid/unnecessary queries about image count so I thought maybe it was related to that...

    ... but I also updated to 1.5.0 pre-release at about the same time... so maybe it's just a bug?

    OK... this is embarrassing. :oops:

    Data.ModalitiesInStudy='CT' is totally working... no idea what I was doing wrong. I must have misspelled it I guess :( That's what you get for messing with the code late at night.

    so it's even simpler now:

    Now I wonder how would it look like if I wanted lets say 2 modalities.. sth like ("CT" or "MR"). ModalitiesInStudy is defined as 1..n so I guess it should be possible to pass more than one at once. Can I pass a list/table somehow?

    This is completely new to me so I'm just guessing here... but maybe sth like Data.ModalitiesInStudy={'CT','MR'} ?? (<- this is not working, I checked)

    Just curious. Fortunately I need only 1 modality limit per AET.

    As for the errors I'm getting those 2 right at the start. (attached)

    Hello again

    ad 1)

    After some experimenting I actually got it working with the QueryConverter (not QueryResultConverter!)

    in dicom.ini I have this:

    QueryConverter0 = dofile('queryFilter.lua')

    and in the queryFilter.lua I have this:

    And it's actually working as intended. Now, no matter what modality was in the query, the client will get only CTs as a result. It may ask for MR but will always get CT in return - exactly what I wanted.

    One thing I don't understand is why Data:SetVR(0x0008, 0x0061,"CT") is working while Data.Modality='CT' nor Data.StudyModality='CT' nor Data.ModalitiesInStudy='CT' is not working. I guess none of those 'user-friendly' field names are correct but I have no idea cause I can't find any list of those.

    ad 4)

    I'm unable to run this exe. It throws 2 access violation errors right away even if 'run as admin'


    99% of queries from this station will be sth like this:

    studydate==today, everything_else==any

    All I want to do is to force the modality filter on it, so in short I want it to become:

    studydate==today, modality=CT, everything_else==any

    I see QueryResultConverter0 is iterating thru all the results so (like you said) it would be enough to throw out all non-CT results... but how? How can I access the result modality (cause Data.Modality and StudyModality is still nil)? and How can I 'skip' this particular result if modality != CT


    No it doesn't. Logging to file makes the problem go away so I guess it's a socket-related problem like you suspected.

    Hi Marcel

    Thank you for your help.


    I tried it and it *almost* works.

    QueryConverter seems to work just fine but I think sth is wrong with the Data.Modality field.

    My query is asking for PatiendID='1234' and Modality='CT' (query from aet='qc_efilm')

    If I do something like this it's working as intended (I'm asking for id 1234 and getting patient with id 4321 as a result):

    if Association.Calling=='qc_efilm' then Data.PatientID='4321' end

    however if I do sth like this I'm still getting CT, not PX:

    if Association.Calling=='qc_efilm' then Data.Modality='PX' end

    So it looked to me like Data.Modality was not the right field... so I tried Data.StudyModality but it also did not work :(

    While debugging I tried to print Data.PatientID, Data.Modality, Data.StudyModality - I got 1234, nil, nil in return.

    I'm new to lua and have no idea how could print out whole Data structure. I thought it might be a table but it's not... so I'm stuck. Is there a full list of Data.xxxx fields somewhere?

    I looked thru the files and I'm pretty sure the 'StudyModality' is the right answer here.. no idea why it's nil :(


    work on incoming data

    aaahhh.. ok. This explains everything. OK, in that case I'll try the custom lua script solution.


    :( I'm using dgate for over 10 years and this is the only thing I'm missing... so close to perfection :D


    I'm pretty sure this was introduced with the 1.5 version. I just didn't report it earlier cause I had a per-release version of 1.5 so I just assumed it was due to some debug stuff running in the background or sth. Then I upgraded to the current version (1.5.0b) and it's still happening. Before that I had 1.4.19 but honestly I'm not sure about the letter.. I *think* d. So probably between 1419d and 150

    Yes it does unfreeze, then it's working for few seconds, then freezes again etc etc etc


    I've accumulated few questions and problems over the past few years. I'd appreciate any help.


    I'd like to limit the query results based on the calling AET.

    For example - if calling AET ='XX' then replace modality of the query with 'CT'. In other words I'd like station XX to be able to see ONLY CTs no matter how broad the initial query was.

    Reading thru the manual I'm pretty sure it can be done using QueryConverter0 (or maybe RetrieveConverter0 ?) using %c in place of calling AET but that's all I've got :( There is no example in the manual unfortunately.


    I'd like one dicom node to be a 'dedicated forwarding node'. It's the only one visible the the outside world and it's only job is to do all the routing based on few dicom tags.

    Routing part is easy but I have problems deleting stuff. This node should keep the study only until it has been forwarded, then delete it. (which may take days, cause external nodes may be offline)

    I thought it would be as simple as sth like that:

    ExportConverter0 = ifequal "%V0032,1033", "example"; forward to SomeDicomNode; destroy;

    Unfortunately it's not that simple.. I get this:

    ***Exportconverter0: Spawning 'destroy' failed (argv=\\archiwum\

    Not sure what I'm doing wrong here :(


    Is there some kind of a more 'robust' GUI which allows us to edit stuff like dicom tags or delete study? It's quite frequent that I have to change some tags in a study. Right now I'm using DicomBrowser (tool from Washington University) and it works fine but I'm looking for something better


    Using 1.5.0.b I'm getting some serious gui freezes every few seconds. (tested on 2 different PCs win2003 and win2012, same behavior)

    Service is working properly but gui becomes completely unresponsive (as in 'this program is not responding'). I *think* it's influenced by how much is going on (log scrolling) but tbh I'm not sure.

    Best Regards