JDCM UTILITY PROGRAMS
---------------------


StoreSCP
--------
The  storescp application implements a Service Class Provider
(SCP) for the Storage Service Class. It listens on a specific
TCP/IP  port for incoming association requests from a Storage
SCU  and  can receive images according to the Storage Service
Class.  Received  images  will  normally  be  stored in files
( within   the   current  working  directory).  The  storescp
application  also  supports the Verification Service Class as
an SCP. JDCM  sort  all received DICOM objects into different
subdirectories. 

      (AETitle) / (Patient info) / (Study info) / (Series info) / (Image info).dcm
      JDCM/PEPE-ULRICH/MEM-INF-CT-10March2003-10h45m00s/CT-series-3250/

The  sorting  will be done with regard to the patient, studies
and series the individual objects belong to, i.e. objects that
belong  to  the  same patient, study and series will be stored
in the same subdirectory.

     usage: storescp [options] [port] [directory]

     parameters:
         port                tcp/ip port number to listen on (default: 5555)
         directory           repository directory (default: current directory)

     general options:
     	-h                  print this help text and exit
        --version           print version information and exit
     	-v                  debug mode, print debug information
     	
     anonymous:
     	-i                  print info patient in files (default: anonymous)

     network options:
         -xf                 filename: string
                             use presentation Context from config file
         -aet                aetitle: string
                             set my AE title (default: JDCM)
         -pdu                number of bytes: integer [4096..131072]
                             set max receive pdu to n bytes (default: 16384)

     SAMPLE:
     java StoreSCP storescp.jar;jdcm.jar 4466 C:/
		



StoreSCU
--------
The  storescu  application  implements an SCU for the Storage
Service  Class.  For  each  image file command line parameter
it  sends  a  C-STORE  message to a Storage SCP and waits for
a  response.  The  application  can be used to transmit DICOM
images.

     usage: storescu [options] peer port dcmfile_in

     parameters:
         peer                    hostname of DICOM peer
         port                    tcp/ip port number of peer
         dcmfile_in              DICOM file or system directory to be transmitted

     general options:
         --version               print version information and exit
         -v                      verbose mode, print processing details
     network options:
         -aet                    aetitle: string
                                 set my calling AE title (default: JDCM)
         -aec                    aetitle: string
                                 set called AE title of peer (default: ANY-SCP)
                                 other network options:
         -pdu                    number of bytes: integer [4096..131072]
                                 set max receive pdu to n bytes (default: 16384)




FindSCU
-------
The  findscu  application  implements  an  SCU for the Query/
Retrieve  Service  Class  and  the  Basic Worklist Management
Service  Class.  Findscu  only  supports  query functionality
using  the  C-FIND message. It sends query keys to an SCP and
awaits responses. The application can be used to test SCPs of
the  Query/Retrieve  and  Basic  Worklist  Management Service
Classes.

     usage: findscu [options] peer port dcmfile_in

     parameters:
         peer                    hostname of DICOM peer
         port                    tcp/ip port number of peer
         dcmfile_in              DICOM query file

         general options:
         --version               print version information and exit
         -v                      verbose mode, print processing details
     network options:
         query information model:
         -W                      use modality worklist information model
         -P                      use patient root information model (default)
         -S                      use study root information model
         -O                      use patient/study only information model
         application entity titles:
         -aet                    aetitle: string
                                 set my calling AE title (default: JDCM)
         -aec                    aetitle: string
                                 set called AE title of peer (default: ANY-SCP)
     other network options:
         -pdu                    number of bytes: integer [4096..131072]
                                 set max receive pdu to n bytes (default: 16384)




MoveSCU
-------
The  movescu  application  implements  an SCU  for the Query/
RetrieveService Class.movescu supports retrieve functionality
using  the  C-MOVE message. It sends query keys to an SCP and
awaits responses. The application can be  used to  test  SCPs
of the Query/Retrieve  Service Class. The movescu application
can initiate the  transfer  of  images  to  a  third party or
can  retrieve images to itself.

     usage: movescu [options] peer port dcmfile_in

     parameters:
         peer                    hostname of DICOM peer
         port                    tcp/ip port number of peer
         dcmfile_in              DICOM query file

     general options:
         --version               print version information and exit
         -v                      verbose mode, print processing details
     network options:
         query information model:
         -P                      use patient root information model (default)
         -S                      use study root information model
         -O                      use patient/study only information model
     application entity titles:
         -aet                    aetitle: string
                                 set my calling AE title (default: JDCM)
         -aec                    aetitle: string
                                 set called AE title of peer (default: ANY-SCP)
         -aem                    aetitle: string
                                 set move destinat. AE title (default: MOVESCU)
     other network options:
         -pdu                    number of bytes: integer [4096..131072]
                                 set max receive pdu to n bytes (default: 16384)


GetSCU
-------
The  getscu   application  implements  an SCU  for the Query/
RetrieveService Class. getscu supports retrieve functionality
using  the  C-GET  message. It sends query keys to an SCP and
awaits responses. The application can be  used to  test  SCPs
of the Query/Retrieve  Service Class. The getscu  application
retrieve images to itself.

     usage: getscu [options] peer port dcmfile_in

     parameters:
         peer                    hostname of DICOM peer
         port                    tcp/ip port number of peer
         dcmfile_in              DICOM query file

         general options:
         --version               print version information and exit
         -v                      verbose mode, print processing details
     network options:
         query information model:
         -P                      use patient root information model (default)
         -S                      use study root information model
         -O                      use patient/study only information model
         application entity titles:
         -aet                    aetitle: string
                                 set my calling AE title (default: JDCM)
         -aec                    aetitle: string
                                 set called AE title of peer (default: ANY-SCP)
     other network options:
         -pdu                    number of bytes: integer [4096..131072]
                                 set max receive pdu to n bytes (default: 16384)



ImgServer
---------
The  ImgServer Application implements a simple image archive.
It allows images to be stored in these storage area using the
DICOM Storage Service Class.  It also allows image attributes
to  be  queried  and images  to  be retrieved using the DICOM
Query/Retrieve Service Class. 
Configuration file: confServer.txt



DCMProxy
--------
It is  often  useful  to  capture  the Dicom messages that is
transmitted across  the network to help determine exactly how
process  the  request.  JDCM provides the DCMProxy class that
will  capture  network DICOM  messages as it are received. It
may be used to redirect requests to others DICOM applications

To  support network  access for a number of clients through a
single  server  for security or filtering.

· Security
Because the proxy server can redirect requests, it can act as
an gateway preventing clients direct access to Dicom servers. 
    
· Filtering
Because all requests for Clients go through the proxy server,
the  proxy server  can make decisions about which clients and
information clients can be stored or retrieved from the Dicom
server. 

The configuration file:

PROXY_PORT=3333

ANY-SCP=localhost,5555
JDCM=localhost,6666

LINK1=ANY-SCP,JDCM
LINK2=JDCM,ANY-SCP
 
PROXY_PORT 
Specifies the IP port number on which dcmproxy will listen for
requests.

AETitles
The HostTable  defines  symbolic  names for DICOM Application
Entities.  A  symbolic  name  represent  a single application
entity  Each  DICOM application entity is defined by a triple
consisting of Application Entitiy Title, host name and TCP/IP
port number.

LINK1,LINK2,LINK...
set the AETitles hat the dcmproxy will use for forward 




Using a secure association connection
-------------------------------------
JDCM  implement  a  secure  network  connection  by using the
JavaTM Secure Socket Extension (JSSE)that will be responsible
for establishing a secure network  connection and for sending
and receiving   data   through the secure association.Part 15
of the DICOM standard describes Security Profiles. 
SSLStoreSCU,   SSLStoreSCP   and   SSLDCMProxy  requires  the
J2SK v1.4 or later.



SSLStoreSCU
-----------
The  storescu  application  implements  an secure SCU for the
Storage Service  Class. The private key  and  their associate
certificates generate with java  "keytool"  utility.  
(./appsecurity/storescu/) contains  the  following  files:

     client1.cer       -  Client1 ceritificate
     client1keyStore   -  Client1 key store password: "changeit"
     client1TrustStore -  Trust Store for client1 password: "changeit"

     client2.cer       -  Client2 ceritificate
     client2keyStore   -  Client2 key store password: "changeit"
     client2TrustStore -  Trust Store for client2 password: "changeit"


     usage: sslstorescu [options] peer port dcmfile_in

     parameters:
         peer                   hostname of DICOM peer
         port                   tcp/ip port number of peer
         dcmfile_in             DICOM file(s) to be transmitted

     general options:
         --version              print version information and exit
         -v                     verbose mode, print processing details
     network options:
         -aet                   aetitle: string
                                set my calling AE title (default: JDCM)
         -aec                   aetitle: string
                                set called AE title of peer (default: ANY-SCP)
                                other network options:
         -pdu                   number of bytes: integer [4096..131072]
                                set max receive pdu to n bytes (default: 16384)
     transport layer security (TLS) options:
         -tls                   use normal TCP/IP connection (default)
         +tls                   private key file: string
                                password: string
                                use authenticated secure TLS connection
         +tla                   use secure TLS connection without certificate
         +cs                    ciphersuite name: string
                                add ciphersuite to list of negotiated suites

Sample:
StoreSCU with client authentication
     java -cp storescu.jar;jdcm.jar SSLStoreSCU +tls client1keyStore changeit +cf client1TrustStore  localhost 5555 C:/DicomFile

without client authentication
     java -cp storescu.jar;jdcm.jar SSLStoreSCU +tla +cf client1TrustStore localhost 5555 C:/DicomFile.dcm
 



SSLStoreSCP
-----------
The  storescp application implements a Service Class Provider
(SCP)  for  the  Storage  Service Class. The private keys and
their  associate  certificates  generate with  java "keytool"
utility. 
(./appsecurity/storescp/) contains  the  following  files:

     server.cer       - Server ceritificate
     serverkeyStore   - Server key store password: "changeit"
     serverTrustStore - Trust Store for Server password: "changeit"

     storescp [options] [port] [directory]

     parameters:
         port                tcp/ip port number to listen on (default: 5555)
         directory           repository directory

     general options:
     	-h                  print this help text and exit");
        --version           print version information and exit");
        -v                  debug mode, print debug information");

     anonymous:
        -i                  print info patient in files (default anonymous)

     network options:
         -aet                aetitle: string
                             set my AE title (default: JDCM)
         -pdu                number of bytes: integer [4096..131072]
                             set max receive pdu to n bytes (default: 16384)

     transport layer security (TLS) options:
         -tls                use normal TCP/IP connection (default)
         +tls                private key file
                             password: string
                             use authenticated secure TLS connection
         +cf                 ciphersuite name: string
                             add ciphersuite to list of negotiated suites
         +cs                 trust store: string
         -rc                 requiere peer authentication


Sample:
secure storescp with client authentication
     java -cp storescp.jar;jdcm.jar SSLStoreSCP +tls serverKeyStore changeit +cf serverTrustStore  -rc 5555




SSLDCMProxy
-----------
The  SSLDCMProxy   application   implements DCMProxy a secure 
network  connection.




Dcm2xml
-------
The  dcm2xml  utility  converts  the contents of a DICOM file
(file  format  or  raw  data  set)  to XML (Extensible Markup
Language).  The DTD (Document Type Definition)  is  described
in  the  file "dcm2xml.dtd". Dcm2xml  requires  SAX  packages
bundled into J2SK v1.4.

     usage: dcm2xml [options] dcmfile-in xmlfile-out

     parameters:
         dcmfile-in              DICOM input filename to be converted
         xmlfile-out             XML output filename(default stdout)

     general options:
         --version               print version information and exit
         -v                      verbose mode, print processing details

     output options:
         +Wb                     write binary data of OB and OW elements
                                 (default off)




Xml2dcm
-------
The   xml2dcm   utility  converts  the  contents  of  an  XML
(Extensible Markup Language)  document  to DICOM file or data
set.  The  XML  document  is  expected  to  validate  the DTD
(Document Type Definition)     which  is  described  in  file
"dcm2xml.dtd".  An  appropriate XML file can be created using
the dcm2xml tool. Dcm2xml requires SAX  packages bundled into
J2SK v1.4.
     
     usage: xml2dcm [options] xmlfile-in dcmfile-out

     parameters:
         xmlfile-in              XML input filename to be converted
         dcmfile-out             DICOM output filename(default stdout)

     general options:
         --version               print version information and exit
         -v                      verbose mode, print processing details




Dcmconv
-------
The  dcmconv  utility  reads  a  DICOM  file  (dicomfile-in),
performs an encoding conversion and writes the converted data
to  an  output  file (dicomfile-out).  Dcmconv  to decode and
encode JPEGs   compressions   requires   J2SK v1.4 and JavaTM
Advanced Imaging Image  Tools. Installations of JAI Tools may
be obtained from: http://java.sun.com/products/java-media/jai/


     usage: dcmconv [options] dcmfile_in dcmfile_out

     parameters:
         dcmfile_in              DICOM input filename to be converted
         dcmfile_out             DICOM output file

     general options:
         --version               print version information and exit
         -v                      verbose mode, print processing details
     output transfer syntax options:
         +t=                     write with same TS as input (default)
         +tELIT                  write with explicit VR little endian TS
         +tEBIG                  write with explicit VR big endian TS
         +tILIT                  write with implicit VR little endian TS
         +tDEFL                  write with deflated expl. VR little endian TS
         +tJPLY                  write with baseline(1)
         +tJPLL                  write with lossless, non-hierar (14)         
         +tJ2KI                  write with jpeg 2000 Image Compression irreversible
         +tJ2KR                  write with jpeg 2000 Image Compression reversible
         +tJLSL                  write with JPEG-LS Lossless Image Compression
         +tJLSN                  write with JPEG-LS Lossy (Near-Lossless) Image Compression




ImageIO
-------
Since  Java 1.4,  the  Java standard includes a specification
for working with images stored  in  files. This specification
is called Java Image I/O. It provides a  pluggable  framework
for easily adding  support  for alternate image formats using
third-party  plugins. Dcm2img and Img2dcm requires  J2SK v1.4.




Dcm2img
-------
The  Dcm2img  utility reads a DICOM image, converts the pixel
data and  writes back an image in the well-known file format,
JPEG (Joint Photographic Experts Group) format.  This utility
supports  uncompressed  as  well  as  JPEG and RLE compressed
DICOM images.

usage: dcm2img [options] dcmfile-in imgfile-out

parameters:
    dcmfile-in              DICOM input filename to be converted
    imgfile-out             IMAGE output filename

general options:
    --version               print version information and exit
    -v                      verbose mode, print processing details




Img2dcm
-------
The  Img2dcm  utility reads a image file format, converts the
pixel data and writes back an image in a DICOM image.

usage: img2dcm [options] imgfile-in dcmfile-out

parameters:
    imgfile-in              IMAGE (JPEG, BMP,...) filename to be converted
    dcmfile-out             DICOM output filename

general options:
    --version               print version information and exit
    -v                      verbose mode, print processing details

input options:
    +mf                     XML metafile to incorporate in DICOM file

    


Dcmgpdir
--------
The  dcmgpdir  utility  creates  a  DICOMDIR  file  from  the
specified  referenced  DICOM  files  according  to  the DICOM
Part 11 Media Storage Application Profiles.

usage: dcmgpdir [options] dcmfile-in

parameters:
    dcmfile-in          referenced DICOM file or directory

general options:
	-h                  print this help text and exit
    --version           print version information and exit

options:
    +D                  filename: string
                        generate specific DICOMDIR file
                        (default: DICOMDIR in current directory
                        
                        

DcmWlm
------
The  JDCM  DcmWlm  utility  supports  the  Modality  Worklist
Management SOP Class as an SCP, allowing clients  to  connect
and to query worklist information. However  worklist  entries
must be created, updated and deleted manually.
The  databases  of worklist entities to be searched by DcmWlm
have  a  very  simple  format.  It  consists  of zero or more
wklist*.dump  files.  Each  dump  file  represents  a  single
worklist entity. The  wlistqry1.dump can be used a queries in
the findscu.

usage: dcmwlm port

parameters:
    port                tcp/ip port number to listen on (default: 5555)

general options:
    -h                  print this help text and exit
    --version           print version information and exit
    -v                  debug mode, print debug information

network options:
    -xf                 filename: string
                        use presentation Context from config file
    -aet                aetitle: string
                        set my AE title (default: JDCM)
    -pdu                number of bytes: integer [4096..131072]
                        set max receive pdu to n bytes (default: 16384)

    Source: geocities.com/gigiobb