Mercurial > hg > orthanc
diff OrthancServer/OrthancRestApi/OrthancRestArchive.cpp @ 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 | f938f7779bcb |
children | 784a6b92d2f1 |
line wrap: on
line diff
--- 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++) {