Difference between revisions of "Configuring the CTPClient Application for Clinical Trials"

From MircWiki
Jump to: navigation, search
(The Popup XML Schema)
(Building CTPClient)
Line 131: Line 131:
 
* <b><tt>DA.script</tt></b>
 
* <b><tt>DA.script</tt></b>
  
In special situations, default files for the DicomFilter and DicomAnonymizer lookup table can be provided. The following are the names required by the application:
+
In special situations, default files for the dialog, DicomFilter and DicomAnonymizer lookup table can be provided. The following are the names required by the application:
  
 +
* <b><tt>DIALOG.xml</tt></b>
 
* <b><tt>DF.script</tt></b>
 
* <b><tt>DF.script</tt></b>
 
* <b><tt>LUT.properties</tt></b>
 
* <b><tt>LUT.properties</tt></b>

Revision as of 01:47, 15 March 2013

The CTPClient application is a program for anonymizing images and transmitting them from image acquisition sites to principal investigator sites in clinical trials. This article describes how to configure, distribute, and run the program. The intended audience for this article is clinical trial administrators and their software minions.

1 Running CTPClient

CTPClient can be launched via the Java webstart mechanism, thus removing the necessity for installing CTP applications at the image acquisition sites. When run via webstart, the user accesses a URL on the principal investigator's CTP site, and the CTP site then downloads CTPClient and starts it. The recommended method for launching CTPClient via webstart is to use the CTP Application Server on the CTP site. For general information on the Application Server, see Using the CTP Application Server.

CTPClient can also be launched as a stand-alone application installed on the client computer. When run stand-alone, the program is started by double-clicking the program's icon or by launching a command window and entering the command:

java -jar CTPClient.jar [options]

where [options] is a series of quoted parameters, each in the form:

"param=value"

2 The Processing Pipeline

CTPClient has a fixed processing pipeline consisting of these stages, in this order:

  • DicomFilter
  • DicomDecompressor
  • DicomPixelAnonymizer
  • DicomAnonymizer
  • HttpExportService

The DicomFilter and DicomPixelAnonymizer stages must be explicitly enabled using the parameters described in the next section. The DicomDecompressor stage is run only if the object being processed matches a signature of the DicomPixelAnonymizer; otherwise, the object is not decompressed. The DicomAnonymizer is always enabled.

No default script is provided for the DicomFilter.

Default scripts are provided for the DicomPixelAnonymizer and the DicomAnonymizer.

No default lookup table is provided for the DicomAnonymizer.

As mentioned in Building CTPClient, below, a special CTPClient build can be created for specific applications, including application-specific files and configuration parameters.

3 Run-time Configuration

CTPClient is designed to be configured by setting the [options] parameters for the transmitting site. When run via webstart, these parameters can be supplied by query parameters in the URL, as in this example:

http://ctp.university.edu/webstart/CTPClient?param1=value1&param2=value2

Note that when a value includes whitespace or any other characters that are illegal in a URL, the value must be URL-encoded.

The parameters supported by the program are:

  • windowTitle: The text to be shown in the title bar of the CTP Client window. The default is "CTP Client".
  • panelTitle: The text to be shown at the top of the main pane in the CTPClient UI. The default is "CTP Client".
  • helpURL: The URL to be accessed when the user clicks the Help button on the CTPClient UI. If this parameter is missing, the Help button is not displayed.


  • acceptNonImageObjects: Specifies whether non-image objects are to be selected for processing. If set to "yes", all objects are accepted. If set to any other value, only images are accepted. The default configuration only accepts image objects.


  • dialogEnabled: Specifies whether to provide a dialog for entry of parameters at runtime. If set to "yes", CTPClient looks for a file named dialog.xml on the CTP server in the same directory as the CTPClient being served by the Application Server. When present, CTPClient downloads the file from the server. When not present, CTPClient looks for the file built into the application. If the file is not found in either place, CTPClient looks for the file in the same directory in which the program is running. If the file cannot be found, the dialog is disabled. {See The Dialog XML Schema for a description of how to configure the dialog.) Values provided by the user in the dialog are treated as if they were options included in the start command of the program.


  • dfEnabled: Specifies whether to use the DicomFilter to select objects for processing. If set to "yes", objects are selected using the DicomFilter script. If set to any other value, no filtering is done.
  • dfScriptName: The name of a DicomFilter script file stored on the CTP server in the same directory as the CTPClient being served by the Application Server. When present, CTPClient downloads the script file from the server. When not present, CTPClient looks for the default script (DF.script) built into the application. If no default script is found, the DicomFilter stage is disabled, even if the dfEnabled parameter is set to "yes".


  • dpaEnabled: Specifies whether the DicomPixelAnonymizer is to be included in the processing of objects. If set to "yes", objects are processed using the DicomPixelAnonymizer script. If set to any other value, no pixel anonymization is done.
  • dpaScriptName: The name of a DicomPixelAnonymizer script file stored on the CTP server in the same directory as the CTPClient being served by the Application Server. When present, CTPClient downloads the script file from the server. When not present, CTPClient looks for the default script (DPA.script) built into the application. If no default script is found, the DicomPixelAnonymizer stage is disabled, even if the dpaEnabled parameter is set to "yes".


  • daScriptName: The name of a DicomAnonymizer script file stored on the CTP server in the same directory as the CTPClient being served by the Application Server. When present, CTPClient downloads the script file from the server. When not present, CTPClient uses the default script (DA.script) built into the application.
  • daLUTName: The name of a DicomAnonymizer lookup table file stored on the CTP server in the same directory as the CTPClient being served by the Application Server. When present, CTPClient downloads the lookup table file from the server. When not present, CTPClient looks for the default lookup table (LUT.properties) built into the application. If no lookup table is available, an empty lookup table is provided.


  • url: The URL of the destination HttpImportService.
  • showURL: "yes" to display a UI field for entering the URL of the destination HttpImportService. "no" to suppress the UI field, thus forcing the URL to be the value of the url parameter. The default value is "yes".


In addition to the standard parameters above, CTPClient supports special parameters for modifying the DicomAnonymizer script parameters and lookup table entries.

Any parameter name starting with the at-sign ( '@' ) is treated as an anonymizer script modification. The '@' is removed, and the rest of the parameter name is used as the name of a script PARAM. The parameter value (the text after the '=' character) is used as the value for that PARAM. The intent of this feature is to allow a standard script to be tailored for a specific image acquisition site. Note that this feature does not allow element scripts to be modified; it only allows script PAAM values to be changed.

Any parameter name starting with the dollar-sign ( '$' ) is treated as a lookup table modification. The '$' is removed, and the rest of the parameter name is used as the lookup table key. The parameter value (the text after the '=' character) is used as the value for that key. The intent of this feature is to allow a standard lookup table to be tailored for a specific image acquisition site.

The Application Server supplies three parameters automatically when starting CTPClient. These are used by CTPClient to contact the server when the dfScriptName, dpaScriptName, daScriptName, or daLUTName parameters are supplied. If CTPClient is not started via webstart and the project requires that files be obtained from a server, the three parameters below must be supplied explicitly.

  • protocol: The protocol to be used for communication with the CTP site's web server.
  • host: The host IP address or domain name (and port) of the CTP site's web server.
  • application: The name of the application ("CTPClient").

4 The Dialog XML Schema

When the dialogEnabled parameter is set to "yes", CTPClient loads an XML file named dialog.xml to define the contents of a dialog allowing the user to enter values for parameters. The following is an example XML structure specifying three parameters:

<dialog title="New Patient">
    <h>Site Parameters</h>
    <p>
        Enter the ID value for this site.
    </p>
    <param
        name="@SITEID"
        label="Site ID"
        value=""/>
    <h>Patient Parameters</h>
    <p>
        Enter the ID and name values for this patient.
    </p>
    <param
        name="@SUBJECTID"
        label="Subject ID"
        value=""/>
    <param
        name="@SUBJECTNAME"
        label="Subject Name"
        value=""/>
</popup>

The title attribute of the root element specifies the title of the popup. The title is also used as the name of the button in the main CTPClient window for displaying the dialog, so it should be fairly short.

The h element specifies a heading.

The p element specifies a paragraph. Word wrapping is not provided; lines are broken at newline characters.

The param element specifies a parameter.

  • The name attribute specifies the name of an option parameter.
  • The label attribute specifies the text to be displayed beside the entry field for the parameter.
  • The value attribute specifies the initial value provided in the entry field. If a value was provided by an option parameter when CTPClient was started, that value takes precedence over the value of the value attribute.

Parameter names starting with @ specify PARAM values in DicomAnonymizer scripts.

Parameter names starting with $ specify values in DicomAnonymizer lookup tables.

5 Building CTPClient

In some trials, it may be desired to build a special version of CTPClient with pre-configured values in the configuration files.

The source code for CTPClient is on GitHub at https://github.com/johnperry/CTPClient.

The default configuration files are located in the source/files directory:

  • config.properties
  • DPA.script
  • DA.script

In special situations, default files for the dialog, DicomFilter and DicomAnonymizer lookup table can be provided. The following are the names required by the application:

  • DIALOG.xml
  • DF.script
  • LUT.properties

The program is built using ant. After the build is complete, a zip file containing all the files necessary for deployment is located in the products directory.

6 Deploying CTPClient on the CTP Application Server

As described in Using the CTP Application Server, all the files for CTPClient must be placed in the CTP/ROOT/CTPClient directory. The latest version is encapsulated in a zip file on the RSNA MIRC site at http://mirc.rsna.org/download/CTPClient.zip.

Included in the zip file is the XSL file required by the Application Server for automatic creation of the webstart jnlp file.

To deploy CTPClient, create the CTP/ROOT/CTPClient directory and copy all the files from the zip file into it.