Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1. RESTAPI Basic Operation Manual

...

curl -u username "https://xnat.sydney.edu.au/data/projects/[insert project name here]/subjects/[insert subject name here]/experiments/[insert session name here]/scans/4[insert scan id here]/files?format=zip" -o dicomfiles.zip


Note: For example, PVT000 is the project name, Haofei01 is the subject name, "Haofei01_MRI" is the session/experiment name, "4" is the scan name. below command downloads to dicomfiles.zip that contains all files for existing scan "3980" of existing session "29", that is for existing subject "MH_Brain" of existing project "fang1".

curl -u xufang "https://dev.xnat.sydney.edu.au/data/projects/fang1/subjects/MH_Brain/experiments/29/scans/3980/files?format=zip" -o dicomfiles.zip


Upload all files into the scan

curl -u username -X PUT "https://xnat.sydney.edu.au/data/projects/[insert project name here]/subjects/[insert subject name here]/experiments/[insert session name here]/scans/

...

[insert scan id here]/resources/[insert a custom folder name here]/files?extract=true" -F

...

Note: For example, PVT000 is the project name, Haofei01 is the subject name, "Haofei01_MRI" is the session/experiment name, "4" is the scan name, "ABC" is the subfolder name, and "files" are necessary to be added. 

Create folder

curl -u username “file=@compresses-file.zip


For example, below command will decompress test.zip and save all DICOM files into "TEST" folder under existing scan "3980" of existing session "29", that is for existing subject "MH_Brain" of existing project "fang1". You can specify the name of folder, if not existed, it'll be created.

curl -u xufang -X PUT "https://dev.xnat.sydney.edu.au/data/projects/fang1/subjects/MH_Brain/experiments/29/scans/3980/resources/TEST/files?extract=true" -F "file=@test.zip"

Create folder

curl -u username -X PUT "https://xnat.sydney.edu.au/data/projects/[insert project name here]/subjects/[insert subject name here]/experiments/[insert session name here]/scans/[insert scan id here]/resources/[insert a custom folder name here]"


For example, below command creates a sub-folder "TEST3" under scan named "3980" of existing session "29", that is for existing subject "MH_Brain" of existing project "fang1". Note that no further sub-directories are allowed.

curl -u xufang -X PUT "https://xnat.sydney.edu.au/data

...

/projects/

...

fang1/subjects/

...

MH_Brain/experiments/

...

29/scans/

...

3980/resources/

...

TEST3"


2. How can we determine the project, subject, session/experiments, scan name via the XNAT Web Interface ?

...

Step 3. Create the Artemis Scripts

For information about Artemis Job Submission, monitoring and management, please refer to the information page about Artemis.

https://sydneyuni.atlassian.net/wiki/spaces/RC/pages/190284213/Job+Submission

https://sydneyuni.atlassian.net/wiki/spaces/RC/pages/213090348/Job+Monitoring+and+Management

[unikey@login2 ~]$ vi run.pbs

#!/bin/bash

#PBS -P SASTEST

...