/** Returns an 8-bit version of this image as a ByteProcessor. */ public ImageProcessor convertToByte(boolean doScaling) { TypeConverter tc = new TypeConverter(this, doScaling); return tc.convertToByte(); }
/** Returns an 8-bit version of this image as a ByteProcessor. */ public ImageProcessor convertToByte(boolean doScaling) { TypeConverter tc = new TypeConverter(this, doScaling); return tc.convertToByte(); }
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() {