Hello,
I'm fairly new to XNAT, but I have to learn how to run a complicated image processing pipeline in XNAT :-). For that purpose I have created quite simple image processing pipeline of 2 steps (Python executables) and a main Python wrapper script.
(I'm attaching the relevant code and 1 test image).
I have read the related XNAT 1.6 documentation pages and have watched the 2012 video of Mohana's pipeline workshop, but I'm still not clear how to configure a simple pipeline like mine:
README
***********************************************************************************************
This contains components of a simple XNAT test image processing pipeline.
Simple XNAT test Pipeline
==========
* segmentation.py: segments a simple test volume by thresholding
* inspection.py: generates PNG file for visual inspection of the segmentation result
== Pipeline ==
=== Segmentation ===
inputs => image [threshold1 threshold2]
outputs => segmented-image
=== Inspection ===
input => image segmented-image
output => output-image: PNG file with 3 perpendicular cross-section views of the segmentation result overlayed on the input image
*****************************************************************************************************
In short:
- Inputs:
- For step 1
- NIFTI image (for uploading the NIFTI image to my XNAT project I made the Python script pyxnat_interface.py- also attached- which seems to work, but my image is to be seen as reseource in the subject/session only under Actions->Manage files),
- 2 thresholds (optional)
- For step 2:
- a NIFTI image with the segmentation result from step 1
- Outputs:
- From step 1:
- a NIFTI image with the segmentation result
- From step 2:
- a PNG file with a snapshot of the result.
The pipeline currently runs by calling the main script with 1 parameter
run_test_pipeline.py -c test_pipeline_config.xml,
where the XML file specifies my input and output parameters.
According to the documentation and the tutorial, I should specify my parameters in a resource XML file, which XNAT understands. But I was wondering is it not possible to directly use my XML and specify simply one parameter option "-c" followed by the name of my XML containing all parameters? Also, how can I access the NIFTI's I uploaded as resources for a subject (session)?
I would be very grateful for some advice on that.
Kind regards,
Elena