Difference between revisions of "The RSNA MIRC Source Code"

From MircWiki
Jump to navigation Jump to search
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
This article is intended for software developers who wish either to participate in the development project or simply to adapt the software for a special purpose.
+
This article describes how to obtain and build the RSNA MIRC software. It is intended for programmers, and it assumes familiarity with Java and Ant.
  
===Obtaining the RSNA MIRC Source Code===
+
There are two different MIRC implementations. The older one, <b>MIRC1</b>, runs as a collection of webapps under Tomcat. The new one, <b>MIRC2</b>, runs as a plugin to CTP. MIRC1 is at its end of life; all developers and users are asked to concentrate on MIRC2.
The software for the RSNA MIRC implementation is open source. It is maintained on a CVS server at RSNA headquarters. To obtain the source code, configure a CVS client as follows:
 
<pre>
 
Protocol:          Password server (:pserver)
 
Server:            mirc.rsna.org
 
Port:              2401
 
Repository folder:  /RSNA
 
User name:          cvs-reader
 
Password:          cvs-reader
 
Module:            MIRC-Development
 
</pre>
 
  
Together, this results in the following CVSROOT (which is constructed automatically if you use something like Tortoise-CVS on a Windows system):
+
The software for CTP and both MIRC implementations is open source. All the software written by the RSNA for the project is released under the [http://mirc.rsna.org/rsnapubliclicense.pdf RSNA Public License]. It is maintained on GitHub.
  
<center><tt>:pserver:cvs-reader@mirc.rsna.org:2401/RSNA</tt></center>
+
==CTP/MIRC==
 +
<b><i>This section is deprecated. See [[Setting Up a MIRC Development Environment]] to learn how to obtain the source code for the latest versions of the teaching file system.]</i></b>
  
This account has read privileges, but it cannot write into the repository, so it can check out but not commit. If you wish to be able to commit software to the CVS library, contact the MIRC project manager.
+
To build CTP/MIRC, you must obtain copies of both the CTP repository and the MIRC2 repository from GitHub. Both repositories must be placed on the same disk in such a way that they share the same parent directory. CTP must be built first, and then MIRC can be built.
  
===Building the Software===
+
See [[Extending CTP]] for instructions on obtaining the CTP source code. After unpacking the zip file, rename the top-level directory, which will have long name, to <b><tt>CTP</tt></b>.
When you check out the MIRC-Development module from CVS, you obtain a directory tree full of the sources and libraries for building all the components of MIRC, including the MIRC site software and all the related applications and tools (FieldCenter, FileSender, DicomEditor, etc.). The top of the directory tree is <b>MIRC-Development</b>. It contains several subdirectories. The source code is in the <b>source</b> directory, which has three child directories, one each for the Java sources, any files required by the applications, and the web.xml files required by the MIRC site webapps.
 
  
The RSNA MIRC implementation requires Java 1.5 JDK and the JAI ImageIO Tools.
+
To obtain the source code of the MIRC plugin, go to http://github.com/johnperry/MIRC2 and click the <b>Downloads</b> button.
  
The Ant build file for all the MIRC software is in the <b>MIRC-Development</b> directory and is called <b>build.xml</b>. To build the software on a Windows system, launch a command window, navigate to the <b>MIRC-Development</b> directory, and enter “<b>ant all</b>”. On a reasonably fast computer, a complete build takes about one minute, about half of which is consumed by building the Javadocs.
+
When you download the <b>MIRC2</b> repository from GitHub, you obtain a zip file containing a directory tree full of the sources and libraries for building the plugin. The top of the directory tree has a complicated name that includes the letters <tt><b>MIRC2</b></tt>. After unpacking the zip file, rename the top-level directory to <b><tt>MIRC2</tt></b>. The directory contains several subdirectories. The source code is in the <tt><b>source</b></tt> directory, which has three subdirectories, one each for the Java sources, the files required by the application, and the default CTP configuration file used when CTP hosts a MIRC site.
  
The build file contains many targets. The <b>all</b> target does a clean build of everything, including the Javadocs, which are put into the <b>documentation</b> directory. The Javadocs can be accessed with a browser by opening the file:
+
Building CTP and MIRC requires the Java 1.5 JDK and Ant. Running CTP with the MIRC plugin requires the JRE and the JAI ImageIO Tools.
  
<center><tt>MIRC-Development/documentation/index.html</tt></center>
+
The Ant build file for CTP is in the <b><tt>MIRC2</tt></b> directory and is called <tt><b>build.xml</b></tt>. To build the software on a Windows system, launch a command window, navigate to the <b><tt>MIRC2</tt></b> directory, and enter <tt><b>ant all</b></tt>.
  
The <b>quick</b> target can be used to do a clean build of everything except the Javadocs, thus saving a little time.
+
The build file contains several targets. The <tt><b>all</b></tt> target does a clean build of everything, including the installer and the Javadocs.
  
The default target, <b>mircsite</b>, just builds the MIRC site software.
+
The Javadocs can be accessed with a browser by opening the file:
  
There are many other targets for building individual libraries or applications.
+
:<tt>MIRC2/documentation/index.html</tt>
 +
 
 +
The installer, which installs both CTP and the MIRC plugin in the same operation, is located in the <tt><b>products</b></tt> directory.
 +
 
 +
== Tomcat/MIRC ==
 +
[<b><i>This section is deprecated. It is maintained here only because some of the tools are built using this repository. In time, each of the tools will have its own repository.</i></b>]
 +
 
 +
To obtain the source code for the Tomcat/MIRC webapps, go to http://github.com/johnperry/MIRC1 and click the <b>Downloads</b> button.
 +
 
 +
The build procedure is similar to that for the CTP MIRC plugin: unpack the zip file, launch a command window, navigate to the top-level directory (a long name containing <b><tt>MIRC1</tt></b>), and enter <tt><b>ant all</b></tt>.
 +
 
 +
The result of the build will be many installers placed in the <tt><b>products</b></tt> directory, one installer each for MIRC and the various tools.
 +
 
 +
The Javadocs can be accessed with a browser by opening the file:
 +
 
 +
:<tt>MIRC1/documentation/index.html</tt>
  
====The Key Directories====
 
These are the key child directories in the MIRC-Development tree.
 
*<b>libraries</b> contains all the required class libraries. Some of the libraries are generated by the build process from the source code; others are provided as jar files in the release and are available in source form in other places (e.g., Source Forge, etc.).
 
*<b>documentation</b> contains all the Javadocs generated by the build process.
 
*<b>products</b> contains all the executables generated by the build process, including installers for all applications that include multiple files.
 
*<b>source</b> contains the complete tree of sources.
 
====The Key Products====
 
 
The build process creates many libraries and products. The key products are:
 
The build process creates many libraries and products. The key products are:
*<b>MIRCsite-installer.jar</b> – the complete installer for a MIRC site, including all the standard libraries. This product is therefore fairly large - about 10MB.
+
*<b>MIRCsite-installer-full.jar</b> – the complete installer for a MIRC site, including all the standard libraries and the database. This product is therefore fairly large - about 35MB.
*<b>MIRCsite-installer-lite.jar</b> – the lite installer for a MIRC site, including only the MIRC code. This product is about 1MB. It can only be used to upgrade to a new minor release of an existing MIRC release (e.g., from T28a to T28b).
 
 
*<b>FieldCenter-installer.jar</b> – the complete installer for the clinical trials FieldCenter program. This program is a generic instance. To configure it for a specific clinical trial, one would modify the Help.html, anonymizer.properties, and fieldcenter.properties files to provide instructions specific to the trial.
 
*<b>FieldCenter-installer.jar</b> – the complete installer for the clinical trials FieldCenter program. This program is a generic instance. To configure it for a specific clinical trial, one would modify the Help.html, anonymizer.properties, and fieldcenter.properties files to provide instructions specific to the trial.
 
*<b>DicomEditor-installer.jar</b> – the complete installer for the DicomEditor program, a standalone DICOM viewer, anonymizer, and editor intended primarily as a tool for examining and modifying the dataset elements in a DICOM object or group of objects.
 
*<b>DicomEditor-installer.jar</b> – the complete installer for the DicomEditor program, a standalone DICOM viewer, anonymizer, and editor intended primarily as a tool for examining and modifying the dataset elements in a DICOM object or group of objects.
Line 56: Line 53:
 
In addition to the products named above, there are several minor products which are primarily for testing, including HttpReceiver.jar and ManifestGenerator-installer.jar. These are not intended for production use but may be helpful in some situations.
 
In addition to the products named above, there are several minor products which are primarily for testing, including HttpReceiver.jar and ManifestGenerator-installer.jar. These are not intended for production use but may be helpful in some situations.
  
===Getting Help===
+
==Getting Help==
If you have questions about something, probably others will as well. Please go to the RSNA Forum site (http://forums.rsna.org), navigate to the <b>MIRC Developers’ Corner</b> forum and post a message there. The RSNA development team monitors all the MIRC forumns and tries to provide rapid responses to problems and questions.
+
If you have questions about something, probably others will as well. Please go to the RSNA Forum site (http://forums.rsna.org), navigate to the <b>MIRC Developers’ Corner</b> forum and post a message there. The MIRC development team monitors all the MIRC forums and tries to provide rapid responses to problems and questions.

Latest revision as of 13:31, 26 December 2012

This article describes how to obtain and build the RSNA MIRC software. It is intended for programmers, and it assumes familiarity with Java and Ant.

There are two different MIRC implementations. The older one, MIRC1, runs as a collection of webapps under Tomcat. The new one, MIRC2, runs as a plugin to CTP. MIRC1 is at its end of life; all developers and users are asked to concentrate on MIRC2.

The software for CTP and both MIRC implementations is open source. All the software written by the RSNA for the project is released under the RSNA Public License. It is maintained on GitHub.

1 CTP/MIRC

This section is deprecated. See Setting Up a MIRC Development Environment to learn how to obtain the source code for the latest versions of the teaching file system.]

To build CTP/MIRC, you must obtain copies of both the CTP repository and the MIRC2 repository from GitHub. Both repositories must be placed on the same disk in such a way that they share the same parent directory. CTP must be built first, and then MIRC can be built.

See Extending CTP for instructions on obtaining the CTP source code. After unpacking the zip file, rename the top-level directory, which will have long name, to CTP.

To obtain the source code of the MIRC plugin, go to http://github.com/johnperry/MIRC2 and click the Downloads button.

When you download the MIRC2 repository from GitHub, you obtain a zip file containing a directory tree full of the sources and libraries for building the plugin. The top of the directory tree has a complicated name that includes the letters MIRC2. After unpacking the zip file, rename the top-level directory to MIRC2. The directory contains several subdirectories. The source code is in the source directory, which has three subdirectories, one each for the Java sources, the files required by the application, and the default CTP configuration file used when CTP hosts a MIRC site.

Building CTP and MIRC requires the Java 1.5 JDK and Ant. Running CTP with the MIRC plugin requires the JRE and the JAI ImageIO Tools.

The Ant build file for CTP is in the MIRC2 directory and is called build.xml. To build the software on a Windows system, launch a command window, navigate to the MIRC2 directory, and enter ant all.

The build file contains several targets. The all target does a clean build of everything, including the installer and the Javadocs.

The Javadocs can be accessed with a browser by opening the file:

MIRC2/documentation/index.html

The installer, which installs both CTP and the MIRC plugin in the same operation, is located in the products directory.

2 Tomcat/MIRC

[This section is deprecated. It is maintained here only because some of the tools are built using this repository. In time, each of the tools will have its own repository.]

To obtain the source code for the Tomcat/MIRC webapps, go to http://github.com/johnperry/MIRC1 and click the Downloads button.

The build procedure is similar to that for the CTP MIRC plugin: unpack the zip file, launch a command window, navigate to the top-level directory (a long name containing MIRC1), and enter ant all.

The result of the build will be many installers placed in the products directory, one installer each for MIRC and the various tools.

The Javadocs can be accessed with a browser by opening the file:

MIRC1/documentation/index.html

The build process creates many libraries and products. The key products are:

  • MIRCsite-installer-full.jar – the complete installer for a MIRC site, including all the standard libraries and the database. This product is therefore fairly large - about 35MB.
  • FieldCenter-installer.jar – the complete installer for the clinical trials FieldCenter program. This program is a generic instance. To configure it for a specific clinical trial, one would modify the Help.html, anonymizer.properties, and fieldcenter.properties files to provide instructions specific to the trial.
  • DicomEditor-installer.jar – the complete installer for the DicomEditor program, a standalone DICOM viewer, anonymizer, and editor intended primarily as a tool for examining and modifying the dataset elements in a DICOM object or group of objects.
  • FileSender-installer.jar – the complete installer for the FileSender program, a tool for sending files using the DICOM, HTTP, and HTTPS protocols.
  • HttpTest.jar – a self-contained tool for trying to find a way through a proxy server and generally conjugating the HTTP protocol.
  • Decipher.jar – a self-contained tool for deciphering the encrypted database file used by the anonymizer in both the MIRC site software and the FieldCenter program.
  • AuditLogger.jar – a self-contained example program that acts as a receiver for PHI audit trail export objects. This program is not useful on its own; it is intended only to demonstrate how to receive an exported MIRC audit trail event. Sites needing to capture such events can use this code as a starting point for writing an interface to their audit trail systems.
  • ExportManager-installer.jar – the complete installer for the ExportManager program, an implementation of the IHE TCE Export Manager actor.

In addition to the products named above, there are several minor products which are primarily for testing, including HttpReceiver.jar and ManifestGenerator-installer.jar. These are not intended for production use but may be helpful in some situations.

3 Getting Help

If you have questions about something, probably others will as well. Please go to the RSNA Forum site (http://forums.rsna.org), navigate to the MIRC Developers’ Corner forum and post a message there. The MIRC development team monitors all the MIRC forums and tries to provide rapid responses to problems and questions.