Posts by Bookworm

    maklinux_mysql.sh -


    g++ -DUNIX -DNATIVE_ENDIAN=1 -DNOINTJPEG -DUSEMYSQL total.cxx -o dgate -lpthread -L/usr/lib/mysql -lmysqlclient
    pkill -9 dgate
    sleep 0.2s
    cp dicom.ini.postgres dicom.ini
    cp dicom.sql.postgres dicom.sql
    sudo cp dgate /var/www/cgi-bin/dgate.html
    sudo cp dgate /var/www/cgi-bin
    sudo cp dicom.sql /var/www/cgi-bin
    sudo cp dicom.ini /var/www/cgi-bin
    sudo /sbin/ldconfig /usr/lib/mysql


    ---------
    Note: this is Slackware specific. Should have a query that asks the path of the web server.


    --------


    dicom.ini (so far) for MySQL
    (This doesn't include DoublebackslashToDB = 1 - that looks to be a windows requirement. - MagDevice0 would probably need to be modified to go to something like /dev/sdg0, if it's a direct to tape link)
    --------
    # This file contains configuration information for the DICOM server
    # Example Linux version using MySQL user conquest, pw conquest,
    # database conquest_mysql
    # Copy this file to dicom.ini to use it



    [sscscp]
    MicroPACS = sscscp
    Edition = Personal


    # Network configuration: server name and TCP/IP port#
    MyACRNema = CONQUESTSRV1
    TCPPort = 5678


    # Reference to other files: known dicom servers; database layout; sops
    ACRNemaMap = acrnema.map
    kFactorFile = dicom.sql
    SOPClassList = dgatesop.lst


    # Host, database, username and password for postgres server
    SQLHost = localhost
    SQLServer = conquest_mysql # SQL Database NAME
    Username = conquest # SQL Database User
    Password = conquest # SQL Database Password
    MySQL = 1


    # Configure database (dbase parameters blocked out)
    TruncateFieldNames = 10
    MaxFieldLength = 254
    FileNameSyntax = 3
    MaxFileNameLength = 255
    FixPhilips = 0
    FixKodak = 0
    DoubleBackSlashToDB = 1
    UIDPrefix = 9999.9999
    EnableReadAheadThread = 1
    PatientQuerySortOrder =
    StudyQuerySortOrder =
    SeriesQuerySortOrder =
    ImageQuerySortOrder =
    # IndexDBF = 1
    # PackDBF = 0
    # LongQueryDBF = 1000
    TCPIPTimeOut = 300
    FailHoldOff = 60
    RetryDelay = 100
    QueueSize = 128
    WorkListMode = 0


    # Configuration of compression for incoming images and archival
    DroppedFileCompression = un
    IncomingCompression = un
    ArchiveCompression = as


    # Names of the database tables
    PatientTableName = DICOMPatients
    StudyTableName = DICOMStudies
    SeriesTableName = DICOMSeries
    ImageTableName = DICOMImages
    DMarkTableName = DICOMAccessUpdates
    RegisteredMOPDeviceTable = RegisteredMOPIDs
    UIDToMOPIDTable = UIDToMOPID
    UIDToCDRIDTable = UIDToCDRID


    # Banner and host for debug information
    PACSName = CONQUESTSRV1
    OperatorConsole = 127.0.0.1


    # Configuration of disk(s) to store images
    MAGDeviceThreshhold = 0
    MAGDevices = 1
    MAGDevice0 = ./data/


    --------------------


    I haven't imported data yet - I need to see about setting up a VPN link to a customer site, and see if I can tickle two ConQuest servers - one DbaseIII, and one SQL - to transfer data between them.


    (running ./dgate -^serverstatus.log returns
    ***Unable to open database conquest_mysql as user conquest on localhost
    - the database does exist and is accessible - suggestions?)


    BW

    What I'll be working on is trying to determine what needs to be added/removed in dicom.ini to make MySQL interfacing work. PostGres has a variable that is boolean (0/1), but is there a MySQL variable as well that's always 0 unless it's set for 1?


    BW

    I'm currently testing the installation of ConQuest under both Linux and Windows, both with a DBase installation and with a MySQL installation.


    I'll be making notes here as I go along (if there are any suggestions, I'll happily read through them), and hopefully that will help others. (including the developers)


    The system I'm developing on (Linux) is Slackware 11.0 with 512 megabytes of ram and a 160 GB hard drive. I'm doing the compilation through a Konsole window in KDE.


    First note is that the Linux download is in a .zip format. This can be read in most *nix systems, (BSD/Linux/Unix/Solaris/etc), but it's not a 'native' format. a tar.bz or tar.gz would be a more usual choice.


    Unpacking the conquestlinux1412.zip file builds a strange directory structure. Instead of just a subdirectory called 'conquest' containing files, plus a directory called 'data', with more files, there is subdirectory created called 'data', containing three additional directories - 'HEAD_EXP_00097038', 'dbase', and 'printer_files' - none of which contain any actual files or data.


    The initial compile process has failures already noted in the PDF document (supplying a non-PDF html file or txt file could be helpful, at least of the 'Linux Only' portions, in a README or INSTALL format)


    The DOS maktotal.bat file contains old information - it implies that the files need to be compiled under Microsoft, then can be copied to a Linux box and be recompiled.


    the maklinux script needs to be modified. Immediate suggested modifications are as follows.


    Rename script to maklinux.sh. File should then be 'chmodded' to +x or at least be run as /bin/sh maklinux.sh
    -------------------
    #!/bin/sh


    # This script requires that the user either be part of the 'sudoers' file without password, or be su'ed to root.
    # '/usr/lib/cgi-bin' should be changed to your intended cgi-bin directory for Apache. In the case of Slackware, it's /var/www/cgi-bin



    g++ -DUNIX -DNATIVE_ENDIAN=1 -DNOINTJPEG total.cxx -o dgate -lpthread
    pkill -9 dgate
    sleep 0.2s
    cp dicom.ini.dbase dicom.ini
    cp dicom.sql.dbase dicom.sql
    sudo cp dgate /usr/lib/cgi-bin/dgate.html
    sudo cp dgate /usr/lib/cgi-bin
    sudo cp dicom.sql /usr/lib/cgi-bin
    sudo cp dicom.ini /usr/lib/cgi-bin



    ------------------------



    Attempting to compile with MySQL support (-DUSEMYSQL) returns lots and lots of errors.


    Several things are happening.


    The first is that the odbci.cpp file has hard coded links to a windows version of mysql.h
    Second is that there's a declaration of mysql.h with no reference to the actual location of the file. - those can be corrected by hardcoding the reference (in Slackware, it's /usr/include/mysql/mysql.h)


    Last is that the actual compile string needs to be this (be sure you've initialized a mysql database first)


    g++ -DUNIX -DNATIVE_ENDIAN=1 -DNOINTJPEG -DUSEMYSQL total.cxx -o dgate -lpthread -L/usr/lib/mysql -lmysqlclient


    (-DUSEMYSQL seems strange when the PostGres declaration is -DPOSTGRES. Should the -DPOSTGRES be changed to -DUSEPOSTGRES to maintain a similar standard? )


    (This is a modification of my original post where I missed the 'no such file' error)


    Going to bed now - more work in the morning.

    I managed to get the StudyID to be input at the workstation level (the machine that receives the scan from the AC-3CS unit). Series Number may not have actually been put into the Dicom standard until after this unit was built (95, I think).


    Would it be possible to add the ability to K-PACS to edit these for the images, so they could be resubmitted to the database server?


    (I'm going to have to go back through and find out exactly what SeriesNumber and StudyID are supposed to be in the DICOM standard, that way we don't put in random numbers and screw something up)


    Thanks for the help.


    Troy

    Looking at it in k-pacs, it appears to have a StudyUID and SerInstUID... Just very long ones.


    I duplicated a patientID into the StudyID field on the QA-WS workstation, then transferred it to the ConQuest server - and kpacs still doesn't seem to see it. I can't find a location for Series Number on the workstation. It may be those have to be put in at the main Fuji screen.


    Troy

    Is there any way to add those in through K-Pacs, so that I can at least generate a working cd?


    Currently, we're using a Fuji FCR-AC-3CS unit, with a QAWS -770 workstation, to transfer to a ConQuest server system. K-Pacs is being used as the workstation.


    I'm not sure at what point the ID is being left out.


    Troy

    I've uploaded the K-Pacs installation from my laptop as a zip file, and send you an email with the link.


    If I can simply figure out why it's refusing to generate a DICOMDIR, I'll be happy - then I can work out how to get around it.


    Unfortunately, I don't know that there are any debug options in the cd-project creation, so I can't check logs.


    Troy

    Once I ran the command dcmmkdir.exe --no-profile +r *.* in the cd project directory, I received the following error(s)


    Error: required attribute SeriesNumber (0020,0011) empty in file: S00001\SER00001\I00001
    Error: required attribute StudyID (0020,0010) empty in file: S00001\SER00002\I00001

    If you'd like, I can tar.gz or .zip up the k-pacs directory, and let you take a look at the install, along with a patient project. (put it on an http pull, so you can download it).


    c:\kpacs\cd-project\<six letter name>\S00001\ and so forth.


    I'll try that, hopefully I can get two working cd's by tomorrow morning for Bob Morrow's office - he's out of town, and the one machine creating the cds properly can't get in the projects for some reason.


    Is there an 8.3 limitation in it as well as the space limitation? if so, cd-project\ may be too long. (I'll try that tonight)


    Troy

    Additional information.


    The main problem is that k-pacs isn't actually creating the DICOMDIR file at _all_.


    How can I use the dcmmkdir.exe file to create the missing DICOMDIR file(s)?


    I'm not sure what the format is for running it from the command line to utilize the S00001\*\* format.


    BW

    What I have found is that the cd project is created without a DICOMDIR file, and has been mentioned before, the custom.ini file points the default cd-rom drive to "D:\".


    I don't know if this is an issue (the D:\), but what are the actual files themselves supposed to contain?


    autorun.inf is obvious, it loads the k-pacs lite viewer.
    The viewer runs, then issues a cryptic german error message, with either a (1) or (0) at the end (usually when the 'scanning' graphic is up).
    The DICOMDIR file doesn't get created by the cd-project option, or by the XP cd creation option.
    The DLL file is almost certainly a support file for the viewer, and the S000*** directory is where the patient profile is stored with images.


    At this point, the unknowns are
    custom.ini
    DICOMDIR


    Also the cryptic error messages.


    Troy C. Belding
    Bookworm Computing

    Does anyone have any experience with making one of these (Version A05) communicate through DICOM at all?


    We have one, and it won't talk to K-PACS, Conquest, or anything else I can come up with at this point.


    I have all the documentation I could track down on the unit and software, but it doesn't seem to really give information on dicom communications. It simply wants to claim that every other machine is refusing to talk to IT.


    BW