How to retrieve / download MRI (dicom) data

One can no longer browse the contents of /data/transfer/{dicom,minc}/ or /data/dicom/. You can only browse or access what you have claimed on /data/dicom/*. For example:

$ sftp login.bic.mni.mcgill.ca
Connected to login.bic.mni.mcgill.ca.
sftp> cd /data/dicom
sftp> ls
remote readdir(“/data/dicom”): Permission denied
sftp> exit

GUI based (sftp) clients will trigger a similar Permission denied error.

Hence you have to access what you have claimed: ls /data/dicom/$My_Claimed_Dir_or_TarFile

While /data/transfer/dicom/ and /data/transfer/minc/ are off limits, their data contents are transferred to /data/dicom/ and /data/dicom/minc on an hourly basis, Monday to Saturday from 7h to 19h, so wait an hour or so to get your data.

On the subject of (s)ftp, for those unfamiliar with such tools, read https://en.wikipedia.org/wiki/File_Transfer_Protocol

In the future, we aim to automate the assignment of ownership, but this will require changes to the dicom headers, yet this new claim procedure (see below) will likely remain.

So this is how it works: you must login to the BIC, usually at login.bic.mni.mcgill.ca, using a ssh client, then use the find_mri script to search and claim your data.

Here’s an example…

login1:[10001] >find_mri

Not enough arguments, please provide a string to search…

login1:[10002] >find_mri JM_025_20220211_131334856
[sudo] password for sylvain:
searching…

found /data/dicom/JM_025_20220211_131334856

Once you have identified your data, add the -claim option to allow the retrieval of this data:
Ex.: find_mri -claim JM_025_20220211_131334856

login1:[10003] >find_mri -claim JM_025_20220211_131334856

Data Access Policies, September 2022

• In order to gain access to the requested data, you must first claim ownership.
• To do so, you must be the rightful owner, a close collaborator or research staff with rightful access.
• Your claims are recorded and by enacting such claims, you acknowledge responsibility for ensuring the appropriate use of these data.
• You also agree to comply with all applicable federal and provincial laws for the use of such data, along with McGill’s Confidential Data Policy,
described in section 5.1 of https://www.mcgill.ca/secretariat/files/secretariat/responsible-use-of-mcgill-it-policy-on-the.pdf

searching…

found /data/dicom/JM_025_20220211_131334856

Claiming ownership of /data/dicom/JM_025_20220211_131334856 …

nfs4_setfacl -a A::sylvain@bic.mni.mcgill.ca:rtncy /data/dicom/JM_025_20220211_131334856 (y/n) y

login1:[10004] >tail /data/dicom/.admin/locate_mri.log
2022/09/16 15:32:57 luser locate_mri gas
2022/09/16 15:34:07 luser locate_mri gas
2022/09/16 16:12:49 luser locate_mri A01_20211222_083805108
2022/09/16 16:50:53 luser locate_mri gas
2022/09/17 15:52:36 sylvain locate_mri .
2022/09/17 15:52:36 sylvain locate_mri .
2022/09/17 23:27:48 sylvain locate_mri JM_025_20220211_131334856
2022/09/17 23:50:53 sylvain locate_mri JM_025_20220211_131334856
2022/09/18 11:15:47 sylvain locate_mri JM_025_20220211_131334856
2022/09/18 12:22:25 sylvain locate_mri JM_025_20220211_131334856

If I had claimed the data, an ACL (Access Control List) would have been set and a log entry would mention that - anyone can see what’s been claimed and these infos are stored in /data/dicom/.admin/locate_mri.log.

That ACL would then allow you to download the claimed data, via sftp or other secure client or method. Note that minc data is, as of today September 19th 2022, transferred as well, hence you should find it in your search.

find_mri 's only purpose is to call locate_mri with sudo privileges. One useful option, which is set by default is find_mri -igcase … to ignore letter case in your search. Another useful option is find_mri -tar …. Type find_mri -help for more info on all available options.