Closed FedericoNegri closed 1 year ago
Thanks for your detailed report.
Can you please contribute a PullRequest to fix the error ?
@finetjul there you go https://github.com/Kitware/vtk-js/pull/2921
:tada: This issue has been resolved in version 28.11.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Bug description
Trying to visualize this VTP file containing a data array on a mesh: array_with_nans.zip
The array "contact pressure;32" contains a lot of NaN values (as expected) and can be visualized correctly in Paraview (note the range [0, 1.6E+9])
With vtkjs, when I query the range with
data.getRange()
I get [NaN, NaN].Steps to reproduce
You could for instance open the file attached above in Glance and notice these errors
Detailed Behavior
I noticed this doesn't happen for arrays with NaN values in general. I think it only happens for those with NaN as first value (like in my case), maybe because of the min/max initialization in
fastComputeRange
? https://github.com/Kitware/vtk-js/blob/9af4da13a961ce671a40343ec77376e61a55d67c/Sources/Common/Core/DataArray/index.js#L24Expected Behavior
The returned range should be [0, 1626058368].
Environment