#NEWLINE# def annoHelper( p , voxels = False , cutout = False ) : #NEWLINE# #INDENT# for i in range ( p . num_objects ) : #NEWLINE# #INDENT# if ( p . annoid == 0 ) : #NEWLINE# #INDENT# p . annoid = ( 'noid.' + str ( i ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# p . annoid = ( p . annoid + 1 ) #NEWLINE# if ( ( p . anntype == 1 ) and ( p . num_objects > 1 ) and ( not ( p . field == 'voxels' ) ) and ( not ( p . field == 'cutout' ) ) ) : #NEWLINE# #INDENT# p . anntype = random . randint ( 1 , 6 ) #NEWLINE# #UNINDENT# #UNINDENT# f = H5AnnotationFile ( p . anntype , p . annoid ) #NEWLINE# if cutout : #NEWLINE# #INDENT# if voxels : #NEWLINE# #INDENT# addVoxels ( p , f ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# addCutout ( p , f ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return f