use of uk.ac.sussex.gdsc.core.ij.process.MappedFloatProcessor in project GDSC-SMLM by aherbert.
the class ImageJImagePeakResults method createNewProcessor.
private ImageProcessor createNewProcessor(int imageWidth, int imageHeight) {
// Equalised display requires a 16-bit image to allow fast processing of the histogram
if ((displayFlags & DISPLAY_EQUALIZED) != 0) {
pixels = new short[data.length];
return new ShortProcessor(imageWidth, imageHeight, (short[]) pixels, null);
}
pixels = new float[data.length];
// Zero is mapped to 0 in the LUT.
if ((displayFlags & DISPLAY_MAPPED) != 0) {
final MappedFloatProcessor fp = new MappedFloatProcessor(imageWidth, imageHeight, (float[]) pixels, null);
fp.setMapZero((displayFlags & DISPLAY_MAP_ZERO) != 0);
return fp;
}
// -Infinity is mapped to 0 in the LUT.
if ((displayFlags & DISPLAY_NEGATIVES) != 0) {
return new InfinityMappedFloatProcessor(imageWidth, imageHeight, (float[]) pixels, null);
}
return new FloatProcessor(imageWidth, imageHeight, (float[]) pixels, null);
}
Aggregations