InsightSoftwareConsortium / InsightSoftwareConsortium/ITK
`ContourSpatialObject<TDimension>::Update()` LINEAR_INTERPOLATION case may need some adjustment
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 748
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 64
Description
There is a line of code in `ContourSpatialObject::Update()` that looks suspicious to me:
newPoint = pnt[d] + i * step[d];
https://github.com/InsightSoftwareConsortium/ITK/blob/a2b39155dae42fb88d52c0d7d7d7e1f1a8c3e954/Modules/Core/SpatialObjects/include/itkContourSpatialObject.hxx#L217-L225
You see, `newPoint` is a `PointType`, and it gets filled by a scalar value, `pnt[d] + i * step[d]`, over and over again, inside the inner for loop.
I think the intention was to do:
newPoint[d] = pnt[d] + i * step[d];
But I'm not sure, because I did not study the code well enough yet! Any feedback or possible explanation is welcome!
_Note: This bug report is still in progress! More details soon, hopefully!_
Contributor guide
Assessment
This issue has not been assessed yet.