Open llafitte007 opened 6 years ago
It is a bit hard to say from the code but I would say that should not be needed:
stackHelper2.slice.planePosition.x = pos;
Otherwise the Slice
from StackHelper2
should be translated as you want.
If you use 2 different geometries (from StackHelpers 1 and 2), the mix Layer may not work as expected (basically in the mix layer it may look like nothing was translated - could that be something you noticed?)
As you say, the stackHelper2.slice update lines is not necessary...
For the mix layer, it "see" a translation of stackHelper2 as you can see on previous scrennshot, but the translation is not on image but on its geometry.
Maybe another way to make this translation easilest, is to apply it on the data shader ? do you think this is achievable by this way adding parameter for shader (by this trick, I will not change stackhelper and layer or mix shaders)
I'll try to test in the viewers_compare
example asap to see if I can figure it out.
Sorry to come back to you, but after several other inconclusive tests I still can not :( ! Have you had time to take a look at my problem ?
Would anyone else have an idea ?
Hi, Based on the example of viewers-compare (https://github.com/FNNDSC/ami/tree/dev/examples/viewers_compare) I try to perform a translation 2d on one of two slice in the scene.
According to this issue https://github.com/FNNDSC/ami/issues/125 , I try to transpose the transalation for my case like :
`
` I use a stackHelper2 initialized like default stackHelper in code, and passed to buildGUI function to add a dx slider change the translation x value.
With this code, I have the following result when I changed the dx slider value :
The geometry of slice seems to be translate but not the inner texture, do you have any idea ?
I can share more code if necessary