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

Aperta Adatta ai principianti
#1,978 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 6 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
65/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
cpp
Ambito
documentation

Direzione di ricerca

Leggi il calcolo dello spostamento in AlignSectionsFeatureCentroid.cpp (righe 17-25), che tronca verso zero tramite static_cast<int64>. Poi modifica AlignSectionsFeatureCentroidFilter.md: la riga 21 dice che gli spostamenti sono arrotondati al multiplo di Cell più vicino e la riga 38 dice che sono arrotondati a incrementi interi di voxel. Il lavoro è completo quando entrambe le righe dicono che gli spostamenti sono troncati verso zero. Non modificare l'aritmetica, poiché la issue lascia aperta questa decisione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C++
Stelle
18
Fork
15
Merge medio
4g 23h
PR unite (30g)
42

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di BlueQuartzSoftware/simplnx

Tutte le issue di BlueQuartzSoftware/simplnx

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.