XNAT2012 - Image Session Validation
Video:
Goal:
At the end of this session, attendees should be able to:
- Create a schematron rule file
- Launch image session validation
Material:
- Participants will need the workshop VM
- Participants would be creating a schematron file to validate the MR Sessions in BOGUS_OUA
- Path to Schematron file /opt/xnat/workshop2012/d2s1-validation
- Online access to the above schematron file: http://hg.xnat.org/workshop2012/src/bae0e4a27fcd/d2s1-validation/mrsession_rules.sch
- /opt/xnat/pipeline_1_6/catalog/validation_tools/Validate.xml is the pipeline which enables validation.
- An assessor, val:ProtocolVal, specified in <XNAT_HOME>/plugin-resources/project-skeletons/xnat/validation/Validation.xsd, is created which contains the validation results
- https://wiki.xnat.org/display/XNAT/Configuring+the+Protocol+Check+Pipeline
- Talk Powerpoint
Pre-requisites:
- Working knowledge of XML and XPATH
Tasks during the talk:
Step 1: Adding a pipeline to a site
We would add the pipeline /opt/xnat/pipeline_1_6/catalog/validation_tools/Validate.xml to the site
- Login to XNAT as Admin.
- Navigate to Administer -> Pipelines
- Click on Add Pipeline to Repository
- Input:
- Enter Path to Pipeline descriptor xml: /opt/xnat/pipeline_1_6/catalog/validation_tools/Validate.xml
- Enter Name of the custom webpage to launch this pipeline: PipelineScreen_protocolcheck.vm
- Click on Add
- You will get a message "... was added successfullyā€¯
- If you did everything correct, you will see ProtocolCheck listed in the pipeline repository.
Step 2: Upload the schematron file as a resource to project BOGUS_OUA
- cd /opt/xnat/workshop2012/d2s1-validation
/opt/xnat/pipeline_1_6/xnat-tools/XNATRestClient
-host
http://localhost:8080/xnat
-u
admin
-p
admin
-m
PUT
-remote
"/data/archive/projects/BOGUS_OUA/resources/validation_xnat_mrSessionData"
/opt/xnat/pipeline_1_6/xnat-tools/XNATRestClient -host http://localhost:8080/xnat -u admin -p admin -m PUT -remote
"/data/archive/projects/BOGUS_OUA/resources/validation_xnat_mrSessionData/files?content=v1.0"
-local /opt/xnat/workshop2012/d2s1-validation/mrsession_rules.sch
- ALTERNATIVELY: curl -i -u admin:admin -X PUT -T mrsession_rules.sch http://localhost:8080/xnat/data/archive/projects/BOGUS_OUA/resources/validation_xnat_mrSessionData/files?content=v1.0&inbody=true
Step 3: Setting up the pipeline for the project BOGUS_OUA
Navigate to BOGUS_OUA project as project owner
- Click on Pipelines tab.
- Click on Add More Pipelines
- Click on Add (for Validate.xml pipeline)
- Select Is this pipeline to be launched automatically while archiving?
- Set the value of Experiment Type to xnat:mrSessionData
- Set the value of Content attribute set within the validation catalog to v1.0
- Click on Submit
Step 4: Setup the datatype
- As Admin, click on Administer -> Data types
- Select xnat:mrSessionData
- Under Available Report Actions, enter
- Name: PipelineScreen_launch_pipeline,
- Display Name: Build,
- Popup: always,
- Secure Access: edit
- (leave other columns empty)
Step 5: Launching the pipeline (via Action -> Build)
- Navigate to project BOGUS_OUA
- Select an MRSession
- Click on Action -> Build
- Select ProtocolCheck
- Click on Submit
Step 6: Launching the pipeline automatically
- Upload a MR Session
- Archive the session