Posts by snalbansed

    So if I run ./linux.sh and go to http://localhost:5912/ I don't get any response.


    If I look in $ netstat -lptu I can see tcp 0 0 *:5912 *:* LISTEN 6324/dgatesmall


    Also:

    Code
    1. $ ./linux.sh
    2. nohup: appending output to 'nohup.out'
    3. ###!!! [Parent][MessageChannel] Error: (msgtype=0x15007F,name=PBrowser::Msg_Destroy) Closed channel: cannot send/recv
    4. ###!!! [Child][MessageChannel] Error: (msgtype=0x2C0105,name=PContent::Msg_AsyncMessage) Channel closing: too late to send/recv, messages will be lost


    And nohup.out:

    The process doesn't get killed - I have to do that myself.


    Is this just something to do with the system I am trying this on? Does this work for others?

    Thanks. Made that change.


    nohup.out:

    Code
    1. *** Not enough rights to write in MAG0
    2. ***Error loading acr-nema map file:./acrnema.map
    3. DGATE (1.4.19b, build Fri May 25 18:14:16 2018, bits 64) is running as threaded server
    4. Database type: NULL driver (black hole)


    shell:

    Code
    1. $ ./linux.sh
    2. [sudo] password for mcdonaghe:
    3. 5912/tcp: 24067
    4. nohup: appending output to 'nohup.out'
    5. ###!!! [Parent][MessageChannel] Error: (msgtype=0x15007F,name=PBrowser::Msg_Destroy) Closed channel: cannot send/recv

    Last line after I closed Firefox, which failed to load again.

    Some feedback on the web installer:


    • When I unzippped the original download, a base folder named distribution was created which I hadn't expected.
    • Within distribution/install there is no file called install.sh - there is a file called linux.sh
    • When I run that file, firefox opens (not my default browser) but fails to load the page.
    • nohup.out contains the following:
    Code
    1. Dictionary file ./..\dgate.dic is missing, some server functions will not work correctly
    2. *** Not enough rights to write in MAG0
    3. ***Error loading kfactor file:./..\dicom.sql
    4. DGATE (1.4.19b, build Fri May 25 08:42:10 2018, bits 64) is running as threaded server
    5. Database type: NULL driver (black hole)
    6. *** File dgate.dic is missing, some server functions will not work correctly

    This was tested after I replaced distribution/src/dgate/dicomlib/qrsop.cxx


    I haven't yet looked at what linux.sh is doing to see where it goes wrong.

    I think the values he is after might be contained in an Enhanced Structure Report object that is transferred with the study. The measurements are made on the ultrasound scanner console and recorded in the ESR.


    Therefore I assume that it would be possible to extract the values - I haven't looked at how messy Lua gets with parsing highly hierarchical sequences in the structured report!

    That worked, and I'll keep it in reserve for the next time I need such a thing, but in the end I was over-complicating it!


    Code
    1. if string.find(Data.ImageType, 'SINGLE A') then


    was sufficient for this purpose.


    Thanks again.

    Dear all, particularly Lua fans!


    I need to extract the A or B from

    Code
    1. 0008,0008 Image Type: DERIVED\PRIMARY\SINGLE PLANE\SINGLE A
    2. or
    3. 0008,0008 Image Type: DERIVED\PRIMARY\SINGLE PLANE\SINGLE B\STORE FLUORO


    I've been trying to work out how to do it with string.gmatch, some character escaping and regex, but both my Lua and my regex are too weak to get anything to work.


    Will anyone take pity on me?


    Your's hopefully...


    Ed


    P.S. if there is a function to call Data.ImageType[4] or equivalent that would be awesome too...

    Hello again


    This isn't quite working for me as I'd like. Files that are fully copied, but not DICOM, get caught in this loop with the following repeated error:


    Code
    1. ***[AddImageFile] /mnt/archive/data/incoming/X-ray room/June acceptance/Harvested 10th June/cropped images/files.txt -FAILED: Error on Load
    2. ***Dynamic_Parse encountered an invalid element length during load of DCM file (in 32393631)
    3. ***Length = 13365
    4. ***Continuing parsing
    5. ***(Dyn) Encountered an invalid group order during load of DCM file (after 32393631)


    Whereas real DICOM files just have the FAILED: Error on Load message.


    Is there anyway of improving this Marcel? Otherwise I'll just need to keep non-DICOM files from falling in there.

    For the benefit of anyone who comes here later, the proposed converter should have been:


    Code
    1. [lua]
    2. ImportConverter0 = Data.PatientID = 'PAT'..crc(tostring(Data.StudyInstanceUID))


    This will create a checksum from the study instance UID that is always the same for the same study, but different between studies.

    Lovely.


    Small modification: there is a comma in the for loop that should be a semi-colon after i=0:

    Code
    1. for (int i=0; i<10; i++)


    Other than that, I tested as is on small and large files and it was all peachy :-) I have now compiled it with a loop going to 30 instead of 10, and tried importing files that are about 1 GB - with a following wind the 30 loops of 5 seconds were just enough and they imported fine. I might increase this again, because as long as it isn't infinite I can't see any harm in doing lots of loops. And keeping the sleep to 5 seconds means that smaller objects that just take a second or so to transfer won't get delayed for too long.

    Thanks again.


    Might you have sample code for the 10 times loop? I'm thinking that in use, an occasional 15 or 20 second delay to the import would be ok, and if I could loop it then if we do try and import a 1GB+ file in this way, it should work too.


    Otherwise I'll just implement a procedure for large files (ie copy to another folder, then do a 'local' move).


    Is it possible to declare a variable in dicom.ini for the sleep parameter, so that you can set a sensible default of maybe 5 seconds in dgate.cpp, but the value could be tweeked without recompiling it?


    Thanks


    Ed

    Thanks Marcel


    That now works - objects that have copied across are imported without delay, objects that fail the first time are imported after the 5 seconds according to the sleep set in the code.


    I'm having less consistent results with very large objects. I have tried copying in a half-gig BTO, which takes about 45 seconds to transfer. At 5 seconds sleep, I had a long list of -FAILED: Error on Load, but then when it had copied instead of then loading it, the error messages moved onto the next object. I copied two large BTO and three standard mammos in that test, and only the three standard mammos were imported.


    I then tried an 8 second delay and just importing the one file, same result, ie a list of -FAILED as it copied, then nothing; object was deleted, nothing was imported.


    I thought maybe that whilst it appeared to be looping, maybe it would only import at the first or second attempt. So I set the sleep to 90 seconds, and got the initial -FAILED followed 90 seconds later by a successful import.


    To test my hypothesis further, I then set a 40 second delay and tried again with a similar BTO. This time, I have three -FAILED messages followed by a successful import!


    So I don't understand what is happening.

    It appears to work!


    At first, it didn't, and about two thirds of a collection of mammo images '-FAILED: Error on Load'. But then they started working and carried on working. Subsequent dumps of lots of mammo images, or individual images have all worked with no error.


    What I am seeing though is an initial message in the shell: 'Added file: /path/image.dcm' as soon as an image copy is started, then a repeat of the message 5 seconds later. This happens even if the image is moved locally into incoming, or if dgate is started with the file already written into incoming, or if there is a backlog so the image is definitely written before it is considered for import.


    I don't understand the initial behaviour. But the other behaviour looks as though the 5 second sleep delays every import, even if the image is properly there.

    Does this look like an appropriate edit?