comparison 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
comparison
equal deleted inserted replaced
269:f6fdf5abe751 270:e6a4c4329481
212 212
213 boost::filesystem::path storageDirectory = GetGlobalStringParameter("StorageDirectory", "OrthancStorage"); 213 boost::filesystem::path storageDirectory = GetGlobalStringParameter("StorageDirectory", "OrthancStorage");
214 ServerContext context(storageDirectory); 214 ServerContext context(storageDirectory);
215 context.SetCompressionEnabled(GetGlobalBoolParameter("StorageCompression", false)); 215 context.SetCompressionEnabled(GetGlobalBoolParameter("StorageCompression", false));
216 216
217 try
218 {
219 context.GetIndex().SetMaximumPatientCount(GetGlobalIntegerParameter("MaximumPatientCount", 0));
220 }
221 catch (...)
222 {
223 context.GetIndex().SetMaximumPatientCount(0);
224 }
225
226 try
227 {
228 uint64_t size = GetGlobalIntegerParameter("MaximumStorageSize", 0);
229 context.GetIndex().SetMaximumStorageSize(size * 1024 * 1024);
230 }
231 catch (...)
232 {
233 context.GetIndex().SetMaximumStorageSize(0);
234 }
235
217 MyDicomStoreFactory storeScp(context); 236 MyDicomStoreFactory storeScp(context);
218 237
219 { 238 {
220 // DICOM server 239 // DICOM server
221 DicomServer dicomServer; 240 DicomServer dicomServer;