To set threshold unevenly for stack


Hello. I have a stack of 40 images (all 8bit, the deeper - the darker). I want to set threshold equally only for each 10 consecutive images and set threshold with different values for images 11-20, then another threshold values for images 21-30, and finally for 31-40. Is there a way to do it in ImageJ without breaking stack of 40 images into 4 stacks by 10 images each?


Dear @1timur1,

Setting a threshold is an operation on a complete stack and, to my knowledge, there can only be one threshold for a stack. Hence, you won’t be able to split the stack into substacks and merge it afterward. Unless you are creating binary images for the substacks and merge those back together. That seems the easiest option if you don’t want to write a macro.



If you are thresholding a stack, with the built in threshold applet, when you “apply” it, the applet will ask you if you want to determine an auto-threshold for each slice separately or use the stack histogram. But maybe I am not understanding the question correctly.


Thank you both. I used method outlined by Stefan.
Gabriel - yes I see the option to calculate threshold for each image. Unfortunately as I can see, it works only for auto threshold, while for my stack it is better to set a manual threshold.