/** Returns a 16-bit version of this image as a ShortProcessor. */ public ImageProcessor convertToShort(boolean doScaling) { TypeConverter tc = new TypeConverter(this, doScaling); return tc.convertToShort(); }
/** Returns a 16-bit version of this image as a ShortProcessor. */ public ImageProcessor convertToShort(boolean doScaling) { TypeConverter tc = new TypeConverter(this, doScaling); return tc.convertToShort(); }
private ImageProcessor getProcessor() { imp.setPositionWithoutUpdate(channel, slice, frame); final ImageProcessor ip = imp.getChannelProcessor(); if (ip instanceof FloatProcessor || ip instanceof ColorProcessor) return new TypeConverter(ip, false).convertToShort(); return ip; } }
ImageProcessor convertType(ImageProcessor ip1,ImageProcessor ip,boolean doScaling){ ImageProcessor result = null; TypeConverter tc = new TypeConverter(ip1,doScaling); if(ip instanceof ByteProcessor) result = tc.convertToByte(); else if(ip instanceof FloatProcessor) result = ip1.convertToFloat(); else if(ip instanceof ColorProcessor) result = tc.convertToRGB(); else if(ip instanceof ShortProcessor) result = tc.convertToShort(); else result = ip1; return result; } void del() {