#NEWLINE# def get_paths( self , subject ) : #NEWLINE# #INDENT# 'Get a dictionary with a list of all candidate filenames for associated data, such as roi overlays, flatmap caches, and ctm caches.\n        ' #NEWLINE# surfpath = os . path . join ( self . filestore , subject , 'surfaces' ) #NEWLINE# if ( self . subjects [ subject ] . _warning is not None ) : #NEWLINE# #INDENT# warnings . warn ( self . subjects [ subject ] . _warning ) #NEWLINE# #UNINDENT# surfs = dict ( ) #NEWLINE# for surf in os . listdir ( surfpath ) : #NEWLINE# #INDENT# ssurf = os . path . splitext ( surf ) [ 0 ] . split ( '_' ) #NEWLINE# name = '_' . join ( ssurf [ : ( - 1 ) ] ) #NEWLINE# hemi = ssurf [ ( - 1 ) ] #NEWLINE# if ( name not in surfs ) : #NEWLINE# #INDENT# surfs [ name ] = dict ( ) #NEWLINE# #UNINDENT# surfs [ name ] [ hemi ] = os . path . abspath ( os . path . join ( surfpath , surf ) ) #NEWLINE# #UNINDENT# viewsdir = os . path . join ( self . filestore , subject , 'views' ) #NEWLINE# if ( not os . path . exists ( viewsdir ) ) : #NEWLINE# #INDENT# os . makedirs ( viewsdir ) #NEWLINE# #UNINDENT# views = os . listdir ( viewsdir ) #NEWLINE# filenames = dict ( surfs = surfs , xfms = sorted ( os . listdir ( os . path . join ( self . filestore , subject , 'transforms' ) ) ) , xfmdir = os . path . join ( self . filestore , subject , 'transforms' , '{xfmname}' , 'matrices.xfm' ) , anats = os . path . join ( surfpath . filestore , subject , 'anatomicals' , '{type}{opts}.{ext}' ) , surfinfo = os . path . join ( self . filestore , subject , 'surface-info' , '{type}{opts}.npz' ) , masks = os . path . join ( self . filestore , subject , 'transforms' , '{xfmname}' , 'mask_{type}.nii.gz' ) , rois = os . path . join ( self . filestore , subject , 'rois.svg' ) . format ( subj = subject ) , views = sorted ( [ os . path . splitext ( f ) [ 0 ] for f in views ] ) ) #NEWLINE# return filenames