public byte[] getBytes(int[] tagPath) { return dcmobj.getBytes(tagPath); }
public int getFileMetaInformationVersion() { byte[] b = dcmobj.getBytes(Tag.FileMetaInformationVersion); return (b[0] & 0xff) << 8 | (b[1] & 0xff); }
public byte[] getBytes(int tag) { return dcmobj.getBytes(tag); }
public byte[] getBytes(int[] tagPath, boolean bigEndian) { return dcmobj.getBytes(tagPath, bigEndian); }
public byte[] getPrivateInformation() { return dcmobj.getBytes(Tag.PrivateInformation); }
public byte[] getBytes(int tag, boolean bigEndian) { return dcmobj.getBytes(tag, bigEndian); }
/** * Get the VOI LUT function - encapsulated to allow working around a bug in * some DICOM generators which encode the string as a binary value. */ private static String getVlutFct(DicomObject voiObj) { String vlutFct; vlutFct = voiObj.getString(Tag.VOILUTFunction); if (vlutFct != null && vlutFct.trim().length() > 0) { if (!(vlutFct.equals(SIGMOID) || vlutFct.equals(LINEAR))) { // Assume vlutFct came back as hex vlutFct = new String(voiObj.getBytes(Tag.VOILUTFunction)); vlutFct = vlutFct.trim(); } } return vlutFct; } }
private static ColorSpace createRGBColorSpace(DicomObject ds) { byte[] iccProfile = ds.getBytes(Tag.ICCProfile); ColorSpace ret = null; try { if( iccProfile != null ) { ret = new ICC_ColorSpace(ICC_Profile.getInstance(iccProfile)); } } catch( Exception e ) { log.info("Encountered exception while parsing ICC Profile data", e); } if( ret == null ) { ret = ColorSpace.getInstance(ColorSpace.CS_sRGB); } return ret; }
static int[] calcMinMax(DicomObject lut) { int[] desc = lut.getInts(Tag.LUTDescriptor); byte[] data = lut.getBytes(Tag.LUTData); if (desc == null) { throw new IllegalArgumentException("Missing LUT Descriptor!");
byte[] data = ds.getBytes(dataTag);
byte[] data; if (position == 0) { byte[] unpaddedData = ds.getBytes(overlayNumber | Tag.OverlayData);
private static LookupTable createLut(int inBits, boolean signed, DicomObject ds, Integer pixelPaddingValue, Integer pixelPaddingRange, boolean inverse, boolean padInvert) { int[] desc = ds.getInts(Tag.LUTDescriptor); byte[] data = ds.getBytes(Tag.LUTData); if (desc == null) { throw new IllegalArgumentException("Missing LUT Descriptor!");