Mercurial > hg > orthanc
changeset 4512:cff7fdfc83a4
added FileContentType_DicomUntilPixelData
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 12 Feb 2021 11:33:16 +0100 |
parents | 1ec156a0da38 |
children | 1f455b86b054 |
files | OrthancFramework/Sources/Enumerations.h OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp OrthancFramework/Sources/FileStorage/StorageAccessor.cpp OrthancFramework/UnitTestsSources/FileStorageTests.cpp |
diffstat | 4 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Sources/Enumerations.h Thu Feb 11 19:06:29 2021 +0100 +++ b/OrthancFramework/Sources/Enumerations.h Fri Feb 12 11:33:16 2021 +0100 @@ -726,7 +726,8 @@ // the file "Plugins/Engine/OrthancPlugins.cpp" FileContentType_Unknown = 0, FileContentType_Dicom = 1, - FileContentType_DicomAsJson = 2, + FileContentType_DicomAsJson = 2, // For Orthanc <= 1.9.0 + FileContentType_DicomUntilPixelData = 3, // New in Orthanc 1.9.1 // Make sure that the value "65535" can be stored into this enumeration FileContentType_StartUser = 1024,
--- a/OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp Thu Feb 11 19:06:29 2021 +0100 +++ b/OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp Fri Feb 12 11:33:16 2021 +0100 @@ -107,6 +107,9 @@ case FileContentType_DicomAsJson: return "JSON summary of DICOM"; + case FileContentType_DicomUntilPixelData: + return "DICOM until pixel data"; + default: return "User-defined"; }
--- a/OrthancFramework/Sources/FileStorage/StorageAccessor.cpp Thu Feb 11 19:06:29 2021 +0100 +++ b/OrthancFramework/Sources/FileStorage/StorageAccessor.cpp Fri Feb 12 11:33:16 2021 +0100 @@ -220,6 +220,7 @@ switch (info.GetContentType()) { case FileContentType_Dicom: + case FileContentType_DicomUntilPixelData: extension = ".dcm"; break;
--- a/OrthancFramework/UnitTestsSources/FileStorageTests.cpp Thu Feb 11 19:06:29 2021 +0100 +++ b/OrthancFramework/UnitTestsSources/FileStorageTests.cpp Fri Feb 12 11:33:16 2021 +0100 @@ -148,7 +148,7 @@ StorageAccessor accessor(s); std::string data = "Hello world"; - FileInfo info = accessor.Write(data, FileContentType_DicomAsJson, CompressionType_ZlibWithSize, true); + FileInfo info = accessor.Write(data, FileContentType_Dicom, CompressionType_ZlibWithSize, true); std::string r; accessor.Read(r, info); @@ -156,7 +156,7 @@ ASSERT_EQ(data, r); ASSERT_EQ(CompressionType_ZlibWithSize, info.GetCompressionType()); ASSERT_EQ(11u, info.GetUncompressedSize()); - ASSERT_EQ(FileContentType_DicomAsJson, info.GetContentType()); + ASSERT_EQ(FileContentType_Dicom, info.GetContentType()); ASSERT_EQ("3e25960a79dbc69b674cd4ec67a72c62", info.GetUncompressedMD5()); ASSERT_NE(info.GetUncompressedMD5(), info.GetCompressedMD5()); }