<div dir="ltr"><div>Hello everyone, new to VTK, etc etc.<br><br></div>I wish to extract a  2D slice from a 3D volume, and then translate this slicing in the volume, following the axis of the slice<br><div><div><br>So say I declare my slice this way (code is in Python) :<br><br>-------------------------------------------<br>oblique = vtk.vtkMatrix4x4()<br></div><div>#Some oblique matrix, vectors are in fact normalised but here I just put random numbers for this example<br></div><div>oblique.DeepCopy((0.3, 0   , 0   , 10,<br>                  0  , 0.28, 0   , 10,<br>                  0.8, 0   , 0.97, 10,<br></div><div>                  0  , 0   , 0   , 1)) <br></div><div><br>slice=vtk.vtkImageReslice() #create the slice object<br>slice.SetOutputExtent(0, 5, 0, 5, 0, 0)<br>slice.SetOutputOrigin(-0.5 * 5, -0.5 * 5, 0)<br><br>slice.SetResliceAxes(oblique) #set the resliceAxes matrix to it<br>-----------------------------------------------<br><br></div><div>So far so good, I get a slice oriented along the oblique matrix. It gets trickier when I want to translate it.<br></div><div>Bear in mind that I would like a translation *along the axis of the oblique matrix* and not in world coordinates.<br></div><div>I.E. i would like to translate along vectors (0.3,0,0.8), (0,0.28,0) and (0,0,0.97) (vectors of the oblique matrix)<br><br></div><div>So if I do this :<br></div><div><br>-------------------------------------------<br>transformation = vtk.vtkTransform();<br>slice.SetResliceTransform(transformation)<br>transformation.Translate(1,0,0)<br>slice.Update()<br>-------------------------------------------<br><br></div><div>I would expect reading documentation on setResliceTransform that my slice would move along one of these axis (the Z axis here).<br></div><div>Because my understanding of setResliceTransform and setResliceAxes being used together is that the latter is used to set up a grid upon which the former will then act (so translating will "slide" along the axes of setResliceAxes)<br></div><div>However, I do not observe this behaviour (I don't really how the slice is moving, but certainly not in the axes of oblique), did I get something wrong ?<br><br></div><div>Many thanks,<br></div><div>Clément<br></div></div></div>