<br><div class="gmail_quote">On Thu, Jul 30, 2009 at 3:23 PM, pat marion <span dir="ltr">&lt;<a href="mailto:pat.marion@kitware.com">pat.marion@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Why this sounds like a great opportunity for the new python macro<br>
feature :-)  You could two scripts, StepForward.py and<br>
StepBackward.py, and add them to the macros toolbar.  Now you&#39;ll have<br>
two buttons for stepping forward and backward.  I don&#39;t have time<br>
right now to figure out the complete script but it would be something<br>
like...<br>
<br>
e = GetActiveSource()<br>
# maybe make sure e.GetVTKClassName() == &quot;vtkExtractGeometry&quot;<br>
e.IntersectWith = &quot;Plane&quot;<br>
planeOrigin = e.IntersectWith.Origin<br>
imageInput = e.Input[0]<br>
e.IntersectWith.Origin = computeNewOrigin(planeOrigin, imageInput)<br>
<br>
Then all you need to do is write the computeNewOrigin method that<br>
takes the image, gets the origin, extens, and spacing, and then<br>
computes a new plane origin to step the plane one discreet step<br>
forward or backward.<br>
<font color="#888888"><br>
Pat<br>
</font><div><div></div><div class="h5"></div></div></blockquote><div><br>These macros are very cool! That code was right on, it works perfectly if I set the new origin to a constant.<br>
e.IntersectWith.Origin = [x,y,z]<br><br>Now for writing computeNewOrigin(), I looked at dir(imageInput) but I didn&#39;t see properties like &quot;spacing&quot; or &quot;cellSize&quot; - where should I look to find out how to get those properties from an image in python?<br>
<br clear="all">Thanks,<br><br>David <br></div></div>