Mercurial > hg > orthanc-stone
comparison Samples/Sdl/Loader.cpp @ 763:53167294d870
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 23 May 2019 11:27:37 +0200 |
parents | 26f4345e771e 07adcffba38c |
children | f36a6f7e7bdf |
comparison
equal
deleted
inserted
replaced
762:26f4345e771e | 763:53167294d870 |
---|---|
380 LOG(INFO) << "Computed spacing between slices: " << spacingZ << "mm"; | 380 LOG(INFO) << "Computed spacing between slices: " << spacingZ << "mm"; |
381 | 381 |
382 const DicomInstanceParameters& parameters = *slices_[0]; | 382 const DicomInstanceParameters& parameters = *slices_[0]; |
383 | 383 |
384 image_.reset(new ImageBuffer3D(parameters.GetExpectedPixelFormat(), | 384 image_.reset(new ImageBuffer3D(parameters.GetExpectedPixelFormat(), |
385 parameters.GetImageInformation().GetWidth(), | 385 parameters.GetImageInformation().GetWidth(), |
386 parameters.GetImageInformation().GetHeight(), | 386 parameters.GetImageInformation().GetHeight(), |
387 slices.GetSlicesCount(), false /* don't compute range */)); | 387 static_cast<unsigned int>(slices.GetSlicesCount()), |
388 false /* don't compute range */)); | |
388 | 389 |
389 geometry_->SetSize(image_->GetWidth(), image_->GetHeight(), image_->GetDepth()); | 390 geometry_->SetSize(image_->GetWidth(), image_->GetHeight(), image_->GetDepth()); |
390 geometry_->SetAxialGeometry(slices.GetSliceGeometry(0)); | 391 geometry_->SetAxialGeometry(slices.GetSliceGeometry(0)); |
391 geometry_->SetVoxelDimensions(parameters.GetPixelSpacingX(), | 392 geometry_->SetVoxelDimensions(parameters.GetPixelSpacingX(), |
392 parameters.GetPixelSpacingY(), spacingZ); | 393 parameters.GetPixelSpacingY(), spacingZ); |
465 // If a better image quality is already available, don't update the content | 466 // If a better image quality is already available, don't update the content |
466 if (quality >= slicesQuality_[index]) | 467 if (quality >= slicesQuality_[index]) |
467 { | 468 { |
468 { | 469 { |
469 ImageBuffer3D::SliceWriter writer | 470 ImageBuffer3D::SliceWriter writer |
470 (*image_, VolumeProjection_Axial, index); | 471 (*image_, VolumeProjection_Axial, static_cast<unsigned int>(index)); |
471 Orthanc::ImageProcessing::Copy(writer.GetAccessor(), image); | 472 Orthanc::ImageProcessing::Copy(writer.GetAccessor(), image); |
472 } | 473 } |
473 | 474 |
474 revision_ ++; | 475 revision_ ++; |
475 slicesRevision_[index] += 1; | 476 slicesRevision_[index] += 1; |
569 volume_.SetGeometry(slices); | 570 volume_.SetGeometry(slices); |
570 } | 571 } |
571 | 572 |
572 if (volume_.GetSlicesCount() != 0) | 573 if (volume_.GetSlicesCount() != 0) |
573 { | 574 { |
574 strategy_.reset(new BasicFetchingStrategy( | 575 strategy_.reset(new BasicFetchingStrategy(sorter_->CreateSorter( |
575 sorter_->CreateSorter(volume_.GetSlicesCount()), BEST_QUALITY)); | 576 static_cast<unsigned int>(volume_.GetSlicesCount())), BEST_QUALITY)); |
576 | 577 |
577 assert(simultaneousDownloads_ != 0); | 578 assert(simultaneousDownloads_ != 0); |
578 for (unsigned int i = 0; i < simultaneousDownloads_; i++) | 579 for (unsigned int i = 0; i < simultaneousDownloads_; i++) |
579 { | 580 { |
580 ScheduleNextSliceDownload(); | 581 ScheduleNextSliceDownload(); |