/// <summary> /// process an image region /// </summary> /// <param name="state">region processing state</param> private static void ProcessRegion(ThreadRegionProcessingState state) { // create a bitmap image from this region state.output_bmp = state.image_region.Export( state.bmp, state.image_width, state.image_height, ref state.output_image_width, ref state.output_image_height); }
/// <summary> /// process an image region /// </summary> /// <param name="state">region processing state</param> private static void ProcessRegion(ThreadRegionProcessingState state) { // create a bitmap image from this region state.output_bmp = state.image_region.Export( state.bmp, state.image_width, state.image_height, ref state.output_image_width, ref state.output_image_height); }
/// <summary> /// ThreadStart delegate /// </summary> public void Execute() { // perform region growing using the available data ThreadRegionProcessingState state = (ThreadRegionProcessingState)_data; ProcessRegion(state); state.active = false; _callback(_data); }