Posted in:

Tags:
In some cases, FreeSurfer may have been run outside the CNDA. Here are is some sample REST to be used in uploading those FreeSurfers after the fact into your MR session.

1. Create an empty FreeSurfer assessor (fs:fsData/fs_version is required, xnat:experimentData/date is optional)
curl -k -u ${user}:${pw} -X PUT “https://$%7bhost%7d/data/archive/projects/$%7bproject%7d/subjects/$%7bsubject%7d/experiments/$%7bsessid%7d/assessors/$%7bfs%7d?xsiType=fs:fsData&fs:fsData/fs_version=$%7bfs_version%7d&%20xnat:experimentData/date=$%7bfs_date%7d|https://${host}/data/archive/projects/${project}/subjects/${subject}/experiments/${sessid}/assessors/${fs}?xsiType=fs:fsData&fs:fsData/fs_version=${fs_version}& xnat:experimentData/date=${fs_date}"

Example:
curl -k -u userId:password -X PUT "https://cnda.wustl.edu%20/data/archive/projects/testProj/subjects/101/experiments/101_big_session/assessors/101_big_session_fs_20140403?xsiType=fs:fsData&fs:fsData/fs_version=freesurfer-Linux-centos4_x86_64-stable-pub-v5.1.0&xnat:experimentData/date=2014-04-03|https://cnda.wustl.edu /data/archive/projects/testProj/subjects/101/experiments/101_big_session/assessors/101_big_session_fs_20140403?xsiType=fs:fsData&fs:fsData/fs_version=freesurfer-Linux-centos4_x86_64-stable-pub-v5.1.0&xnat:experimentData/date=2014-04-03"

2. Create a DATA resource on FreeSurfer assessor
curl -k -u ${user}:${pw} -X PUT "https://$%7bhost%7d/data/archive/projects/$%7bproject%7d/subjects/$%7bsubject%7d/experiments/$%7bsessid%7d/assessors/$%7bfs%7d/resources/DATA|https://${host}/data/archive/projects/${project}/subjects/${subject}/experiments/${sessid}/assessors/${fs}/resources/DATA”

Example:
curl -k -u userId:password -X PUT "https://cnda.wustl.edu%20/data/archive/projects/testProj/subjects/101/experiments/101_big_session/assessors/101_big_session_fs_20140403/resources/DATA|https://cnda.wustl.edu /data/archive/projects/testProj/subjects/101/experiments/101_big_session/assessors/101_big_session_fs_20140403/resources/DATA”

3. Upload and extract zipped FreeSurfer files into the resource
curl -k -u ${user}:${pw} -T {localFSFiles}.zip “https://$%7bhost%7d/data/archive/projects/$%7bproject%7d/subjects/$%7bsubject%7d/experiments/$%7bsessid%7d/assessors/$%7bfs%7d/resources/DATA/files/$%7bsession%7d.zip?inbody=true&extract=true&overwriteFiles=true|https://${host}/data/archive/projects/${project}/subjects/${subject}/experiments/${sessid}/assessors/${fs}/resources/DATA/files/${session}.zip?inbody=true&extract=true&overwriteFiles=true”

Example:
curl -k -u userId:password -T ./101_big_session_FS.zip "https://cnda.wustl.edu%20/data/archive/projects/testProj/subjects/101/experiments/101_big_session/assessors/101_big_session_fs_20140403/resources/DATA/files/101_big_session.zip?inbody=true&extract=true&overwriteFiles=true|https://cnda.wustl.edu /data/archive/projects/testProj/subjects/101/experiments/101_big_session/assessors/101_big_session_fs_20140403/resources/DATA/files/101_big_session.zip?inbody=true&extract=true&overwriteFiles=true”

The localFSFiles zip should have a directory structure as shown below:
101_big_session <- (parent directory with name same as ${sessid}
  • scripts <- (child directories, standard FS)
  • mri
  • surf
  • label
  • touch
  • stats