Mercurial > hg > orthanc
changeset 695:c59bc408fb10
parameter to disable the computation of the MD5
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 05 Feb 2014 13:58:00 +0100 |
parents | 72dc919a028c |
children | 4c1860179cc5 |
files | OrthancServer/ServerContext.cpp OrthancServer/ServerContext.h OrthancServer/main.cpp Resources/Configuration.json |
diffstat | 4 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/ServerContext.cpp Wed Feb 05 13:26:19 2014 +0100 +++ b/OrthancServer/ServerContext.cpp Wed Feb 05 13:58:00 2014 +0100 @@ -269,4 +269,10 @@ return Store(resultPublicId, dicom.GetDicom(), dicomBuffer, dicomSize); } + void ServerContext::SetStoreMD5ForAttachments(bool storeMD5) + { + LOG(INFO) << "Storing MD5 for attachments: " << (storeMD5 ? "yes" : "no"); + accessor_.SetStoreMD5(storeMD5); + } + }
--- a/OrthancServer/ServerContext.h Wed Feb 05 13:26:19 2014 +0100 +++ b/OrthancServer/ServerContext.h Wed Feb 05 13:58:00 2014 +0100 @@ -137,5 +137,12 @@ { return lua_; } + + void SetStoreMD5ForAttachments(bool storeMD5); + + bool IsStoreMD5ForAttachments() const + { + return accessor_.IsStoreMD5(); + } }; }
--- a/OrthancServer/main.cpp Wed Feb 05 13:26:19 2014 +0100 +++ b/OrthancServer/main.cpp Wed Feb 05 13:58:00 2014 +0100 @@ -333,6 +333,7 @@ LOG(WARNING) << "Index directory: " << indexDirectory; context.SetCompressionEnabled(GetGlobalBoolParameter("StorageCompression", false)); + context.SetStoreMD5ForAttachments(GetGlobalBoolParameter("StoreMD5ForAttachments", true)); std::list<std::string> luaScripts; GetGlobalListOfStringsParameter(luaScripts, "LuaScripts");
--- a/Resources/Configuration.json Wed Feb 05 13:26:19 2014 +0100 +++ b/Resources/Configuration.json Wed Feb 05 13:58:00 2014 +0100 @@ -147,5 +147,11 @@ // By default, Orthanc compares AET (Application Entity Titles) in a // case-insensitive way. Setting this option to "true" will enable // case-sensitive matching. - "StrictAetComparison" : false + "StrictAetComparison" : false, + + // When the following option is "true", the MD5 of the DICOM files + // will be computed and stored in the Orthanc database. This + // information can be used to detect disk corruption, at the price + // of a small performance overhead. + "StoreMD5ForAttachments" : true }