BufferedImage bi =imp.getStack().getProcessor(m).convertToShortProcessor().get16BitBufferedImage();
System.out.println("Stats: "+imp.getStack().getProcessor(m).convertToShortProcessor().getStatistics() );
Stats: stats[count=2114116, mean=1775.7265202098654, min=0.0, max=65535.0] //ok
...
GrayU16 input16 = ConvertBufferedImage.convertFromSingle(bi,null,GrayU16.class);
System.out.println("Mean of input image: " +ImageStatistics.mean(input) );
System.out.println("Max of input image: " +ImageStatistics.max(input) );
System.out.println("Min of input image: " +ImageStatistics.min(input) );
Mean of input image: -255.84000499499555. //???
Max of input image: 65535
Min of input image: 0
I also scanned through the pixels manually and did not detect any negative values.
Thanks in advance.