nirfast-admin / NIRFASTSlicer

Customized version of 3D Slicer for NIRFAST
Other
2 stars 5 forks source link

ctkRangeWidget Issue in Models with slicer 4.9 #10

Closed agirault closed 6 years ago

agirault commented 6 years ago

In Models > Scalars > Displayed Range

When the displayed range is small, the ctkRangeWidget often does not properly set it's min and max, and the following error appears:

ctkRangeWidget::setSingleStep( 1e-18 ) is outside valid bounds 
ctkRangeWidget::setSingleStep( 1e-18 ) is outside valid bounds

See attached volumetric mesh file: solmesh_recon_Mouse24_L680_hp_frame13.vtk.zip Check for muaf or etamuaf in Active Scalar field.

Expected:

screen shot 2018-03-22 at 5 57 23 pm

Instead:

screen shot 2018-03-22 at 5 56 53 pm

Or:

screen shot 2018-03-22 at 5 55 44 pm
agirault commented 6 years ago

Example:

displayRange = [2.2839e-07, 5.96652e-07]
precision = 5.96652e-07 / 100 - 2.2839e-07 / 100 = 3.68261e-09
decimals = -floor(log(precision)) = 20 // shouldn't that be 8?
precision = 10^(-decimals) = 1e-20     // too small
agirault commented 6 years ago

Addressed in https://github.com/Slicer/Slicer/pull/924