Uh oh!
There was an error while loading. Please reload this page.
Conversation
xhluca
left a comment
There was a problem hiding this comment.
Just some thoughts; overall looks good but yeah let's wait for the async PR to be merged!
| return None | ||
| # Extract mesh | ||
| points = b64_encode_numpy(vtk_to_numpy(polydata.GetPoints().GetData())) |
There was a problem hiding this comment.
It will be either float32 or float64.
| # We have a numpy array that is compatible with JavaScript typed | ||
| # arrays | ||
| buffer = base64.b64encode(memoryview(obj.ravel(order="C"))).decode("utf-8") | ||
| return {"bvals": buffer, "dtype": str(dtype), "shape": obj.shape} |
There was a problem hiding this comment.
My understanding is that the original code was meant for 1D numpy array. I don't think that creates any problem for obj.shape (since a python tuple should be easy to convert to JS), but i'm curious whether there will be needs to do any modification on the JS side for that to work...
There was a problem hiding this comment.
On the vtk side we expect 1D, we don't care about the shape... Just kept it for @nicolaskruchten . ;-)
xhluca
commented
Apr 15, 2021
@jourdain The PR is merged; I think what you added looks good on the python side, do you have anything else in mind on the JS side? |
jourdain
commented
Apr 15, 2021
If we use react-vtk-js@1.5.0 we are good... |
jourdain
commented
Apr 15, 2021
@xhlulu I let you merge it and eventually create a version 1.0.0 is everything is working as expected. Normally the F1 demo should be faster with that one. |
xhluca
commented
Apr 16, 2021
@jourdain Do you get this error locally? |
jourdain
commented
Apr 16, 2021
I guess I'll have to try that specific example... |
xhluca
commented
Apr 16, 2021
jourdain
commented
Apr 16, 2021
It looks like the cell connectivity get messed up. Along with some point coordinates not being correct... |
jourdain
commented
Apr 16, 2021
@xhlulu that should be good now... Good catch! |
xhluca
commented
Apr 16, 2021
@jourdain awesome. Updating the change log and will create a release afterwards. |


Need to rebase from the async but fix css typo in demos and add support for encoded binary arrays.
closes#42