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

Abierto Apto para principiantes
#1,978 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 6 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
65/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cpp

Línea de trabajo

Lee el cálculo del desplazamiento en AlignSectionsFeatureCentroid.cpp (líneas 17-25), que trunca hacia cero mediante static_cast<int64>. Luego edita AlignSectionsFeatureCentroidFilter.md, donde la línea 21 dice que los desplazamientos se redondean al múltiplo más cercano de Cell y la línea 38 dice que se redondean a incrementos enteros de vóxel. Terminado cuando ambas líneas digan que los desplazamientos se truncan hacia cero. No cambies la aritmética, ya que el issue deja esa decisión abierta.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C++
Estrellas
18
Forks
15
Merge medio
4 d 23 h
PR fusionados (30 d)
42

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de BlueQuartzSoftware/simplnx

Todos los issues de BlueQuartzSoftware/simplnx

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.