diff Framework/Volumes/VolumeReslicer.cpp @ 735:c3bbb130abc4

removing dependencies in ImageBuffer3D
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 21 May 2019 16:15:06 +0200
parents 7719eb852dd5
children fa5febe0f0c2
line wrap: on
line diff
--- a/Framework/Volumes/VolumeReslicer.cpp	Tue May 21 15:20:04 2019 +0200
+++ b/Framework/Volumes/VolumeReslicer.cpp	Tue May 21 16:15:06 2019 +0200
@@ -745,12 +745,13 @@
 
   
   void VolumeReslicer::Apply(const ImageBuffer3D& source,
+                             const VolumeImageGeometry& geometry,
                              const CoordinateSystem3D& plane)
   {
     // Choose the default voxel size as the finest voxel dimension
     // of the source volumetric image
     const OrthancStone::Vector dim =
-      source.GetGeometry().GetVoxelDimensions(OrthancStone::VolumeProjection_Axial);
+      geometry.GetVoxelDimensions(OrthancStone::VolumeProjection_Axial);
     double voxelSize = dim[0];
     
     if (dim[1] < voxelSize)
@@ -768,11 +769,12 @@
       throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError);
     }
 
-    Apply(source, plane, voxelSize);
+    Apply(source, geometry, plane, voxelSize);
   }
 
   
   void VolumeReslicer::Apply(const ImageBuffer3D& source,
+                             const VolumeImageGeometry& geometry,
                              const CoordinateSystem3D& plane,
                              double voxelSize)
   {
@@ -783,7 +785,7 @@
     // to 6 vertices. We compute the extent of the intersection
     // polygon, with respect to the coordinate system of the reslicing
     // plane.
-    OrientedBoundingBox box(source);
+    OrientedBoundingBox box(geometry);
 
     if (!box.ComputeExtent(extent_, plane))
     {