#NEWLINE# def make_pack( outfile , subj , types = ( 'inflated' , ) , method = 'raw' , level = 0 , decimate = False , disp_layers = [ 'rois' ] , extra_disp = None ) : #NEWLINE# #INDENT# 'Generates a cached CTM file' #NEWLINE# ctm = BrainCTM ( subj , decimate = decimate ) #NEWLINE# ctm . addCurvature ( ) #NEWLINE# for name in types : #NEWLINE# #INDENT# ctm . addSurf ( name ) #NEWLINE# #UNINDENT# if ( not os . path . exists ( os . path . split ( outfile ) [ 0 ] ) ) : #NEWLINE# #INDENT# os . makedirs ( os . path . split ( outfile ) [ 0 ] ) #NEWLINE# #UNINDENT# return ctm . save ( os . path . splitext ( outfile ) [ 0 ] , method = method , level = level , disp_layers = disp_layers , extra_disp = extra_disp )