public void readValue(Object data, Tagable tagable) { tagable.setTagNoNull(this, getValue(data)); }
public static void buildSeriesReferences(Tagable tagable, Attributes attributes) { Sequence seq = attributes.getSequence(Tag.ReferencedSeriesSequence); if (Objects.nonNull(seq)) { Attributes[] ref = new Attributes[seq.size()]; for (int i = 0; i < ref.length; i++) { ref[i] = new Attributes(seq.get(i)); } tagable.setTagNoNull(TagD.get(Tag.ReferencedSeriesSequence), ref); } }
public static void setShutterColor(Tagable tagable, Attributes attributes) { Integer psVal = (Integer) TagD.get(Tag.ShutterPresentationValue).getValue(attributes); tagable.setTagNoNull(TagW.ShutterPSValue, TagD.get(Tag.ShutterPresentationValue).getValue(attributes)); float[] rgb = CIELab.convertToFloatLab((int[]) TagD.get(Tag.ShutterPresentationColorCIELabValue).getValue(attributes)); Color color = rgb == null ? null : PresentationStateReader.getRGBColor(psVal == null ? 0 : psVal, rgb, (int[]) null); tagable.setTagNoNull(TagW.ShutterRGBColor, color); }
tagable.setTagNoNull(TagW.ModalityLUTData, createLut(mLutItems)); tagable.setTagNoNull(TagW.ModalityLUTType, TagD.get(Tag.ModalityLUTType).getValue(mLutItems)); tagable.setTagNoNull(TagW.ModalityLUTExplanation, TagD.get(Tag.LUTExplanation).getValue(mLutItems));
tagable.setTagNoNull(TagW.ShutterFinalShape, shape);
/** * @see <a href="http://dicom.nema.org/medical/Dicom/current/output/chtml/part03/sect_C.11.6.html">C.11.6 Softcopy * Presentation LUT Module</a> */ public static void applyPrLutModule(Attributes dcmItems, Tagable tagable) { if (dcmItems != null && tagable != null) { // TODO implement 1.2.840.10008.5.1.4.1.1.11.2 -5 color and xray if ("1.2.840.10008.5.1.4.1.1.11.1".equals(dcmItems.getString(Tag.SOPClassUID))) { //$NON-NLS-1$ Attributes presentationLUT = dcmItems.getNestedDataset(Tag.PresentationLUTSequence); if (presentationLUT != null) { /** * Presentation LUT Module is always implicitly specified to apply over the full range of output of * the preceding transformation, and it never selects a subset or superset of the that range (unlike * the VOI LUT). */ tagable.setTag(TagW.PRLUTsData, createLut(presentationLUT)); tagable.setTag(TagW.PRLUTsExplanation, getStringFromDicomElement(presentationLUT, Tag.LUTExplanation)); tagable.setTagNoNull(TagD.get(Tag.PresentationLUTShape), "IDENTITY"); //$NON-NLS-1$ } else { // value: INVERSE, IDENTITY // INVERSE => must inverse values (same as monochrome 1) TagD.get(Tag.PresentationLUTShape).readValue(dcmItems, tagable); } } } }
TagD.get(Tag.FrameContentSequence).readValue(data, tagable); tagable.setTagNoNull(TagD.get(Tag.InstanceNumber), tagable.getTagValue(TagD.get(Tag.InStackPositionNumber))); TagD.get(Tag.PlaneOrientationSequence).readValue(data, tagable); tagable.setTagNoNull(TagW.ImageOrientationPlane, ImageOrientation.makeImageOrientationLabelFromImageOrientationPatient( TagD.getTagValue(tagable, Tag.ImageOrientationPatient, double[].class)));