Closed sudgy closed 4 years ago
I'm thinking the issue might be due to the values produced in the deconvolution process rather than the part of the code that builds images. I've attached some example histograms that show why the raw images can look bad. The phase images typically have regions that suddenly jump from π to -π, which causes the static look. Phase unwrapping corrects this quite well. From this particular histogram, it looks like subtracting 2π from all phases greater than 0 would give the same clean result as phase unwrapping, but I'm not sure if that would be a universal solution.
Iterative deconvolution can produce small regions with large values in amplitude, which is apparent in the amplitude histogram. I'd bet these extremities are confusing ImageJ when the image is displayed (The Wiener filter and ER-Decon methods have been fine for me so far ever since I changed the ImagePlus constructing code to go by slice instead of by pixel). For these images it might help if we either plot the log or enforce a maximum value like 255?
In short, I think the problem might be a lack of post-processing rather than an issue with the ImagePlus building/displaying code.
I've noticed that the scaling issues don't just happen in phase. They happen in amplitude too. I've been messing around with the code but haven't been able to figure out what the problem is. Have you looked into this, @schlackt ?