Difference between revisions of "CTSC Slicer XNE"

From NAMIC Wiki
Jump to: navigation, search
Line 66: Line 66:
 
Presents a search that grabs all scans for a given subject by default (the simplest workflow), but has advanced functionality that can be used to focus the search:
 
Presents a search that grabs all scans for a given subject by default (the simplest workflow), but has advanced functionality that can be used to focus the search:
  
  * Experiments: { Experiment_IDs }
+
===='''Initial Presentation'''====
  ** Imaging Sessions: { MR, PET, CT ...}
+
* Subject: { SubjectIDs}
  *** Scans: { Scan_IDs }
+
  * Experiments: { ExperimentIDs }
  *** Reconstructions: { Reconstruction_IDs }
+
  ** Imaging Sessions: {}
  *** Assessors: { Assessor_IDs }
+
  *** Scans: {}  
  ** Non-imaging Assessments: { Asessor_IDs }
+
  *** Reconstructions: {}
 +
  *** Assessors: {}
 +
  ** Non-imaging Assessments: {}
  
Default selections?: All Scans
+
===='''A Subject ID is selected; Experiments are updated'''====
 +
* Subject: $SubjectIDs
 +
* Experiments:  { ExperimentIDs }
 +
** Imaging Sessions: {}
 +
*** Scans: {}
 +
*** Reconstructions: {}
 +
*** Assessors: {}
 +
** Non-imaging Assessments: {}
 +
 
 +
===='''An Experiment ID is selected; Imaging Sessions & Non-imaging Assessments are updated'''====
 +
* Subject: $SubjectIDs
 +
* Experiments:  $ExperimentID
 +
** Imaging Sessions: { $SessionIDs }
 +
*** Scans: {}
 +
*** Reconstructions: {}
 +
*** Assessors: {}
 +
** Non-imaging Assessments: { $AssessmentIDs }
 +
 
 +
===='''A Session ID is selected; ScanIDs, etc. are updated'''====
 +
* Subject: $SubjectIDs
 +
* Experiments: $ExperimentID
 +
** Imaging Sessions: $SessionID
 +
*** Scans: { ScanIDs }
 +
*** Reconstructions: { ReconstructionIDs }
 +
*** Assessors: { AssessorIDs }
 +
** Non-imaging Assessments: {AssessmentIDs}
  
 
=== 8. Example Query XNAT for All Scans for Selected Experiment ===
 
=== 8. Example Query XNAT for All Scans for Selected Experiment ===

Revision as of 17:14, 4 August 2009

Home < CTSC Slicer XNE

UXP & functionality planning for Slicer's XNE client

Workflow & Implementation approaches

All Workflow Steps:

  • Select XNAT Enterprise server
  • Authentication dialog presented
  • Dialog input is processed
  • XNAT queried for projects
  • response is checked for http error codes
  • xml parsed to get list of projects
  • GUI populated
  • One project selected
  • XNAT queried for subjects in that project
  • response is checked for http error codes
  • xml parsed to get list of subjects
  • GUI populated
  • One subject and filters selected to narrow search
  • User selects "search" for all scans
  • XNAT queried for appropriate scans
  • response is checked for http error codes
  • xml is parsed to get list of scans
  • GUI is populated
  • User selects one scan and "download"
  • Scan is loaded into Slicer

Each step is detailed below.

1. Select XNAT Enterprise Server

This sets the current URI handler to be the XNE_HttpHandler for subsequent REST-based client calls to XNE web services.

2. Authentication Dialog Presented

  • Enter user name and password

3. Process Dialog Input

  • Save the username (XNE_UserName) and password (XNE_Password)
  • Authenticate and create a session:
curl -d POST $XNE_Svr/REST/JSESSION -u $XNE_UserName:$XNE_Password

4. Query XNAT for Projects Available to User

  • XNAT queried for appropriate projects
curl $XNE_Srv/REST/projects?format=xml --cookie JSESSIONID=$sessionID
  • response is checked for http error codes
    • if error is found, report to user
    • else xml is parsed to get list of scans

5. User Selects One Project

6. Query XNAT for Subjects in Selected Project

  • XNAT queried for appropriate subjects
curl $XNE_Svr/REST/projects/$projectID/subjects?format=xml --cookie JSESSIONID=$sessionID
  • response is checked for http error codes
    • if error is found, report to user
    • else xml is parsed to get list of scans

7. User Selects One Subject, Configures Filters to Narrow Search & Selects Search

Presents a search that grabs all scans for a given subject by default (the simplest workflow), but has advanced functionality that can be used to focus the search:

Initial Presentation

* Subject: { SubjectIDs}
* Experiments: { ExperimentIDs }
** Imaging Sessions: {}
*** Scans: {} 
*** Reconstructions: {}
*** Assessors: {}
** Non-imaging Assessments: {}

A Subject ID is selected; Experiments are updated

* Subject: $SubjectIDs
* Experiments:  { ExperimentIDs }
** Imaging Sessions: {}
*** Scans: {} 
*** Reconstructions: {}
*** Assessors: {}
** Non-imaging Assessments: {}

An Experiment ID is selected; Imaging Sessions & Non-imaging Assessments are updated

* Subject: $SubjectIDs
* Experiments:  $ExperimentID
** Imaging Sessions: { $SessionIDs }
*** Scans: {} 
*** Reconstructions: {}
*** Assessors: {}
** Non-imaging Assessments: { $AssessmentIDs }

A Session ID is selected; ScanIDs, etc. are updated

* Subject: $SubjectIDs
* Experiments: $ExperimentID 
** Imaging Sessions: $SessionID
*** Scans: { ScanIDs } 
*** Reconstructions: { ReconstructionIDs }
*** Assessors: { AssessorIDs }
** Non-imaging Assessments: {AssessmentIDs}

8. Example Query XNAT for All Scans for Selected Experiment

  • XNAT queried for appropriate scans
curl $XNE_Svr/REST/projects/$ProjectID/subjects/$SubjectID/experiments/$ExpID/scans?format=xml --cookie JSESSION=$sessionID
  • response is checked for http error codes
    • if error is found, report to user
    • else xml is parsed to get list of scans

9. User Selects One Scan and Clicks Download

curl $XNE_Svr/projects/$ProjectID/subjects/$SubjectID/experiments/$ExpID/scans/$ScanID/resources/DICOM/files

This returns a list of URIs which Slicer uses to populate a vtkMRMLVolumeArchetypeStorageNode:URI and vtkMRMLVolumeArchetypeStorageNode::URIListMembers

10. Scan is Loaded into Slicer

vtkMRMLVolumeArchetypeStorageNode::ReadData( vtkMRMLVolumeArchetypeStorage *node) is called, which calls vtkMRMLStorageNode::StageReadData (*node) to download data using the XNE_HttpHandler.