comparison OrthancServer/SliceOrdering.cpp @ 1873:5e7feeb63d1f

SlicesShort
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Dec 2015 09:59:59 +0100
parents c8877965d67d
children b1291df2f780
comparison
equal deleted inserted replaced
1872:09a737a6bf36 1873:5e7feeb63d1f
397 tmp.append(GetBasePath(ResourceType_Instance, GetInstanceId(i)) + "/file"); 397 tmp.append(GetBasePath(ResourceType_Instance, GetInstanceId(i)) + "/file");
398 } 398 }
399 399
400 result["Dicom"] = tmp; 400 result["Dicom"] = tmp;
401 401
402 Json::Value slicesShort = Json::arrayValue;
403
402 tmp.clear(); 404 tmp.clear();
403 for (size_t i = 0; i < GetInstancesCount(); i++) 405 for (size_t i = 0; i < GetInstancesCount(); i++)
404 { 406 {
405 std::string base = GetBasePath(ResourceType_Instance, GetInstanceId(i)); 407 std::string base = GetBasePath(ResourceType_Instance, GetInstanceId(i));
406 for (size_t j = 0; j < GetFramesCount(i); j++) 408 for (size_t j = 0; j < GetFramesCount(i); j++)
407 { 409 {
408 tmp.append(base + "/frames/" + boost::lexical_cast<std::string>(j)); 410 tmp.append(base + "/frames/" + boost::lexical_cast<std::string>(j));
409 } 411 }
412
413 Json::Value tmp2 = Json::arrayValue;
414 tmp2.append(GetInstanceId(i));
415 tmp2.append(0);
416 tmp2.append(GetFramesCount(i));
417
418 slicesShort.append(tmp2);
410 } 419 }
411 420
412 result["Slices"] = tmp; 421 result["Slices"] = tmp;
422 result["SlicesShort"] = slicesShort;
413 } 423 }
414 } 424 }