|
...
for ( k=0; k < nb_frame; k++ ) {
if ( Progress_Abort( progress ) )
break ;
Progress_Val( progress, k*nb_inc ) ;
// --- Critical region ---
Access_Init( "Threshold_Fct_Thread" ) ;
SliceO_Frame *frame = frame_list[k] ;
// --- highlight the frame we are working on ---
frame->Flag_Set_On( CLASS_MODE_THIS, window, CLASS_FLAG_HIGHLIGHT_BLU ) ;
Fct_Redraw( REDRAW_HIGHLIGHT ) ;
// --- lock this frame (if not in use!) ---
if ( frame->Lock_Get() ) {
Access_End( "Threshold_Thread" ) ;
Progress_Write( progress, "\xF1\005WARNING:\xF0\002 image locked!" ) ;
Progress_Write( progress, "\002 skipping: \001%s", frame->Name_Get() ) ;
continue ;
}
frame->Lock_Set( 1 ) ;
Progress_Write( progress, "Segmenting: \001%s", frame->Name_Get() ) ;
...
// --- reset the highlight ----
frame->Flag_Set_Off( CLASS_MODE_THIS, window, CLASS_FLAG_HIGHLIGHT_BLU ) ;
Fct_Redraw( REDRAW_HIGHLIGHT, window, frame ) ;
// --- unlock the frame ---
frame->Lock_Set( -1 ) ;
// --- get out of critical region ---
Access_End( "Threshold_Fct_Thread" ) ;
}
...
|