Further example to translate to multi-thread?
Thu, 04/16/2020 - 07:22 am
I appreciate the recent insight on using a thread safe function to avoid a loop. I'd like to ask whether the code below is amenable to being streamlined in the same way. I am using it to loop over all layers in a stack of grayscale images and remove a background.
MatrixOP/FREE fbimg = layer(fbimgSTACK,ic)
sf = 255/(V_max - V_min)
MatrixOP/O fbimg = (sf*(fbimg - V_min))
fbimgSTACK[ic] = fbimg[p][q]
MatrixOP/O wbimg = uint8(fbimgSTACK)
I have tried a few approaches. I cannot seem to wrap my head around how to pass the layer information into and back out of the ThreadSafe function.