public static ColorModel createYBRColorModel(int bits, int dataType, Attributes ds, YBR ybr, ColorSubsampling subsampling) { return new SampledComponentColorModel( new YBRColorSpace(createRGBColorSpace(ds), ybr), subsampling); }
public LookupTable createLUT(int outBits) { LookupTable lut = combineModalityVOILUT(presentationLUT != null ? log2(presentationLUT.length()) : outBits); if (presentationLUT != null) { lut = lut.combine(presentationLUT.adjustOutBits(outBits)); } else if (inverse) lut.inverse(); return lut; }
@Override public LookupTable combine(LookupTable other) { byte[] lut = this.lut; if (other.outBits > 8) { short[] ss = new short[lut.length]; other.lookup(lut, 0, ss, 0, lut.length); return new ShortLookupTable(inBits, other.outBits, offset, ss); } other.lookup(lut, 0, lut, 0, lut.length); this.outBits = other.outBits; return this; }
public static ColorModel createPaletteColorModel(int bits, int dataType, Attributes ds) { return new PaletteColorModel(bits, dataType, createRGBColorSpace(ds), ds); }
@Override public ColorModel createColorModel(int bits, int dataType, Attributes ds) { return ColorModelFactory.createYBRColorModel(bits, dataType, ds, YBR.PARTIAL, ColorSubsampling.YBR_XXX_422); }
@Override public void lookup(short[] src, int srcPos, byte[] dest, int destPos, int length) { for (int i = srcPos, endPos = srcPos + length, j = destPos; i < endPos;) dest[j++] = lut[index(src[i++])]; }
@Override public ColorModel createColorModel(int bits, int dataType, Attributes ds) { return ColorModelFactory.createMonochromeColorModel(bits, dataType); } },
@Override public ColorModel createColorModel(int bits, int dataType, Attributes ds) { return ColorModelFactory.createPaletteColorModel(bits, dataType, ds); } },
@Override public ColorModel createColorModel(int bits, int dataType, Attributes ds) { return ColorModelFactory.createYBRFullColorModel(bits, dataType, ds); } },
@Override public void lookup(short[] src, int srcPos, short[] dest, int destPos, int length) { for (int i = srcPos, endPos = srcPos + length, j = destPos; i < endPos;) dest[j++] = lut[index(src[i++] & 0xffff)]; }
public LookupTable createLUT(int outBits) { LookupTable lut = combineModalityVOILUT(presentationLUT != null ? log2(presentationLUT.length()) : outBits); if (presentationLUT != null) { lut = lut.combine(presentationLUT.adjustOutBits(outBits)); } else if (inverse) lut.inverse(); return lut; }
public static ColorModel createYBRColorModel(int bits, int dataType, Attributes ds, YBR ybr, ColorSubsampling subsampling) { return new SampledComponentColorModel( new YBRColorSpace(createRGBColorSpace(ds), ybr), subsampling); }
@Override public LookupTable combine(LookupTable other) { byte[] lut = this.lut; if (other.outBits > 8) { short[] ss = new short[lut.length]; other.lookup(lut, 0, ss, 0, lut.length); return new ShortLookupTable(inBits, other.outBits, offset, ss); } other.lookup(lut, 0, lut, 0, lut.length); this.outBits = other.outBits; return this; }
public static ColorModel createPaletteColorModel(int bits, int dataType, Attributes ds) { return new PaletteColorModel(bits, dataType, createRGBColorSpace(ds), ds); }
@Override public ColorModel createColorModel(int bits, int dataType, Attributes ds) { return ColorModelFactory.createYBRColorModel(bits, dataType, ds, YBR.FULL, ColorSubsampling.YBR_XXX_422); }
@Override public void lookup(byte[] src, int srcPos, byte[] dest, int destPos, int length) { for (int i = srcPos, endPos = srcPos + length, j = destPos; i < endPos;) dest[j++] = lut[index(src[i++])]; }
@Override public ColorModel createColorModel(int bits, int dataType, Attributes ds) { return ColorModelFactory.createYBRColorModel(bits, dataType, ds, YBR.PARTIAL, ColorSubsampling.YBR_XXX_420); }