Imaging:DICOMDataServiceInstallation

From CVRG Wiki

Jump to: navigation, search

Contents

System Requirements

Technology Version URL
Java SE 5.0 http://java.sun.com/j2se/1.5.0/
JBoss 4.2.2 http://www.jboss.org/
MySQL 5.0.28 http://dev.mysql.com/doc/
DCM4CHEE 2.14.2 http://dcm4che.org/
Subversion 1.6.0 http://subversion.tigris.org/
caGrid 1.2 http://gforge.nci.nih.gov/frs/download.php/3738/caGrid-installer-1.2.zip
Apache Ant 1.6.5 http://ant.apache.org/
Globus ws-core-enum-4.0.3 http://www.globus.org/
Tomcat 5.0.28 http://archive.apache.org/dist/tomcat/tomcat-5/v5.0.28/bin/
caGridTransfer 1.2 http://gforge.nci.nih.gov/frs/download.php/3738/caGrid-installer-1.2.zip
DICOMDataService 1.2 svn checkout https://scm.cci.emory.edu/svn/ivi/trunk


Installing DCM4CHEE 

Installing DCM4CHEE

  • NOTE: These instructions were followed for the CVRG installation of DCM4CHEE. Basic DCM4CHEE instructions are found at the DCM4CHEE installation page.
  1. Install JDK 1.5.0_x to /opt/java

  2. Create a directory under /opt for the databases (e.g., /opt/databases)

  3. Download and extract the binary distribution package of dcm4chee:
    1. Connect to the dcm4chee Sourceforge site
    2. Select the dcm4chee-mysql-2.14.2.zip package
    3. Download that file to the temp directory (i.e., /tmp)
    4. Extract DCM4CHEE to the databases directory (i.e., "gunzip -d /tmp/dcm4chee-mysql-2.14.2.zip /opt/databases")

  4. Download the binary distribution package of JBoss Application Server 4.2.2.GA:
    1. Connect to the JBoss download site
    2. Select the 4.2.2.GA package
    3. Download the binary distribution of jboss-4.2.2.GA.zip to the temp directory (i.e., /tmp)
    4. Extract JBoss Application Server 4.2.2.GA to the databases directory (i.e., "gunzip -d /tmp/jboss-4.2.2.GA.zip /opt/databases")

  5. Copy files from JBoss to dcm4chee:
    1. Move to the dcm4chee-xxx-2.14.2/bin directory (i.e., "cd /opt/databases/dcm4chee-mysql-2.14.2/bin")
    2. Execute the install_jboss.sh script with the path of your JBoss AS installation directory as a parameter (i.e., "install_jboss.sh /opt/databases/jboss-4.2.2.GA")

  6. Install the Database Software and create the DCM4CHEE Database:
    1. If you do not already have database software running, install it now.
    2. Initiate the pacsdb database instance using the DDL in dcm4chee-mysql-2.14.2/sql/create.mysql.
      1. mysql -u root
        1. mysql> create database pacsdb;
        2. mysql> grant all on pacsdb.* to 'pacs'@'localhost' identified by 'pacs';
        3. mysql> \q
      2. mysql -upacs -ppacs pacsdb < /opt/databases/dcm4chee-mysql-2.14.2/sql/create.mysql
    3. The database configuration information is contained within dcm4chee-mysql-2.14.2/server/default/deploy/pacs-mysql-ds.xml.
      1. If you're using a different database name, user name, etc., you'll need to update this file.

  7. Set environment variable JAVA_HOME to JDK location.
    1. The dcm4chee startup/shutdown scripts depend on the JAVA_HOME environment variable in order to find the Java executables and libraries.

  8. Adjust maximum allocation of heap memory:
    1. Edit the dcm4chee run.conf (i.e., "vi /opt/databases/dcm4chee-mysql-2.14.2/bin/run.conf")
      1. Specify options to pass to the Java VM.
        1. if [ "x$JAVA_OPTS" = "x" ]; then
        2. JAVA_OPTS="-Xms128m -Xmx512m ..
        3. fi
    2. Save the edits (i.e., ":wq!")

  9. Test the installation:
    1. Move to the dcm4chee-xxx-2.14.2/bin directory (i.e., "cd /opt/databases/dcm4chee-mysql-2.14.2/bin")
    2. Execute the run.sh script

  10. Login into web interface:
    1. Connect to the Web Interface at http://localhost:8080/dcm4chee-web/ of the archive using any Web Browser
    2. Login in using default Administrator account 'admin', with password 'admin'
    3. You should change the admin password once you log in

  11. Setting the Storage File System location & Changing the default AE title:
    1. Connect to JBoss's JMX Console at http://localhost:8080/jmx-console/
    2. Login using also the Administrator account 'admin', with password 'admin'. (may need to be updated if change in web interface affects this)
    3. Setting the Storage File System location:
      1. Follow the link "service=FileSystemMgt" to the configuration page for File System Management service under the "dcm4chee.archive" heading.
      2. Invoke the operation addOnlineFileSystem(), with argument dirPath specifying the directory, where the archive shall store received objects/images.
      3. If no Storage File System is configured, the archive will auto-configure dcm4chee-xxx-2.14.x/server/default/archive as Storage File System, when receiving the first object/image.
    4. Changing the default AE title:
      1. Follow the link "service=AE" to the configuration page for AE (Application Entity - a DICOM term for a DICOM node on the network) service under the "dcm4chee.archive" heading.
      2. Invoke the operation updateAETitle with the old AE Title (DCM4CHEE if unchanged from the default), and new AE Title as parameters

  12. Test DICOM storage:
    1. Connect to the dcm4che 2.0 Sourceforge site
    2. Select the dcm4che-2.0.17-bin.zip package
    3. Download that file to the temp directory (i.e., /tmp)
    4. Extract DCM4CHE 2.0 toolkit to the databases directory (i.e., "gunzip -d /tmp/dcm4che-2.0.17-bin.zip /opt/databases")
    5. Send some object/images to the archive's Storage SCP, by using the send utility of the dcm4che 2.0 core package (i.e., "/opt/databases/dcm4che-2.0.17/bin/dcmsnd DCM4CHEE@localhost:11112 ~/mesa/storage/modality/MR")
    6. Refresh the Web Interface (http://localhost:8080/dcm4chee-web/) and click the 'binocular' icon, if necessary, to initiate a search
      1. Expand one study row to show contained series
      2. Expand one of these series to show contained instances
      3. In the case of images, you can follow the image icon on the right, to invoke a http WADO request for a JPEG presentation of this image, which will be displayed in a separate browser window

  13. Test object retrieval:
    1. Create external Storage SCP acting as Move Destination, by using the receiver utility of the dcm4che 2.0 DICOM toolkit (i.e., "/opt/databases/dcm4che-2.0.17/bin/dcmrcv 11113")
    2. Configure an additional Application Entity Title identifying this Move Destination within the "AE Management" tab within the Web user interface (http://localhost:8080/dcm4chee-web/).
      1. Set AE Title to "DCMRCV"
      2. Set Hostname to "localhost"
      3. Set Port to "11113"
    3. Switch back to the Study List ("Folder")
    4. Mark studies to retrieve using the check box on the right
    5. Select "DCMRCV" as send destination in the combo box above
    6. Click on the send button left from it

  14. Install as a service:
    1. Close any web browser that is open
    2. Stop the archive by pressing "Ctrl-C" in the console window where the archive was started
    3. Copy the init script dcm4chee_init_redhat.sh to /etc/init.d/ and adjust it according your installation location of the archive and the JDK and under which user the archive application shall run


Installing Subversion 

Installing Subversion

  1. Download and install the binary distribution RPM of the subversion client (i.e., "yum install subversion")


Installing caGrid 1.2 

Installing caGrid 1.2

  1. Create a grid directory (i.e., "mkdir /opt/grid")

  2. Create a caGrid installer directory (i.e., "mkdir /opt/grid/installer")

  3. Create a Jakarta Tomcat directory (i.e., "mkdir /opt/grid/jakarta-tomcat-5.0.28")

  4. Download and extract the binary distribution package of caGrid 1.2:
    1. Connect to the NCI caGrid Architecture site
    2. Scroll down to the bottom of the page
    3. Click on the caGrid 1.2 Previous Release link
    4. Select the Install caGrid 1.2 link
    5. Download that file to the temp directory (i.e., /tmp)
    6. Extract caGrid 1.2 to the installer directory (i.e., "unzip -d /tmp/caGrid-installer-1.2.zip /opt/grid/installer")
    7. Create a cagrid-1.2.installer.properties file (i.e., "vi /opt/grid/installer/cagrid-1.2.installer.properties")
      1. Copy the contents of a sample cagrid-1.2.installer.properties into your file
      2. At the end of the file, add the following lines:
        1. ant.home=/opt/grid/apache-ant-1.6.5
        2. globus.home=/opt/grid/ws-core-4.0.3
        3. tomcat.home=/opt/grid/jakarta-tomcat-5.0.28
        4. ant.install.dir.path=/opt/grid
        5. globus.install.dir.path=/opt/grid
        6. cagrid.install.dir.path=/opt/grid
      3. Save the file (i.e., ":wq!")
    8. Create a download.properties file (i.e., "vi /opt/grid/installer/download.properties")
      1. Enter the following: "download.url=file:/opt/grid/installer/cagrid-1.2.installer.properties"
      2. Save the file (i.e., ":wq!")
    9. Invoke the caGrid 1.2 installer (i.e., "/opt/java/bin/java -Ddownload.properties=/opt/grid/installer/download.properties -jar /opt/grid/installer/caGrid-installer-1.2.jar")
      1. NOTE: This installer has a Graphical User Interface and will not work in a CentOS environment without X-Windows
    10. Agree to the license agreement and Click Next
    11. Check "Install caGrid" and Click Next
    12. Select "Current OSU Training Grid" as the Target Grid and Click Next
    13. Click the Start button in the middle of the window
    14. You may need to invoke the caGrid installer twice, as it might fail the first time it runs. When you run it the second time decline to reinstall ant and globus and it should complete without errors.
    15. Once the install is finished, modify the profile of the user under which all the tools will be running
      1. export JAVA_HOME=/opt/java
      2. export ANT_HOME=/opt/grid/apache-ant-1.6.5
      3. export GLOBUS_LOCATION=/opt/grid/ws-core-4.0.3
      4. export CATALINA_HOME=/opt/grid/jakarta-tomcat-5.0.28
      5. export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
    16. Source the profile
    17. In addition, modify the file permissions of the components that have been installed
      1. chmod u+x $CATALINA_HOME/bin/*.sh
      2. chmod u+x $ANT_HOME/bin/ant
      3. chmod u+x $GLOBUS_LOCATION/bin/\*


Installing DICOM Data Service 

Installing DICOM Data Service

  1. Create an ivim directory (i.e., "mkdir /opt/ivim")

  2. Change to the ivim directory (i.e., "cd /opt/ivim")

  3. Check out the trunk version of the In Vivo Imaging software (i.e., "svn checkout https://scm.cci.emory.edu/svn/ivi/trunk")
    1. Change to the trunk directory (i.e., "cd /opt/ivim/trunk")
    2. Build the software (i.e., "ant clean all")

  4. Change to the DCM4CHEE bin directory (i.e., "cd /opt/databases/dcm4chee-mysql-2.14.2/bin/")
    1. Make a backup copy of the run.sh (i.e., "cp run.sh run.bkp")
    2. Edit the DCM4CHEE startup script (i.e., "vi run.sh")
    3. Search for the “org.jboss.Main” setting (i.e., "/org.jboss.Main")
    4. Add (or set) the flag -b <ip address of the server> to run this JBoss on the server
    5. Save the changes to the run.sh file (i.e., ":wq!")

  5. Change the HTTP connector port and AJP 1.3 connector port settings for JBoss (to ensure that JBoss and Tomcat could run in tandem)
    1. Change to the DCM4CHEE bin directory (i.e., "cd /opt/databases/dcm4chee-mysql-2.14.2/ server/default/deploy/jboss-web.deployer")
    2. Make a backup copy of the server.xml (i.e., "cp server.xml server.bkp")
    3. Edit the JBoss server properties file (i.e., "vi server.xml")
    4. Search for the HTTP connector port setting (i.e., "/8080")
    5. Set the HTTP connector port to 18080
    6. Search for the AJP 1.3 connector port setting (i.e., "/AJP 1.3")
    7. Set the AJP 1.3 connector port to 8099
    8. Save the changes to the server.xml file (i.e., ":wq!")

  6. Start up DCM4CHEE (i.e., "/opt/databases/dcm4chee-mysql-2.13.5/bin/run.sh")

  7. Check that DCM4CHEE is running and add AETitles for the DICOMDataService and EMBEDDEDPACS
    1. Open a web browser and http://<ip address of the server>:18080/dcm4chee-web/
    2. Log in
    3. Click on the AE Management link in the top of the screen (i.e., "http://<ip address of the server>:18080/dcm4chee-web/ae.m")
    4. Click on the “new AET” button on the upper right-hand side of the browser window
    5. Enter DICOMDATASERVICE in the “AE Title” field
    6. Enter 127.0.0.1 in the “Hostname” field
    7. Enter 4008 in the “Port” field
    8. Click the Create button
    9. Repeat steps 4 through 7, replacing DICOMDATASERVICE with EMBEDDEDPACS and 4008 with 4010

  8. Start up Tomcat (i.e., "/opt/grid/jakarta-tomcat-5.0.28/bin/startup.sh")

  9. Edit the DICOMDataService service.properties file
    1. Change to the DICOMDataService directory (i.e., "cd /opt/ivim/trunk/services/DICOMDataService")
    2. Make a backup copy of the service.properties (i.e., "cp service.properties service.bkp")
    3. Edit the DICOMDataService properties file (i.e., "vi service.properties")
    4. Search for the sopClassForQRServerAE setting (i.e., "/cqlQueryProcessorConfig_sopClassForQRServerAE")
    5. Set the sopClassForQRServerAE setting to Patient
    6. Search for the serverAE setting (i.e., "/cqlQueryProcessorConfig_serverAE")
    7. Set the serverAE setting to "DCM4CHEE"
    8. Search for the serverport setting (i.e., "/cqlQueryProcessorConfig_serverport")
    9. Set the serverport setting to "11112"
    10. Search for the serverAE setting (i.e., "/cqlQueryProcessorConfig_useCMOVE")
    11. Set the useCMOVE setting to "true"
    12. Save the changes to the service.properties file (i.e., ":wq!")

  10. Redeploy the DICOMDataService (i.e., "$ANT_HOME/bin/ant clean all deployTomcat")

  11. Open a web browser and http://<ip address of the server>:8080/wsrf/services/cagrid/DICOMDataService, to verify that the DICOMDataService is running


Notes on CVRG Install 


Initial Notes to get DICOMDataService online:

  1. Edit /etc/network/interfaces to change from dhcp to static.
    1. Within the file, change “iface eth1 inet dhcp” to “iface eth1 inet static”
    2. Under that line add the following lines:
      1. address <static IP address>
      2. netmask 255.255.255.0
      3. gateway <static IP gateway>
    3. Save the file
  2. Edit /etc/resolv.conf to specific DNS servers
    1. Within the file, enter “search cvrgrid.org”
    2. Under that line, add the following lines:
      1. nameserver <static IP DNS #1>
      2. nameserver <static IP DNS #2>
    3. Save the file
  3. Restart the image by entering “shutdown –r now”
  4. cd $CATALINA_HOME
  5. tail -f logs/catalina.out
  6. bin/startup.sh
  7. cd /opt/databases/Pixelmed/scripts
  8. ./pixelmed-exposedir.py –c /data/pixelmedPacs/<new database name/directory> /data/pixelmedPacs/<DICOM images directory>
    1. <new database name/directory> is what you call your new database
    2. <DICOM images directory> is the name of the folder where your DICOM files will reside
  9. Edit the /data/pixelmedPacs/<new database name/directory>.cfg file
    1. Within the file, search for Dicom.RemoteAEs
    2. Append “dicomdataservice” to the Dicom.RemoteAEs line
    3. Create 4 new lines after the comment section following Dicom.RemoteAEs:
      1. Dicom.RemoteAEs.dicomdataservice.CalledAETitle=DICOMDATASERVICE
      2. Dicom.RemoteAEs.dicomdataservice.HostNameOrIPAddress=127.0.0.1
      3. Dicom.RemoteAEs.dicomdataservice.Port=4018
      4. Dicom.RemoteAEs.dicomdataservice.QueryModel=STUDYROOT
    4. Save the file
  10. ./pixelmed-exposedir.py -x /data/pixelmedPacs/<new database name/directory>
  11. Once the tomcat server and the pixelmedPacs are up, cd /opt/ivim/trunk/services/DICOMDataService
  12. In the DICOMDataService directory, ant deployTomcat

Notes to switch to DCM4CHEE:

  1. Shutdown Tomcat (/opt/grid/jakarta-tomcat-5.0.28/bin/shutdown.sh)
  2. Terminate pixelMed
    1. ps –ef | grep pixelMed
    2. kill -9 <PID> associated with pixelMed
  3. Change the IP address of the JBoss server itself
    1. Change to the DCM4CHEE bin directory (cd /opt/databases/dcm4chee-mysql-2.13.5/bin/)
    2. Make a backup copy of the run.sh (cp run.sh run.bkp)
    3. Edit the DCM4CHEE startup script (vi run.sh)
    4. Search for the “org.jboss.Main” setting (/org.jboss.Main)
    5. Add (or set) the flag -b <ip address of the server> to run this JBoss on the server
    6. Save the changes to the run.sh file (:wq)
  4. Change the HTTP connector port and AJP 1.3 connector port settings for JBoss (to ensure that JBoss and Tomcat could run in tandem)
    1. Change to the DCM4CHEE bin directory (cd /opt/databases/dcm4chee-mysql-2.13.5/ server/default/deploy/jboss-web.deployer)
    2. Make a backup copy of the server.xml (cp server.xml server.bkp)
    3. Edit the JBoss server properties file (vi server.xml)
    4. Search for the HTTP connector port setting (/8080)
    5. Set the HTTP connector port to 18080
    6. Search for the AJP 1.3 connector port setting (/AJP 1.3)
    7. Set the AJP 1.3 connector port to 8099
    8. Save the changes to the server.xml file (:wq)
  5. Start up DCM4CHEE (/opt/databases/dcm4chee-mysql-2.13.5/bin/run.sh)
  6. Check that DCM4CHEE is running and add AETitles for the DICOMDataService and EMBEDDEDPACS
    1. Open a web browser and http://<ip address of the server>:18080/dcm4chee-web/
    2. Log in with admin/admin
    3. Click on the AE Management link in the top of the screen (http://<ip address of the server>:18080/dcm4chee-web/ae.m)
    4. Click on the “new AET” button on the upper right-hand side of the browser window
    5. Enter DICOMDATASERVICE in the “AE Title” field
    6. Enter 127.0.0.1 in the “Hostname” field
    7. Enter 4008 in the “Port” field
    8. Click the Create button
    9. Repeat steps d through h, replacing DICOMDATASERVICE with EMBEDDEDPACS and 4008 with 4010
  7. Start up Tomcat (/opt/grid/jakarta-tomcat-5.0.28/bin/startup.sh)
  8. Edit the DICOMDataService service.properties file (Item 3 in your previous notes)
    1. Change to the DICOMDataService directory (cd /opt/ivim/trunk/services/DICOMDataService)
    2. Make a backup copy of the service.properties (cp service.properties service.bkp)
    3. Edit the DICOMDataService properties file (vi service.properties)
    4. Search for the sopClassForQRServerAE setting (/cqlQueryProcessorConfig_sopClassForQRServerAE)
    5. Set the sopClassForQRServerAE setting to Patient
    6. Search for the serverAE setting (/cqlQueryProcessorConfig_serverAE)
    7. Set the serverAE setting to DCM4CHEE
    8. Search for the serverport setting (/cqlQueryProcessorConfig_serverport)
    9. Set the serverport setting to 11112
    10. Search for the serverAE setting (/cqlQueryProcessorConfig_useCMOVE)
    11. Set the useCMOVE setting to true
    12. Save the changes to the service.properties file (:wq)
  9. Redeploy the DICOMDataService (Item 3 in your previous notes)
    1. $ANT_HOME/bin/ant clean all deployTomcat
  10. Open a web browser and http://<ip address of the server>:8080/wsrf/services/cagrid/DICOMDataService, to verify that the DICOMDataService is running
Personal tools
Project Infrastructures