本文整理了Java中org.dcm4che3.net.Association.createFileMetaInformation()
方法的一些代码示例,展示了Association.createFileMetaInformation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Association.createFileMetaInformation()
方法的具体详情如下:
包路径:org.dcm4che3.net.Association
类名称:Association
方法名:createFileMetaInformation
暂无
代码示例来源:origin: dcm4che/dcm4che
@Override
protected void store(Association as, PresentationContext pc, Attributes rq,
PDVInputStream data, Attributes rsp)
throws IOException {
if (storageDir == null)
return;
String iuid = rq.getString(Tag.AffectedSOPInstanceUID);
String cuid = rq.getString(Tag.AffectedSOPClassUID);
String tsuid = pc.getTransferSyntax();
File file = new File(storageDir, iuid );
try {
storeTo(as, as.createFileMetaInformation(iuid, cuid, tsuid),
data, file);
} catch (Exception e) {
throw new DicomServiceException(Status.ProcessingFailure, e);
}
}
代码示例来源:origin: org.dcm4che.tool/dcm4che-tool-getscu
@Override
protected void store(Association as, PresentationContext pc, Attributes rq,
PDVInputStream data, Attributes rsp)
throws IOException {
if (storageDir == null)
return;
String iuid = rq.getString(Tag.AffectedSOPInstanceUID);
String cuid = rq.getString(Tag.AffectedSOPClassUID);
String tsuid = pc.getTransferSyntax();
File file = new File(storageDir, iuid );
try {
storeTo(as, as.createFileMetaInformation(iuid, cuid, tsuid),
data, file);
} catch (Exception e) {
throw new DicomServiceException(Status.ProcessingFailure, e);
}
}
代码示例来源:origin: dcm4che/dcm4che
@Override
protected void store(Association as, PresentationContext pc,
Attributes rq, PDVInputStream data, Attributes rsp)
throws IOException {
String cuid = rq.getString(Tag.AffectedSOPClassUID);
String iuid = rq.getString(Tag.AffectedSOPInstanceUID);
String tsuid = pc.getTransferSyntax();
File file = new File(storageDir, iuid);
try {
Attributes fmi = as.createFileMetaInformation(iuid, cuid, tsuid);
storeTo(as, fmi, data, file);
Attributes attrs = parse(file);
File dest = getDestinationFile(attrs);
renameTo(as, file, dest);
file = dest;
if (addDicomDirRecords(as, attrs, fmi, file)) {
LOG.info("{}: M-UPDATE {}", as, dicomDir);
} else {
LOG.info("{}: ignore received object", as);
deleteFile(as, file);
}
} catch (Exception e) {
deleteFile(as, file);
throw new DicomServiceException(Status.ProcessingFailure, e);
}
}
};
代码示例来源:origin: org.dcm4che.tool/dcm4che-tool-dcmqrscp
@Override
protected void store(Association as, PresentationContext pc,
Attributes rq, PDVInputStream data, Attributes rsp)
throws IOException {
String cuid = rq.getString(Tag.AffectedSOPClassUID);
String iuid = rq.getString(Tag.AffectedSOPInstanceUID);
String tsuid = pc.getTransferSyntax();
File file = new File(storageDir, iuid);
try {
Attributes fmi = as.createFileMetaInformation(iuid, cuid, tsuid);
storeTo(as, fmi, data, file);
Attributes attrs = parse(file);
File dest = getDestinationFile(attrs);
renameTo(as, file, dest);
file = dest;
if (addDicomDirRecords(as, attrs, fmi, file)) {
LOG.info("{}: M-UPDATE {}", as, dicomDir);
} else {
LOG.info("{}: ignore received object", as);
deleteFile(as, file);
}
} catch (Exception e) {
deleteFile(as, file);
throw new DicomServiceException(Status.ProcessingFailure, e);
}
}
};
代码示例来源:origin: dcm4che/dcm4che
File file = new File(storageDir, iuid + PART_EXT);
try {
storeTo(as, as.createFileMetaInformation(iuid, cuid, tsuid),
data, file);
renameTo(as, file, new File(storageDir,
代码示例来源:origin: org.dcm4che.tool/dcm4che-tool-storescp
@Override
protected void store(Association as, PresentationContext pc,
Attributes rq, PDVInputStream data, Attributes rsp)
throws IOException {
rsp.setInt(Tag.Status, VR.US, status);
if (storageDir == null)
return;
String cuid = rq.getString(Tag.AffectedSOPClassUID);
String iuid = rq.getString(Tag.AffectedSOPInstanceUID);
String tsuid = pc.getTransferSyntax();
File file = new File(storageDir, iuid + PART_EXT);
try {
storeTo(as, as.createFileMetaInformation(iuid, cuid, tsuid),
data, file);
renameTo(as, file, new File(storageDir,
filePathFormat == null
? iuid
: filePathFormat.format(parse(file))));
} catch (Exception e) {
deleteFile(as, file);
throw new DicomServiceException(Status.ProcessingFailure, e);
}
}
内容来源于网络,如有侵权,请联系作者删除!