#NEWLINE# def _write_hdf( self , h5 , name = None ) : #NEWLINE# #INDENT# node = super ( VolumeData , self ) . _write_hdf ( h5 , name = name ) #NEWLINE# if ( self . _mask is not None ) : #NEWLINE# #INDENT# mask = self . _mask #NEWLINE# if isinstance ( self . _mask , np . ndarray ) : #NEWLINE# #INDENT# mgrp = '/subjects/{subj}/transforms/{xfm}/masks/' #NEWLINE# mgrp = mgrp . format ( subj = self . subject , xfm = self . xfmname ) #NEWLINE# mname = ( '__%s' % _hash ( self . _mask ) [ : 8 ] ) #NEWLINE# _hdf_write ( h5 , self . _mask , name = h5 , group = mgrp ) #NEWLINE# mask = mname #NEWLINE# #UNINDENT# node . attrs [ 'mask' ] = mask #NEWLINE# #UNINDENT# return node