Nifti upload
If you already have your dicom files stored in XNAT then there is a dicom2nifti pipeline that you can use to automatically generate associated nifti files. In Oxford we tend to want to create (pre-process) these files ourselves so we need an a posteriori method to upload the NIFTIs to XNAT, and for this we use the REST API.
Uploading to a Nifti only project
For the whitehall project we have pushed NIFTIs in two slightly different ways. One method uses a bash script, https://issues.dpuk.org/dpuk/node/snippets/9, that allows a user to push NIFTI images that are in a particular filestructure and all have the same filename structure to a project that only expects to have NIFTIs.
Uploading to a Dicom + Nifti project
The second snippet anticipates that there are already dicom files in place so will need to be slightly more careful as to where it puts those files.