Skip to content
Snippets Groups Projects
Commit 5e878068 authored by Andras Lasso's avatar Andras Lasso Committed by Dženan Zukić
Browse files

BUG: Fix bounds computation in vtkMultiVolume

This line set the homogeneous IJK coordinates incorrectly:

    pointsDataCoords.emplace_back(bounds[1], bounds[3], bounds[5], 0.);

The problem is that the last component is set to 0 instead of 1
(the coordinates specify a direction vector and not a position).
When this vector is multiplied by the homogeneous transformation matrix,
the position is incorrect, because the translation component of the matrix
is not taken into account.

fixes https://github.com/Slicer/Slicer/issues/8301
fixes vtk/vtk#19447
parent 6b6b89ee
No related branches found
No related tags found
No related merge requests found
......@@ -214,7 +214,7 @@ std::array<double, 6> vtkMultiVolume::ComputeAABounds(double bounds[6], vtkMatri
pointsDataCoords.emplace_back(minPoint + Point(0., dim[1], 0., 0.));
pointsDataCoords.emplace_back(minPoint + Point(0., 0., dim[2], 0.));
pointsDataCoords.emplace_back(minPoint + Point(dim[0], 0., dim[2], 0.));
pointsDataCoords.emplace_back(bounds[1], bounds[3], bounds[5], 0.);
pointsDataCoords.emplace_back(minPoint + Point(dim[0], dim[1], dim[2], 0.));
pointsDataCoords.emplace_back(minPoint + Point(0., dim[1], dim[2], 0.));
// Transform all points from data to world coordinates
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment