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 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 void setPresentationLUT(Attributes attrs) { Attributes pLUT = attrs.getNestedDataset(Tag.PresentationLUTSequence); if (pLUT != null) { int[] desc = pLUT.getInts(Tag.LUTDescriptor); if (desc != null && desc.length == 3) { int len = desc[0] == 0 ? 0x10000 : desc[0]; presentationLUT = createLUT(new StoredValue.Unsigned(log2(len)), resetOffset(desc), pLUT.getSafeBytes(Tag.LUTData), pLUT.bigEndian()); } } else { String pShape = attrs.getString(Tag.PresentationLUTShape); inverse = (pShape != null ? "INVERSE".equals(pShape) : "MONOCHROME1".equals( attrs.getString(Tag.PhotometricInterpretation))); } }
public void setPresentationLUT(Attributes attrs) { Attributes pLUT = attrs.getNestedDataset(Tag.PresentationLUTSequence); if (pLUT != null) { int[] desc = pLUT.getInts(Tag.LUTDescriptor); if (desc != null && desc.length == 3) { int len = desc[0] == 0 ? 0x10000 : desc[0]; presentationLUT = createLUT(new StoredValue.Unsigned(log2(len)), resetOffset(desc), pLUT.getSafeBytes(Tag.LUTData), pLUT.bigEndian()); } } else { String pShape = attrs.getString(Tag.PresentationLUTShape); inverse = (pShape != null ? "INVERSE".equals(pShape) : "MONOCHROME1".equals( attrs.getString(Tag.PhotometricInterpretation))); } }