Come and visit this free open source event:

FOSDEM
Faq /

ViewerCD

WARNING: outdated information

How to burn CD's with viewer included?

For a quick general howto, see these instructions at the AMIDE website. What follows here was a site specific setup to automagically burn CD's with patient data, embedded with a volume display utility; only using open-source applications and toolkits. The scripts currently provided are on an "as is" basis and specific to our site's Philips Gemini PET/CT system (Sun Solaris 9).

prerequisites:

optional:

description:

First we prepare a spooldir with a suitable volume display utility. For this you 'll need a standalone AMIDE for Win32, either an up to date version based on these instructions or an already created - but older version - ISO distribution. Just unpack (burn & copy) this ISO's content to your selected $od spooldir (i.e. /home/patient/.viewercd). Some specifics about this ISO:

  • start.bat batch script runs application
  • AMIDE presettings saved in etc/amide.xif
  • store image data in volumes subdir (single file format)

Today, the easiest way to retrieve images from an imaging modality is through dicom export. So, the next part is to set up a dicom receiver. We opted for dcmtk's excellent storescp utility. Here is our storescpd script which starts the storescp daemon with proper arguments at system init or at graphical login (i.e. in .dtprofile like we do).

  • usage: storescpd start
  • service runs on non-privileged port=10400 with AE-title=STORESCP;
  • our main viewercd.sh script runs on reception of data (see more below)
  • don't forget to set the proper $od spooldir mentioned above
  • received files will be stored in $od subdirs, prefixed with PETCT

<<Index | Top>>

Finally, here comes the hart of our ViewerCD burning project, the well commented viewercd.sh script . In short, all it does is:

  • make sure only one instance runs at a time (i.e. create a $lockfile)
  • wait for blank CD media, within a specified timeout (during which you can export as much studies as you like)
  • loop through all PETCT subdirs (handle CT and PET differently):
    • rename dicom studies into alphabetically sequenced files
      • retrieve tags with dcmtk's dcmdump --search feature
        • get proper sequence
        • create meaningfull filename
    • stack those into a single file volume format (i.e. InterFile or µConcorde)
      • stack/convert with (X)MedCon's medcon --stack3d feature. Here, the proper image esequence must be reflected in the alphabetical listing of filenames

notes:

We choose not to put the patient name in the output filename, because:

  • just writing single patient ViewerCD's
  • too long filenames reduce the right image pane of AMIDE's viewer
  • prevent troubles with problematic chars like spaces and quotes

A meaningfull filename for our site contains the unique series number and for:

  • CT: high or low dose, with or without contrast
  • PET: distinct attenuation algorithm used (in Gemini's jargon called _nac, _ac, _elac, _ctac)

Did you notice the reversing of slices for a specific patient orientation

<<Index | Top>>

portability:

  • "message" available on Gemini PET station displays text in a graphical dialog box
    • replace with "echo" or code a small Tck/Tk alternative (someone?)
  • no sudo to run tools in God mode (= root)? use setuid/setguid, but don't tell anyone you had to because we told here so.
  • replace Gemini's cdrw & make-cdrom script with cdrtools/cdrecord (v 2.01.01) (not used at our site, so untested):
    • remark:
      without scsi emulation, try mentioning "dev=ATAPI ..."
    • scan for device:
      #> cdrecord -scanbus dev=ATAPI
    • check for blank media:
      • empty media?
      #> cdrecord -toc dev=ATAPI:0,1,0 | grep "Cannot read TOC header"
      • no disk?
      #> cdrecord -toc dev=ATAPI:0,1,0 | grep "No disk / Wrong disk"
    • create ISO file:
      #> mkisofs -o file.iso -v -T -J -r -V labelname $spooldir
  • burn CD from ISO
    #> cdrecord dev=ATA:0,1,0 speed=16 -pad -v -eject file.iso

Enjoy,

-eNlf-

<<Index | Top>>