Import the fetcher function
In [34]:
from conwhat.utils.fetchers import fetch_conwhat_atlas
import glob
Define the output directory
In [ ]:
atlas_dir = '/scratch/hpc3230/Data/conwhat_atlases'
Define which atlas to grab
In [4]:
atlas_name = 'CWL2k8Sc33Vol3d100s_v01'
Break a leg
In [30]:
fetch_conwhat_atlas(atlas_name,atlas_dir,remove_existing=True);
The zipped and unzipped atlas folders are now there in the top-level atlas directory;
In [35]:
glob.glob(atlas_dir + '/*')
Out[35]:
The .zip file can be optionally removed automatically if desired.
volumetric atlas folders contain a small number of fairly small .txt files
In [36]:
glob.glob('%s/%s/*.txt' %(atlas_dir,atlas_name))
Out[36]:
...and a larger number of nifti images; one for each atlas structure
In [38]:
glob.glob('%s/%s/*.nii.gz' %(atlas_dir,atlas_name))[:5]
Out[38]:
In [39]:
len(glob.glob('%s/%s/*.nii.gz' %(atlas_dir,atlas_name)))
Out[39]: