Page MenuHomePhabricator

Reslicing of objects with different geometries is buggy
Closed, ResolvedPublic

Description

Load Pic3D and other object with a different geometry (see attachments for examples).

The 3D renderwindow contains at least one wrong slice.

Tobi could you double-check if this is related to your reslicing filter? It could also be related to my work in the Geometry2DDataVtkMapper3D, but I think this bug is new.

Event Timeline

kilgus added a subscriber: kilgus.

Load this surface to reproduce the bug.

Have you checked if it is an updating issue? Is the texture still visible after e.g. scrolling a slice away?

As far as I remember, the texture does not change until the true image geometry is reached and new (correct) content is set. So at the outside of an image, the reslicing seems to be incorrect.

It is in fact incorrect, but only for the 3d render window. The effect is not visible in 2d planes. It seems that the updated textures from the 2d planes are set at 3d.
The effect also shows up with two objects of same datatype (e.g. two images).

From T13482

Following codelines in ImageVtkMapper2D skip alot of useless computations, in case of there is no intersection of the image with the world geometry. However this also breaks 3D Rendering of the Geometry2DDataVtkMapper3D, because he has no valid resliced image from the 2D mapper. The must be an equivalent in the 3D mapper of the planes.

// early out if there is no intersection of the current rendering geometry
// and the geometry of the image that is to be rendered.
if ( !RenderingGeometryIntersectsImage( worldGeometry, input->GetSlicedGeometry() ) )
{
  localStorage->m_Mapper->SetInput( localStorage->m_EmptyPolyData );
  return;
}

Commenting this lines fixes this problem.

New remote branch pushed: bug-13275-different-geometryreslice

I wrote a core change request and tried a couple of other solutions which did not work.

Solution sounds good to me. However, you should please check this with Markus F. I'm not sure enough about side effects

Thomas and Eric: Did you talk with Markus? I think this bug is rather important for the upcoming release.

Granting release flag after talking to Thomas.

[6d265a]: Merge branch 'bug-13275-different-geometryreslice'

Merged commits:

2012-11-30 16:35:04 Thomas Kilgus [6f4750]
Added more documentation why we set this member to null.


2012-11-14 14:38:27 Eric Heim [83dd92]
set reslicesd image member to null in early out