<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Sep 7, 2016 at 1:06 PM, Alvaro Sanchez <span dir="ltr"><<a href="mailto:alvaro.sanchez@kitware.com" target="_blank">alvaro.sanchez@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Wed, Sep 7, 2016 at 12:58 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>a) I prefer mathematical abstractions over programatic abstractions.  If I have the equations, then I can combine them and simplify them and often achieve nice performance gains as a result.</div></div></blockquote><div><br></div></span><div>I totally agree David, I would even arrange transformation (2) into a matrix with a scaling diagonal (spacing) and a translation vector (origin) and  apply (2) similarly to how (1) is applied.</div></div></div></div></blockquote><div><br></div><div>Yup, and of course that's exactly how vtkImageReslice works: everything is condensed into a single 4x4 matrix (in fact, the inner loop only uses one column of that matrix).</div><div><br></div><div> - David</div></div></div></div>