changeset 1323:c0af7657d398 broker

Fixed warnings
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 24 Mar 2020 16:17:03 +0100
parents 0da659f8579c
children 4d8d642f7036
files Framework/Loaders/DicomVolumeLoader.cpp Framework/Loaders/SeriesOrderedFrames.cpp
diffstat 2 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Framework/Loaders/DicomVolumeLoader.cpp	Mon Mar 23 13:52:27 2020 +0100
+++ b/Framework/Loaders/DicomVolumeLoader.cpp	Tue Mar 24 16:17:03 2020 +0100
@@ -106,17 +106,23 @@
       throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange);
     }
 
-    size_t frameIndex = dynamic_cast<const Orthanc::SingleValueObject<size_t>&>(message.GetUserPayload()).GetValue();
+    size_t frameIndex = dynamic_cast<const Orthanc::SingleValueObject<size_t>&>
+    (message.GetUserPayload()).GetValue();
 
     {
-      ImageBuffer3D::SliceWriter writer(volume_->GetPixelData(), VolumeProjection_Axial, frameIndex);
+      ImageBuffer3D::SliceWriter writer(volume_->GetPixelData(), 
+                                        VolumeProjection_Axial, 
+                                        static_cast<unsigned int>(frameIndex));
+      
       Orthanc::ImageProcessing::Copy(writer.GetAccessor(), message.GetImage());
     }
 
     volume_->IncrementRevision();
 
     {
-      VolumeUpdatedMessage updated(*this, frameIndex);
+      VolumeUpdatedMessage updated(*this, 
+                                   static_cast<unsigned int>(frameIndex));
+      
       BroadcastMessage(updated);
     }
 
--- a/Framework/Loaders/SeriesOrderedFrames.cpp	Mon Mar 23 13:52:27 2020 +0100
+++ b/Framework/Loaders/SeriesOrderedFrames.cpp	Tue Mar 24 16:17:03 2020 +0100
@@ -216,7 +216,8 @@
               
         for (size_t j = 0; j < payload.GetValue()->GetInstanceParameters().GetImageInformation().GetNumberOfFrames(); j++)
         {
-          orderedFrames_.push_back(new Frame(*payload.GetValue(), j));
+          orderedFrames_.push_back(new Frame(*payload.GetValue(), 
+                                             static_cast<unsigned int>(j)));
         }
       }
 
@@ -243,7 +244,8 @@
     {
       for (size_t j = 0; j < tmp[i].GetInstance().GetInstanceParameters().GetImageInformation().GetNumberOfFrames(); j++)
       {
-        orderedFrames_.push_back(new Frame(tmp[i].GetInstance(), j));
+        orderedFrames_.push_back(new Frame(tmp[i].GetInstance(), 
+                                           static_cast<unsigned int>(j)));
       }
     }
   }