zitmen / thunderstorm

ThunderSTORM: a comprehensive ImageJ plugin for SMLM data analysis and super-resolution imaging
http://zitmen.github.io/thunderstorm/
GNU General Public License v3.0
91 stars 42 forks source link

Zero-only frames take long/never finish #68

Open oodegard opened 5 years ago

oodegard commented 5 years ago

In a dataset where some of the frames are completely filled with zero-values, I noticed that the ThunderSTORM "never" finished.

I could circumvent this with a simple script that sets the pixel intensity at x = 1; y = 1 to 1 in frames with only zero values; I hope this can be of help/if others have similar problems. There might also be other solutions or that the error is on my side.

Small imageJ macro lines to fix zero only frames
// print(slices);
for(i = 1; i <= slices; i++){
    setSlice(i);
     getRawStatistics(nPixels, mean, min, max, std, histogram);
     if(max == 0){
        setPixel(1, 1, 1);
        print("zeros only in slice: " + i); 
      }
}