The easiest way to go through all the selected images is to use the iterators. Since the frame selection is window dependant, you need to know for what window you want to iterate. Usually this is done for the current window.
|
If you have lengthy computation to do on each frame, I would suggest to do it in separate threads to improve speed. SliceO has a mechanism to help you with this, the "Fct_Dispatch_..." functions.
First, you need to create the "Struct_Dispatch_1" structure that will contain the list of the frames you want to perform the computation on, then you call the "Fct_Dispatch_..." with that structure. There's 3 variation on the function depending on what your computation will affect (the TAG images, the GLI images, or something else).
|
The "Fct_Dispatch_..." function will take care of dispatching 1 separate computation threads for each frame. It will not start more thread than you have available CPUs. You need to provide it with a pointer to your computation function (here the "Demo_Fct_thread") by placing the pointer to your computation function in the "data.fct" variable. Your function will be called from each thread with a pointer to the "Struct_Dispatch_2" structure. Your computation function must include a call to the "Fct_Dispatch_End" function
|