ITK Samples project

This is the CFH ITK samples project showing how the ITK API and reference implementation can be used to fulfil some common use-cases.

The best way to experiment with the ITK API and reference implementation is to download the samples and get them up an running on your own machine.

System requirements

  • Java: 1.6+
  • Web Browser: any relatively modern browser should do (it has been tested on IE8 & Chrome)

Installation

Download the itk-samples.war - this contains the API, reference implementation and some samples (in line with the scenarios). If you would prefer to download the individual artefacts the complete list can be found on the downloads page.

Running the samples

The war is executable and can run independently of a web container. To run it open a command prompt in the directory where the war was downloaded to and simply type the following command:

java -jar itk-samples.war

Your console should display something similar to this




Using your web browser navigate to http://localhost:8080/itk-samples and you should see a page showing all the samples.


To make sure everything is running correctly try the Get Patients By NHSNumber scenario - sending it to "local SMSP" (this points to localhost - i.e. both the client and server end of the invocation are fulfilled by the samples project running on your local machine). If you get a response that looks like XML you are up and running - congratulations!

Deploying in an appserver

To deploy in an appserver just copy the itk-samples.war to the normal deployment folder for your particular appserver.

Invoking different endpoints

The samples project comes configured with multiple endpoints - in general these are:

  • Local <service-name> - A version of the service running on your local machine (i.e. by virtue of itk-samples.war)
  • <service-name> on Host B - Pre-confgured for execution of against the service running on a foreign host. This can be modified by aliasing hostb to point to a specific machine via your hosts file. Alternatively you can edit the directory.properties file bundled in the war to point the HostB configuration to a known IP.
  • cloudharness - To get up an running with a remote service provider quickly we have configured some samples to run against the cloudharness service.
  • ITK Testbench - coming soon, configuration to work with a locally installed version of the ITK Testbench.