Xnat download a file

Xnat download a file

xnat download a file

How to Download Data? Download Directly on XNAT. Download Images. At the Project Level; At the Session Level. Manage Files. Download Using. For example, below command downloads to dicomfiles.zip that contains all files for existing scan "3980" of existing session "29", that is for. Browsing through the XNAT data hierarchy; Downloading data and If you just want to download data, simply right-click on a XNAT file or scan on the tree.

Xnat download a file - excited

Working with Files¶

Files, containing images or other data are attached to elements with URIs defining a level and a level:

>>> project.resources().files()['image.nii']

Upload Files¶

Files are uploaded with the method, which is similar to the method but supports different arguments:

>>> project.resource('NIFTI').file('T1.nii').insert('/tmp/image.nii')>>> project.resource('NIFTI').file('image.nii').insert(... '/tmp/image.nii',... content='T1',... format='NIFTI'... tags='image test')

Note

The old method is equivalent to and is still working.

Warning

The content, format and tags attributes can only be set when uploading the file, and then cannot be modified.

Download Files¶

Files are downloaded with the method. Given no location, a default path in the cachedir will be automatically generated and returned.

>>> project.resource('NIFTI').file('T1.nii').get()'/tmp/nosetests@central.xnat.org/c7a5b961fc504ffc9aa292f76d75fb0c_image.nii'>>> project.resource('NIFTI').file('T1.nii').get('/tmp/test.nii')'/tmp/test.nii'>>> project.resource('NIFTI').file('T1.nii').get_copy()'/tmp/nosetests@central.xnat.org/workspace/projects/Volatile/resources/123150742/files/image.nii'>>> project.resource('NIFTI').file('T1.nii').get_copy('/tmp/test.nii')'/tmp/test.nii'

Get attributes¶

If attributes were defined they can be retrieved:

>>> project.resource('NIFTI').file('image.nii').size()98098>>> project.resource('NIFTI').file('image.nii').content()'T1'>>> project.resource('NIFTI').file('image.nii').format()'NIFTI'>>> project.resource('NIFTI').file('image.nii').tags()'image test'

© Copyright 2010, Yannick Schwartz.

Built with Sphinx and ❤️ using a custom theme based on Read the Docs.
Источник: http://pyxnat.github.io/pyxnat/features/files.html

Remarkable, useful: Xnat download a file

Xnat download a file 103
Xnat download a file 246
Xnat download a file 361
xnat download a file

Xnat download a file

3 thoughts to “Xnat download a file”

Leave a Reply

Your email address will not be published. Required fields are marked *