Commit fb1409f5 authored by David Frank's avatar David Frank
Browse files

Apply refactor of circular trajectory to sphericl one, fix typo

parent 97e8c85a
Pipeline #699471 passed with stages
in 23 minutes and 53 seconds
......@@ -36,11 +36,11 @@ namespace elsa
const RealVector_t coeffsPerDim =
volumeDescriptor.getNumberOfCoefficientsPerDimension().template cast<real_t>();
const real_t sqrt2 = std::sqrt(2.f);
const auto coeffsPerDimSclaed = (coeffsPerDim * sqrt2).template cast<index_t>();
const auto coeffsPerDimScaled = (coeffsPerDim * sqrt2).template cast<index_t>();
const auto spacingPerDim = volumeDescriptor.getSpacingPerDimension();
coeffs.head(dim - 1) = coeffsPerDimSclaed.head(dim - 1);
coeffs.head(dim - 1) = coeffsPerDimScaled.head(dim - 1);
coeffs[dim - 1] = numberOfPoses; // TODO: with eigen 3.4: `coeffs(Eigen::last) = 1`
spacing.head(dim - 1) = spacingPerDim.head(dim - 1);
......
......@@ -39,13 +39,12 @@ namespace elsa
const auto spacingPerDim = volumeDescriptor.getSpacingPerDimension();
if (dim == 2) {
coeffs << coeffsPerDimScaled[0], numberOfPoses;
spacing << spacingPerDim[0], 1;
} else {
coeffs << coeffsPerDimScaled[0], coeffsPerDimScaled[1], numberOfPoses;
spacing << spacingPerDim[0], spacingPerDim[1], 1;
}
coeffs.head(dim - 1) = coeffsPerDimScaled.head(dim - 1);
coeffs[dim - 1] = numberOfPoses; // TODO: with eigen 3.4: `coeffs(Eigen::last) = 1`
spacing.head(dim - 1) = spacingPerDim.head(dim - 1);
spacing[dim - 1] = 1; // TODO: same as coeffs
// Return a pair, then split it using structured bindings
return std::pair{coeffs, spacing};
}();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment