Mercurial > hg > orthanc
diff OrthancServer/main.cpp @ 270:e6a4c4329481
parameters for storage capacity
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 07 Dec 2012 15:01:12 +0100 |
parents | 6d9be2b470b4 |
children | 4d7469f72a0b |
line wrap: on
line diff
--- a/OrthancServer/main.cpp Fri Dec 07 14:46:44 2012 +0100 +++ b/OrthancServer/main.cpp Fri Dec 07 15:01:12 2012 +0100 @@ -214,6 +214,25 @@ ServerContext context(storageDirectory); context.SetCompressionEnabled(GetGlobalBoolParameter("StorageCompression", false)); + try + { + context.GetIndex().SetMaximumPatientCount(GetGlobalIntegerParameter("MaximumPatientCount", 0)); + } + catch (...) + { + context.GetIndex().SetMaximumPatientCount(0); + } + + try + { + uint64_t size = GetGlobalIntegerParameter("MaximumStorageSize", 0); + context.GetIndex().SetMaximumStorageSize(size * 1024 * 1024); + } + catch (...) + { + context.GetIndex().SetMaximumStorageSize(0); + } + MyDicomStoreFactory storeScp(context); {