neurocoglab / mgui-core

Core implementation of ModelGUI API
GNU General Public License v3.0
0 stars 0 forks source link

2D volume rendering #1

Open typically opened 4 years ago

typically commented 4 years ago

When colour mapping is updated on a Volume3DInt, 2D rendering updates accordingly. After a pause (~20 s ??), the rendering changes in 2D but not 3D. Transparency appears to be lost. Need to understand:

Attached screenshots:

OS: Mac, running Catalina 10.15.6 JDK: 1.8.0_161 (Oasis)

vol_render_issue_2d_after vol_render_issue_2d_before vol_render_issue_3d_after

typically commented 4 years ago

Persists with regeneration and section changes. Requires full reapplication of colour map, which then reverts again after 20 s.

typically commented 4 years ago

This is due to a delay on line 2800 of InterfaceVolumePanel.java for a large (0.5mm^3 resolution) volume:

'currentVolume.updateTexture();'

...which updates the texture and repaints the 2D window. The subsequent line (executed after the delay) fires a shapeModified event, resulting in the colour map issue:

currentVolume.fireShapeModified();

Fix:

Bug no longer appears. Both 2D and 3D images update properly.

typically commented 4 years ago

Bug reoccurs when new objects are loaded. May be an issue with the WindowedColourModel (cloning?).