Thursday, September 1, 2011

The Flow for making JPIP streaming possible from a DCM4CHEE (manually)

This documents my way to get the DCMs to output to a JPIP Stream

You will need:

1) A remote archive( preferably, if not try local) DICOM archive (supports dicom queries)
2) DCM4CHEE (unzipped)
3) Kakadu JPIP Server and Client (you can sub this in with others)
4) DCMTK

Pseudo-Steps:

1) Retrieve Images from a remote archive


a) set up a dcmrcv
> dcmrcv AE_TITLE@11112 -dest H:\Folder


b) cmove from a remote archive to dcmrcv
> dcmqr -L AE_TITLE@LOCALMACHINE AE_TITLE@REMOTEMACHINE:PORT -cmove AE_TITLE -qPatientID=1234567 -cstoredest /tmp


2) Convert 'cmove'ed images to a kakadu encoder-compatible format

a) this step is a bit important if your remote archive tends to store everything to a jpeg-ls or jpeg lossless format with different process tables).  Step a) is to ensure it will be converted to explicit big endian (which dcmtk knows what it is.
>DCM4CHEE\DCM2DCM "H:\Folder\abc.dcm" "H:\Folder\convertedabc.dcm" 

b) Convert to PGM with DCMTK
> DCMTK\DCMP2PGM "H:\Folder\convertedabc.dcm" "H:\Folder\convertedabc.pgm"

c) Convert to JP2 with Kakadu
> Kakadu\kdu_compress -i "H:\Folder\convertedabc.dcm" -o "H:\Folder\convertedabc.jp2" -rate 1.0




3) Start JPIP Server

*assuming you have moved convertedabc.jp2 to a place where the server knows where to read from
> kdu_server -address localhost -port 8080

4) Start JPIP Client
Just make sure your JPIP Url is correct and the target file is convertedabc.jp2 (in this example).






There, that'd do it.  If not, email me or leave me a comment for me to analyze your situation.  Thanks!!


No comments:

Post a Comment