<html><body><div>Hi</div><div><br data-mce-bogus="1"></div><div>I'm trying to modify the vtkExample to use vtkImageReslice about a point not at the center of the volume.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>A link to my code is below, which is the Cxx folder from the Imaging Examples, with modifications to the ImageSlicing sub project.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><a href="https://1drv.ms/f/s!AvWAuQy-GUrmgyOyOKmDWSHhZUPk">https://1drv.ms/f/s!AvWAuQy-GUrmgyOyOKmDWSHhZUPk</a></div><div><br data-mce-bogus="1"></div><div>Also, here is a link to my input data, a small mha file which is easy to see:<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><a href="https://1drv.ms/u/s!AvWAuQy-GUrmg0YOY0ql2vr1StOU">https://1drv.ms/u/s!AvWAuQy-GUrmg0YOY0ql2vr1StOU</a></div><div><br data-mce-bogus="1"></div><div>if you load the file, you will see an axial view. The volume has an origin of (0,0,0). I compute the center of the volume, and then position the actor on that center point (actors are positioned by the center point).</div><div><br data-mce-bogus="1"></div><div>This is analogous to what our application under development does - we position the slice actor in world coordinates using the DICOM Image Position Patient at the top left (depending on orientation) + center offset of the volume.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div> In my example code, when you load up for the first time and left click, and "rotate" with the mouse, I draw an angle widget for your convenience whose joint is on the center of rotation. I compute the matrix for the rotation, and set that in the reslice matrix, followed by  the origin. This works perfectly, and the slice rotates about its center.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>If you right click, you will change the ctr of rotation in world coordinates. </div><div>ImageReslice->SetResliceAxesOrigin(rotationCenter[0], rotationCenter[1], rotationCenter[2]);</div><div><br data-mce-bogus="1"></div><div>When you then rotate with left mouse, the angle widget joint is in the correct place in the view but  the the image rotates about a point which I can't quite determine.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>The new center of rotation that the reslice uses seem to be proportionally related to how far away from the center of the image that is right clicked on - the closer to the center of the slice clicked, the less the center of rotation moves away from the click.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>It seems like there's something I'm missing about how the center of rotation works. <br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Any help appreciated.<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Thanks<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div>Rick<br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div></body></html>