ALive-research / Slicer-Liver

3D Slicer extension for liver analysis and therapy planning
Other
15 stars 9 forks source link

Resectogram grid visualization issues with thickness #190

Open RafaelPalomar opened 1 year ago

RafaelPalomar commented 1 year ago

When the thickness value of the grid for the resectogram is low, some of the grid lines are not drawn. Maybe setting a minimum value for the grid thickness would solve the problems.

RuoyanMeng commented 1 year ago

I tested this, it seems different grid divisions need different thickness values to work perfectly when rendering. So we need an equation calculating the corresponding thickness every time grid divisions change. For example: grid divisions = 20, thickness=3.2, missing lines Screenshot from 2023-01-19 13-13-07

grid divisions = 20, thickness=4.5, work perfectly Screenshot from 2023-01-19 13-12-59

grid divisions = 20, thickness=6.1, some lines are bold Screenshot from 2023-01-19 13-13-16

RafaelPalomar commented 1 year ago

I suspect applying anti-aliasing will help on this.

Anti-aliasing is in 3D Slicer settings, but in practice I think it is not applied; it is possible to enable that by code though, but it may have side effects: https://discourse.slicer.org/t/antialiasing-in-in-slice-mpr-views/21140

RuoyanMeng commented 1 year ago

I suspect applying anti-aliasing will help on this.

Anti-aliasing is in 3D Slicer settings, but in practice I think it is not applied; it is possible to enable that by code though, but it may have side effects: https://discourse.slicer.org/t/antialiasing-in-in-slice-mpr-views/21140

I tried this, before and after FXAA was enabled, and there is no obvious improvement. For now, I would suggest we limit the grid division value to 0 - 30, and set a minimum thickness value of 4.6, to make sure when the grid division value is between 0 - 30 everything works as expected.