<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I need oblique slices <br><br>Rick Frank</div><div><br>On Aug 28, 2016, at 3:42 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Then remind me again why you're using vtkImageResliceMapper instead of vtkImageSliceMapper?</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 28, 2016 at 1:23 PM, Richard Frank <span dir="ltr"><<a href="mailto:rickfrank@me.com" target="_blank">rickfrank@me.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="auto"><div>I'm just trying to rotate the plane in 3 space, not reslicing...</div><div><br>Rick Frank</div><div><div class="h5"><div><br>On Aug 28, 2016, at 3:16 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><div>If you only had one input slice, then why would you be surprised that reslicing at 90 degrees gives an output that is only one pixel wide?</div><div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 28, 2016 at 12:53 PM, Richard Frank <span dir="ltr"><<a href="mailto:rickfrank@me.com" target="_blank">rickfrank@me.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="auto"><div>Hi</div><div><br></div><div>I'm using the VTK example which creates an in memory single cyan slice.....</div><div><br></div><div>Thanks<br><br>Rick Frank</div><div><div><div><br>On Aug 28, 2016, at 2:42 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Check the extent of the input image to make sure all of the slices were loaded.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 28, 2016 at 12:37 PM, Richard Frank <span dir="ltr"><<a href="mailto:rickfrank@me.com" target="_blank">rickfrank@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Hi David,<br></div><div><br></div><div>Sorry about the attachment.<br></div><div><br></div><div>Well, I'm pretty far along with my work on this, so I'd like to try the vtkPlane orientation as a solution if possible.<br></div><div><br></div><div>using the example code, If I create a vtkPlane, set its origin to 0,0,0 and set its normal to 1 0 0 (instead of 0,0,1) and call <br></div><div> imageResliceMapper->SetSliceP<wbr>lane(plane);</div><div><br></div><div>I see a thin line. Seems correct. If I change the interactor style to Trackball camera, and rotate the camera around it seems the image is only 1 unit wide however.<br></div><div><br></div><div>Is there something else I need to do to get the image to map to a plane with different orientation?</div><div><br></div><div>THanks</div><div>Rick Frank<div><div><br>On Aug 28, 2016, at 12:51 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br><br><div><blockquote type="cite"><div><div dir="ltr">Hi Frank,<div><br></div><div>It looks like you are doing a data transformation when you should be doing a view transformation. Don't rotate the actor if your goal is to rotate the view. When you rotate the actor, you are changing the relationship between data coordinates and world coordinates. </div><div><div class="gmail_extra"><br></div><div class="gmail_extra">If you want a sagittal view, then you can rotate the view by moving the VTK camera. The mapper has a method SliceFacesCameraOn() that can be used to make the mapper automatically extract a slice in the correct orientation.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Also, please limit the width of inlined images to around 1000 pixels or less. Large inlined images make your email hard to read on my system (I wish that gmail would auto-shrink oversized inlined images, but unfortunately it displays them full-size, even if they're several times the size of the display).</div><div class="gmail_extra"><br></div><div class="gmail_extra"> - David</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 28, 2016 at 9:56 AM, Richard Frank <span dir="ltr"><<a href="mailto:rickfrank@me.com" target="_blank">rickfrank@me.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid #cccccc;padding-left:1ex"><div><div>Hi David,<br></div><div><br></div><div>Thanks for the reply. I'm still a bit confused about what I've tried and why it doesn't work....<br></div><div><br></div><div>So, I have 3 slice views and in the screenshot the Axial View is lined up appropriately (image position patient is in the correct place, and each slice is in correct place etc) with the world coordinates by using the image reslice axis and camera etc to align the DICOM coordinates and the VTK World coordinates.<br></div><div><br></div><div>I now want to orient the sagittal slice so that it aligns with the world coordinates.<br></div><div><br></div><div>(see screen shots)<br></div><div><br></div><div><br></div><div>I believe I need to rotate the slice (if I could rotate the actor) about Z 90 CCW and then about its new X 0- degrees and then move the camera about world Y 90 and the roll the camera 90 to get the sagittal voxels DICOM aligned with the World Coordinates. <br></div><div><br></div><div>I tried various parameters for the resliceMapper->SetSlicePlane() but the slice just dissapears off screen somewhere so I must be getting sometime wrong.<br></div><div><br></div><div>How would I use the SetSlicePlane to achieve this?</div><div><br></div><div>Thanks</div><div><br></div><div>Rick</div><div><span><br>On Aug 27, 2016, at 02:51 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>> wrote:<br><br></span><div><blockquote type="cite"><div><span><div dir="ltr">You should also try vtkImageSliceMapper instead of vtkImageResliceMapper,<div>perhaps its behavior will better suit your requirements.<br><div><br></div></div></div></span><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sat, Aug 27, 2016 at 11:51 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid #cccccc;padding-left:1ex"><span><div dir="ltr">Hi Rick,<div><br></div><div>You're seeing this because you are doing an out-of-plane rotation on an image that has only one slice. The rotation is around the image origin, which (in this case) is at the bottom-left corner of the image.</div><div><br></div><div>The vtkImageResliceMapper has a SetSlicePlane() method:</div><div><a href="http://www.vtk.org/Wiki/VTK/Image_Rendering_Classes#vtkImageResliceMapper" target="_blank">http://www.vtk.org/Wiki/VTK/Im<wbr>age_Rendering_Classes#vtkImage<wbr>ResliceMapper</a><br></div><div>You must rotate this SlicePlane when you rotate the vtkImageSlice.</div><span><span style="color:#888888"><div><br></div><div> - David</div><div><br></div><div><br></div></span></span></div></span><div><div><div class="gmail_extra"><br><div class="gmail_quote"><span>On Sat, Aug 27, 2016 at 10:54 AM, Richard Frank <span dir="ltr"><<a href="mailto:rickfrank@me.com" target="_blank">rickfrank@me.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid #cccccc;padding-left:1ex"><div><span><div>Hi,<br></div><div><br></div><div>If I build the example <br></div><div><br></div></span><div><span><h1 lang="en"><span style="font-size:12px" dir="auto">VTK/Examples/Cxx/Images/ImageS<wbr>lice</span></h1><div><span dir="auto">and add<br></span></div><div><span dir="auto"><br></span></div><div><span dir="auto"> imageSlice->RotateX(1);</span></div><div><span dir="auto"><br></span></div><div><span dir="auto">Which should, I think, rotate the image actor about its X axis by 1 degree, I instead get<br></span></div><div><span dir="auto"><br></span></div><div><br></div><div><br></div></span><span><div>which seems incorrect.<br></div><div><br></div><div>I can rotate about Z.<br></div><div><br></div><div>Is there something I'm not doing correctly, or is this a bug?<br></div><div><br></div><div>I also tried RotateWXYZ(1,1,0,0) and get the same result.<br></div><div><br></div><div>This is VTK 7<br></div><div><br></div><div>Thanks<br></div><div><br></div><div>Rick<br></div><div><br></div><div><br></div></span></div></div></blockquote></div><br></div></div></div></blockquote></div><br></div></div></blockquote></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div></div></div></div></div></blockquote></div><br></div>
</div></blockquote></div></div></div></blockquote></div><br></div>
</div></blockquote></div></div></div></blockquote></div><br></div>
</div></blockquote></body></html>