factory.put( LdapUtils.stringValue(attrs.get("dicomTransferSyntax"), null), new ImageReaderParam( LdapUtils.stringValue( attrs.get("dcmIIOFormatName"), null),
this.readParam = decompressor.getDefaultReadParam(); this.patchJpegLS = param.patchJPEGLS; this.pmiAfterDecompression = param.pmiAfterDecompression(pmi); } else { this.file = ((BulkData) pixeldata).getFile();
factory.put(tsuid, new ImageReaderFactory.ImageReaderParam(formatName, className, patchJPEGLS, imageReadParam));
if (param == null) throw new UnsupportedOperationException("Unsupported Transfer Syntax: " + tsuid); pmiAfterDecompression = param.pmiAfterDecompression(pmi); this.rle = tsuid.equals(UID.RLELossless); this.decompressor = ImageReaderFactory.getImageReader(param);
factory.put(tsuid, new ImageReaderFactory.ImageReaderParam(formatName, className, patchJPEGLS, imageReadParam));
private void adjustDataset() { if (imageDescriptor.getSamples() == 3) { PhotometricInterpretation pmi = imageDescriptor.getPhotometricInterpretation(); int planarConfiguration = imageDescriptor.getPlanarConfiguration(); if (decompressor != null) { pmi = decompressorParam.pmiAfterDecompression(pmi); planarConfiguration = srcTransferSyntaxType.getPlanarConfiguration(); } if (compressor != null) { pmi = pmi.compress(destTransferSyntax); planarConfiguration = destTransferSyntaxType.getPlanarConfiguration(); } dataset.setString(Tag.PhotometricInterpretation, VR.CS, pmi.toString()); dataset.setInt(Tag.PlanarConfiguration, VR.US, planarConfiguration); } }
public void load(InputStream in) throws IOException { Properties props = new Properties(); props.load(in); for (Map.Entry<Object, Object> entry : props.entrySet()) { String[] ss = StringUtils.split((String) entry.getValue(), ':'); map.put((String) entry.getKey(), new ImageReaderParam(ss[0], ss[1], ss[2], ss.length > 3 ? StringUtils.split(ss[3], ';') : StringUtils.EMPTY_STRING)); } }
private List<ModificationItem> storeDiffs(ConfigurationChanges.ModifiedObject ldapObj, ImageReaderParam prevParam, ImageReaderParam param, List<ModificationItem> mods) { LdapUtils.storeDiffObject(ldapObj, mods, "dcmIIOFormatName", prevParam.formatName, param.formatName, null); LdapUtils.storeDiffObject(ldapObj, mods, "dcmJavaClassName", prevParam.className, param.className, null); LdapUtils.storeDiffObject(ldapObj, mods, "dcmPatchJPEGLS", prevParam.patchJPEGLS, param.patchJPEGLS, null); LdapUtils.storeDiff(ldapObj, mods, "dcmImageReadParam", prevParam.getImageReadParams(), param.getImageReadParams()); return mods; }
private Attributes storeTo(ConfigurationChanges.ModifiedObject ldapObj, String tsuid, ImageReaderParam param, Attributes attrs) { attrs.put("objectclass", "dcmImageReader"); attrs.put("dicomTransferSyntax", tsuid); attrs.put("dcmIIOFormatName", param.formatName); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dcmJavaClassName", param.className, null); LdapUtils.storeNotNullOrDef(ldapObj, attrs, "dcmPatchJPEGLS", param.patchJPEGLS, null); LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmImageReadParam", param.getImageReadParams()); return attrs; }