#NEWLINE# def get_roiname( self ) : #NEWLINE# #INDENT# roiname = self . wids [ 'roiname' ] . GetValue ( ) #NEWLINE# if ( len ( roiname ) < 1 ) : #NEWLINE# #INDENT# roiname = 'ROI 1' #NEWLINE# names = [ str ( r . name . lower ( ) ) for r in self . mca . rois ] #NEWLINE# if ( str ( roiname . lower ( ) ) in names ) : #NEWLINE# #INDENT# ix = 1 #NEWLINE# while ( str ( roiname . lower ( ) ) in names ) : #NEWLINE# #INDENT# roiname = ( 'ROI %i' % ix ) #NEWLINE# ix += 1 #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return roiname