Tomo slice viewer#109
Conversation
…as into tomo-slice-viewer
|
I am having some trouble running a local version of visr at the moment, so i will have to see how it actually looks on Monday, but in the meantime i had a look through the code. The main problem with how its implemented is that we are creating so many new objects every time the slider is used, which is something that will be very costly. With our Volume it would likely not seem to make any difference, but it could do with larger arrays, and it will be much tidier to avoid this in general. This is creating new arrays for every row, every time the slider hits a new value and also the arrays are dynamically sized (they grow every iteration) which is a similar cost I think its very helpful to understand the maths underneath so probably better to have done it manually first - but i had a look and actually the problem is solved much more simply than we thought. We don't have to worry about manually striding the data, we can use ndarray to create a volume (i think we should add this to tomography view - I will take another look at the 3D viewer to see if we can simplify that by just passing the volume as well), and then use ndarrays internal logic to do the exact same thing your code is doing but without creating any new objects and then select a slice with something like or even: |
No description provided.