# HG changeset patch # User Sebastien Jodogne # Date 1613125996 -3600 # Node ID cff7fdfc83a4552e759b635f008925ec1e3e5a3a # Parent 1ec156a0da38d12fb1423ae129111bf2fa51177f added FileContentType_DicomUntilPixelData diff -r 1ec156a0da38 -r cff7fdfc83a4 OrthancFramework/Sources/Enumerations.h --- 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, diff -r 1ec156a0da38 -r cff7fdfc83a4 OrthancFramework/Sources/FileStorage/FilesystemStorage.cpp --- 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"; } diff -r 1ec156a0da38 -r cff7fdfc83a4 OrthancFramework/Sources/FileStorage/StorageAccessor.cpp --- 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; diff -r 1ec156a0da38 -r cff7fdfc83a4 OrthancFramework/UnitTestsSources/FileStorageTests.cpp --- 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()); }