DOC: Align Sections (Feature Centroid) says shifts are rounded, but they are truncated

オープン 初心者向け
#1,978 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 6 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
65/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp
領域
documentation

調査の方向性

AlignSectionsFeatureCentroid.cpp の17〜25行目にあるシフト計算を読んでください。この計算は static_cast<int64> によってゼロ方向に切り捨てを行っています。次に AlignSectionsFeatureCentroidFilter.md を編集してください。21行目にはシフトが最も近い Cell の倍数に丸められると書かれており、38行目には整数のボクセル単位に丸められると書かれています。両方の行で、シフトがゼロ方向に切り捨てられると記述されていれば完了です。issueはこの判断を未決のままにしているため、演算処理は変更しないでください。

索引モデルが issue の本文から書いたものです。

説明

documentation

Summary

The documentation of Align Sections (Feature Centroid) says that the section shifts are rounded to the nearest cell. The code truncates them toward zero. The page should describe what the code does.

How it works now. AlignSectionsFeatureCentroid.cpp lines 17-25 converts a centroid difference to a whole-cell shift with static_cast<int64>((centroid - referenceCentroid) / spacing). This truncates toward zero: a difference of +1.75 cells gives a shift of +1, and -1.75 cells gives -1. Both the in-core (Direct) and the out-of-core (Scanline) paths use this function.

What the documentation says. AlignSectionsFeatureCentroidFilter.md line 21 says "Round the shifts to the nearest multiple of the Cell resolution", and line 38 says "Shifts are rounded to integer voxel increments". A user who reads this expects +1.75 cells to give +2.

Why it matters. The documented and actual shifts differ by one cell whenever the fractional part of a centroid difference is 0.5 or more. A user who checks the output against the documentation sees a wrong result.

Where it applies. Only the documentation page. The request is to state that shifts are truncated toward zero. Whether the arithmetic should instead change to rounding (which would change results compared with DREAM3D 6.5.171 and the existing exemplars) is still open.

Found during the review of the #1908 batch 4 changes (items L77 and L78). No open issue covered it.

主要言語
C++
スター
18
フォーク
15
平均マージ
4日 23時間
マージ済み PR(30日)
42

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

BlueQuartzSoftware/simplnx のほかの issue

BlueQuartzSoftware/simplnx の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。