Page MenuHomePhabricator

3D view not properly initialized when loading data with small coordinates
Closed, InvalidPublic

Description

Loading a vtkUnstructuredGrid object with points having small coordinates ( < 0.01 ) results in a wrongly initialized 3D view (see attached file). Rescaling the points (with a factor of 10000, for example) and loading the rescaled .vtk file results in a correctly initialized 3D view.

Event Timeline

what is the status? is it possible to fix this for 0.12?

Sascha, can you look into it?
The bugmanagers request you to fix this for 0.12

I got virtually no time for fixing this. Someone with more rendering experience would probably be much faster. I don't think that the problem is only related to vtkUnstructuredGrid data, but probably to any vtkPointSet.

If you and Mathias could sketch a solution here, we could assign this bug to someone else. Otherwise, the Qt3 MainApp will just not be able to handle small coordinate datasets.

Actually, I have no clue about what is going wrong. If I'd had to guess, I would say the coordinates get "rounded" to zero.

This is a bug report from a user on the MITK mailing list.

Found that this (or a related) bug also occurs for image data with very small dimensions (e.g. spacing of 0.00001)

The intersection lines in 2D views are not displayed any longer. One reason for this seems to be that the vector arithmetic involved here produces vectors with a length below a certain epsilon, and therefore nothing is painted at all.

When commenting out the lines

if ( direction.squared_magnitude() < eps )
  return false;

in PlaneGeometry::IntersectionLine(), at least the 2D display problem seems to be solved...

Possibly a similar problem exists for the 3D view.

(In reply to comment #6)

The problem described in the previous comment seems not to be related to this bug. --> Creating new T2021

For the 3D initialization problem for small surface datasets, one problem may be that the spacing (relevant for 2D views) is initialized to 1/1/1 by default. If the extent of the surface is smaller than 1/1/1, nothing is displayed in the 2D views.

This is still assigned to me. Any volunteers?

This seems not directly related to the vtkUnstructuredGridMapper, since it also affects i.e. a surfaceMapper when loading an object with too small dimensions.
The problem can be traced back to a conceptional MITK problem. MITK does not scale down to very small dimensions.

It seems that MITK imposes a minimum size in its world coordinate system.
Furthermore the planes are not useable, as they seem to have fixed step size, and this needs to be relative adapted to the world size.

kislinsk changed the task status from Invalid to Spite.Jun 27 2018, 1:33 PM
kislinsk added a project: Bulk Edit.
kislinsk changed the task status from Spite to Invalid.Jun 27 2018, 1:37 PM
kislinsk removed a project: Bulk Edit.