From c8f5f0cfce272503018641372d4b6537e0968c5a Mon Sep 17 00:00:00 2001 From: Michael Jackson Date: Tue, 27 Feb 2024 09:27:19 -0500 Subject: [PATCH] BUG: Fix issue where spacing would be set to 1,1,1 (#870) Signed-off-by: Michael Jackson --- .../Filters/SetImageGeomOriginScalingFilter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SetImageGeomOriginScalingFilter.cpp b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SetImageGeomOriginScalingFilter.cpp index cc8b9eb3d0..2b16ae6e3e 100644 --- a/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SetImageGeomOriginScalingFilter.cpp +++ b/src/Plugins/SimplnxCore/src/SimplnxCore/Filters/SetImageGeomOriginScalingFilter.cpp @@ -82,7 +82,7 @@ IFilter::PreflightResult SetImageGeomOriginScalingFilter::preflightImpl(const Da auto imageGeomPath = filterArgs.value(k_ImageGeomPath_Key); auto shouldChangeOrigin = filterArgs.value(k_ChangeOrigin_Key); auto shouldCenterOrigin = filterArgs.value(k_CenterOrigin_Key); - auto shouldChangeResolution = filterArgs.value(k_ChangeSpacing_Key); + auto shouldChangeSpacing = filterArgs.value(k_ChangeSpacing_Key); auto origin = filterArgs.value>(k_Origin_Key); auto spacing = filterArgs.value>(k_Spacing_Key); @@ -102,12 +102,12 @@ IFilter::PreflightResult SetImageGeomOriginScalingFilter::preflightImpl(const Da optOrigin = originVec; centerOrigin = shouldCenterOrigin; } - if(shouldChangeResolution) + if(shouldChangeSpacing) { - spacingVec = spacingVec; + optSpacing = spacingVec; } - auto action = std::make_unique(optOrigin, spacingVec, imageGeomPath, centerOrigin); + auto action = std::make_unique(optOrigin, optSpacing, imageGeomPath, centerOrigin); resultOutputActions.value().appendAction(std::move(action));