diff OrthancStone/Sources/Volumes/VolumeReslicer.cpp @ 1624:59f95b9ea858

fix build
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 06 Nov 2020 17:30:36 +0100
parents b7630b1a0253
children 52b8b96cb55f
line wrap: on
line diff
--- a/OrthancStone/Sources/Volumes/VolumeReslicer.cpp	Wed Nov 04 11:39:15 2020 +0100
+++ b/OrthancStone/Sources/Volumes/VolumeReslicer.cpp	Fri Nov 06 17:30:36 2020 +0100
@@ -504,12 +504,15 @@
                                       const CoordinateSystem3D& plane,
                                       const OrientedVolumeBoundingBox& box) const
   {
-    for (unsigned int y = 0; y < slice_->GetHeight(); y++)
+    const unsigned int width = slice_->GetWidth();
+    const unsigned int height = slice_->GetHeight();
+    
+    for (unsigned int y = 0; y < height; y++)
     {
       FastRowIterator fast(*slice_, extent_, plane, box, y);
       SlowRowIterator slow(*slice_, extent_, plane, box, y);
 
-      for (unsigned int x = 0; x < slice_->GetWidth(); x++)
+      for (unsigned int x = 0; x < width; x++)
       {
         float px, py, pz;
         fast.GetVolumeCoordinates(px, py, pz);