Search in sources :

Example 1 with MappedFloatProcessor

use of ij.process.MappedFloatProcessor in project GDSC-SMLM by aherbert.

the class IJImagePeakResults 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);
    } else {
        pixels = new float[data.length];
        // Zero is mapped to 0 in the LUT.
        if ((displayFlags & DISPLAY_MAPPED) != 0) {
            MappedFloatProcessor fp = new MappedFloatProcessor(imageWidth, imageHeight, (float[]) pixels, null);
            fp.setMapZero((displayFlags & DISPLAY_MAP_ZERO) != 0);
            return fp;
        }
        return new FloatProcessor(imageWidth, imageHeight, (float[]) pixels, null);
    }
}
Also used : MappedFloatProcessor(ij.process.MappedFloatProcessor) FloatProcessor(ij.process.FloatProcessor) MappedFloatProcessor(ij.process.MappedFloatProcessor) ShortProcessor(ij.process.ShortProcessor)

Aggregations

FloatProcessor (ij.process.FloatProcessor)1 MappedFloatProcessor (ij.process.MappedFloatProcessor)1 ShortProcessor (ij.process.ShortProcessor)1