Mercurial > hg > orthanc
changeset 1623:76ed4cf74bb5
Add ".dcm" suffix to files in ZIP archives
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 18 Sep 2015 10:39:43 +0200 |
parents | 0b8e62bd9c48 |
children | 0a2ad4a6858f |
files | NEWS OrthancServer/OrthancRestApi/OrthancRestArchive.cpp |
diffstat | 2 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/NEWS Thu Sep 17 07:28:24 2015 +0200 +++ b/NEWS Fri Sep 18 10:39:43 2015 +0200 @@ -1,6 +1,8 @@ Pending changes in the mainline =============================== +* Add ".dcm" suffix to files in ZIP archives (cf. URI ".../archive") + Version 0.9.4 (2015/09/16) ==========================
--- a/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp Thu Sep 17 07:28:24 2015 +0200 +++ b/OrthancServer/OrthancRestApi/OrthancRestArchive.cpp Fri Sep 18 10:39:43 2015 +0200 @@ -199,7 +199,7 @@ case ResourceType_Series: { // Create a filename prefix, depending on the modality - char format[16] = "%08d"; + char format[24] = "%08d.dcm"; if (resource["MainDicomTags"].isMember("Modality")) { @@ -207,15 +207,15 @@ if (modality.size() == 1) { - snprintf(format, sizeof(format) - 1, "%c%%07d", toupper(modality[0])); + snprintf(format, sizeof(format) - 1, "%c%%07d.dcm", toupper(modality[0])); } else if (modality.size() >= 2) { - snprintf(format, sizeof(format) - 1, "%c%c%%06d", toupper(modality[0]), toupper(modality[1])); + snprintf(format, sizeof(format) - 1, "%c%c%%06d.dcm", toupper(modality[0]), toupper(modality[1])); } } - char filename[16]; + char filename[24]; for (Json::Value::ArrayIndex i = 0; i < resource["Instances"].size(); i++) {