Open MuriloSchaefer opened 6 years ago
The stack position depends of the "real world" position, including the offset of your data. To move the data, use the registration matrix (stack.regMatrix) and don't forget to update IJK2LPS matrix and send the new one to the shader (with the uniform). Some details here : https://github.com/FNNDSC/ami/issues/125
it worked! Thanks :)
I'm putting the code here, just to let it documented, in case of other people have the same issue.
//move the stack to the origin of the scene
let centerLPS = stack.worldCenter();
stack.regMatrix = new THREE.Matrix4().makeTranslation(-centerLPS.x, -centerLPS.y,-centerLPS.z);
stack.computeIJK2LPS();
Description
Hi, I have three scenes with ortho cameras, and the stack isn't in the origin of the scene like can be seen in the figure below
Is there some way to move the stack to the origin? I try to move the stackHelper using:
but only the plane changed, so it breaks the textures:
PS: