Skip to end of metadata
Go to start of metadata


The XNAT viewer was developed to allow medical images to be linked to subjects in a study and viewed within tranSMART.

Source code

The XNAT Viewer plugin was developed at Imperial College London.

The source code is available on github at


The tranSMART server needs to be able to access XNAT remotely, using both HTTPS (to login) and HTTP (to retrieve metadata), using ports 443 and 80 respectively.

There are four configuration parameters to be defined at the end of Config.groovy:

org.xnat.domain = ''
org.xnat.username = 'your username'
org.xnat.password = 'your password'
org.transmart.xnatViewerEnable = true


The domain can point to a local XNAT server if you have one installed. Currently only one server is defined for a tranSMART instance, but this can be easily extended if there is a requirement - by adding a server ID to the subject table.

The link between subjects and XNAT images is stored in table searchapp.xnat_subject. As we have only two XNAT image sets to use they are repeated in the test data. Column tsmart_subjectID is the study ID and subject ID in tranSMART. Column xnat_subjectid is the XNAT subject identifier. xnat_project is the XNAT project identifier. eTRIKS is a public project so you can create your own XNAT username and password on then use them to configure access to test the XNAT viewer plugin.

$ psql -c "select * from searchapp.xnat_subject"
 tsmart_subjectid  | xnat_subjectid | xnat_project |   id
 GSE10024_ETRIKS:2 | OPT_002        | eTRIKS       | 4352487
 GSE10024_ETRIKS:1 | OPT_001        | eTRIKS       | 4352488
 GSE10024_ETRIKS:3 | OPT_001        | eTRIKS       | 4352489
 GSE10024_ETRIKS:5 | OPT_001        | eTRIKS       | 4352490
 GSE10024_ETRIKS:4 | OPT_002        | eTRIKS       | 4352491
 GSE10024_ETRIKS:6 | OPT_002        | eTRIKS       | 4352492
(6 rows)


For demonstration purposes, a set of images for two subjects from the OPTIMISE project are linked to 6 subjects in study GSE10024 on the postgres-test server.

Start on the Analyze page Comparison tab by selecting subjects from this study under eTRIKS Rheumatoid Arthritis/Andreas(2008) GSE10024.

Then go to the "Image View" tab. You will see the selected subjects and links to the data stored on the XNAT server.

Click on the link to open a new browser tab linked to the XNAT server. Initially no image is selected.

Clicking on the thumbnail number will open a new browser tab to display the thumbnails in the image box. OPT_002 (even number subject IDs) has a varied set of images to browse.

You can also click on "Dicom" to see metadata, and Download to download the image.




  • No labels