DOC: Clarify Align Sections (List) row order and shift direction

未关闭 适合新手
#1,815 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 4 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
68/100
Issue 类型
文档
描述清晰度
描述清楚
活跃度
活跃
技术栈
cpp
领域
documentation

调研方向

需要修改的文本位于 src/Plugins/SimplnxCore/docs/AlignSectionsListFilter.md 的文件导入和 shift 格式部分。它应描述的行为见于 AlignSectionsList.cpp(行处理与累加)和 src/simplnx/Utilities/AlignSections.cpp(切片映射、源坐标查找、零填充)。完成的标准是:文档说明第 r 行映射到切片 Z-1-r,第 0 行是固定为 [0, 0] 的锚点条目,且存储的正 X 或 Y 偏移会使内容向坐标减小的方向移动,并附带带索引的示例。

由索引模型根据 Issue 内容生成。

描述

documentation

Summary

Clarify the row order, fixed slice, and shift direction in the Align Sections (List) documentation. The file-import instructions say that slices must be ordered "bottom to top", but do not define the corresponding Z indices. The relative/cumulative descriptions also leave the reference slice and sign convention implicit. These details are needed to prepare external shifts or interpret shifts saved by an alignment filter.

At simplnx commit fe6c4a15e5a5bffef2523f52cec01be33b1e62a9, the existing behavior is:

  • For Z slices, shift-array row r corresponds to local slice z = Z - 1 - r.
  • Slice z = Z - 1 stays fixed. Row zero is an unused anchor entry in both input modes; use [0, 0] for it.
  • Relative mode accumulates rows starting at row 1: C[0] = [0, 0] and C[r] = C[r-1] + R[r]. Cumulative mode reads C[r] directly for rows 1 through Z-1.
  • For cumulative shift (sx, sy) in row r, the transfer is out[z, y, x] = in[z, y + sy, x + sx], with zero fill where the source coordinate is outside the slice. Thus a positive stored X shift moves image content toward decreasing X; the same convention applies to Y.

The row handling and accumulation and slice mapping, source-coordinate lookup, and zero fill define this behavior. The documentation to clarify is AlignSectionsListFilter.md.

For a concrete example, a native Small IN100 run on a 128 x 128 x 8 crop produced the following rows. Z indices are local to the crop; shift pairs are (X, Y) in cells.

Row Target Z Saved MI Slice Indices Relative shift Cumulative shift
0 7, fixed [0, 0], placeholder [0, 0] [0, 0]
1 6 [6, 7] [0, 0] [0, 0]
2 5 [5, 6] [-1, 0] [-1, 0]
3 4 [4, 5] [0, -1] [-1, -1]
4 3 [3, 4] [-1, 0] [-2, -1]
5 2 [2, 3] [-1, 0] [-3, -1]
6 1 [1, 2] [-1, 0] [-4, -1]
7 0 [0, 1] [-1, 0] [-5, -1]

The row-zero Slice Indices value is a placeholder, not an instruction to shift slice zero. Slice Indices is explanatory output from Mutual Information; Align Sections (List) consumes the selected two-component shifts array.

On Windows, the 17-step native pipeline passed preflight and execution, and 76 independent checks passed. Replaying both shift formats matched the native Mutual Information output exactly for Quats, Phases, Mask, FeatureIds, and IPFColors. The checks confirmed the fixed highest-Z slice, coordinate transfer, and zero-filled borders. They establish the transfer convention, not the physical accuracy or optimality of the estimated alignment.

Please document these existing conventions in the shift-format and file-import instructions, including an indexed example that makes the fixed row and shift sign explicit.

主要语言
C++
星标
18
派生
15
平均合并
4 天 6 小时
30 天内合并 PR
24

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

BlueQuartzSoftware/simplnx 的其他 Issue

查看 BlueQuartzSoftware/simplnx 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。