Closed CaptainKraft closed 9 years ago
Did it use to work?
Can you provide an example so we can have a look?
I'm not sure if it worked before. We only recently tried to accomplish this. Here is some test code to show what is going wrong:
If you use the gui to slide the indeces, everything works fine. Once you move the norm slider, the 2d renderer is frozen and the javascript console will spit out errors.
The new issue I'm having is that the 2d renderers now go blank as I change normal values on the other slices that are being rendered. If I go back and change the values of the slice that went blank, it will come back and the others will go blank.
I just realized that only the "later" slices will disappear when editing "earlier" slices.
For example, if I change the normal values of the X plane, the Y and Z planes will disappear. If I change the normal values of the Y plane, only the Z plane disappears. If I change the normal values of the Z plane, nothing disappears.
Lastly, some values for the index of the slice makes that slice disappear. This only happens after reslicing with new normal values.
I figured out all of these issues. The major problem I had in the end was not realizing some functions were available because they are not in the API.
I have three 2d renderers displaying the x, y, and z slices. I also have a 3d renderer on the same page. When I change normal values with any plane I call volume.sliceInfoChange which give me this in the javascript console on Chrome:
"Uncaught TypeError: Cannot read property 'Zf' of undefined"
This causes the 2d renderers to stop updating, but the 3d renderer updates the planes properly based on the new normal values.