Skip to content

Commit

Permalink
BUG: Fix issue where spacing would be set to 1,1,1 (#870)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <[email protected]>
  • Loading branch information
imikejackson authored Feb 27, 2024
1 parent b6a5019 commit c8f5f0c
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ IFilter::PreflightResult SetImageGeomOriginScalingFilter::preflightImpl(const Da
auto imageGeomPath = filterArgs.value<DataPath>(k_ImageGeomPath_Key);
auto shouldChangeOrigin = filterArgs.value<bool>(k_ChangeOrigin_Key);
auto shouldCenterOrigin = filterArgs.value<bool>(k_CenterOrigin_Key);
auto shouldChangeResolution = filterArgs.value<bool>(k_ChangeSpacing_Key);
auto shouldChangeSpacing = filterArgs.value<bool>(k_ChangeSpacing_Key);
auto origin = filterArgs.value<std::vector<float64>>(k_Origin_Key);
auto spacing = filterArgs.value<std::vector<float64>>(k_Spacing_Key);

Expand All @@ -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<UpdateImageGeomAction>(optOrigin, spacingVec, imageGeomPath, centerOrigin);
auto action = std::make_unique<UpdateImageGeomAction>(optOrigin, optSpacing, imageGeomPath, centerOrigin);

resultOutputActions.value().appendAction(std::move(action));

Expand Down

0 comments on commit c8f5f0c

Please sign in to comment.