<div dir="ltr">Thanks!<br><br>Now my images appeasr like the one shown in figure.<br><br>I need to rotate the image and dose about the ImagePositionPatient upside-down.<br><br>I tried vtkImageFlip - it invalidates the dicom coordinate system and the dose and image doesn't match.<br>
<br>I tried this<br><br><span style=" color:#c0c0c0;"> </span><font size="4"><span style="color: rgb(0, 0, 0);"></span>
</font><pre style="margin: 0px; text-indent: 0px;"><font size="4"><span style="color: rgb(192, 192, 192);"> </span>vtkMatrix4x4<span style="color: rgb(192, 192, 192);"> </span><span style="color: rgb(0, 0, 0);">*</span>invert<span style="color: rgb(192, 192, 192);"> </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(192, 192, 192);"> </span>vtkMatrix4x4<span style="color: rgb(0, 0, 0);">::</span>New<span style="color: rgb(0, 0, 0);">();</span></font></pre>
<font size="4">
</font><pre style="margin: 0px; text-indent: 0px;"><font size="4"><span style="color: rgb(192, 192, 192);"> </span>invert<span style="color: rgb(0, 0, 0);">-></span>DeepCopy<span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(192, 192, 192);"> </span>imageReader<span style="color: rgb(0, 0, 0);">-></span>GetDirectionCosines<span style="color: rgb(0, 0, 0);">());</span></font></pre>
<font size="4">
</font><pre style="margin: 0px; text-indent: 0px;"><font size="4"><span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(192, 192, 192);"> </span><span style="color: rgb(0, 128, 0);">invert->Invert();</span></font></pre>
<font size="4">
</font>
<pre style="margin: 0px; text-indent: 0px;"><font size="4"><span style="color: rgb(192, 192, 192);"> </span>vtkImageReslice<span style="color: rgb(192, 192, 192);"> </span><span style="color: rgb(0, 0, 0);">*</span>reslice<span style="color: rgb(192, 192, 192);"> </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(192, 192, 192);"> </span>vtkImageReslice<span style="color: rgb(0, 0, 0);">::</span>New<span style="color: rgb(0, 0, 0);">();</span></font></pre>
<font size="4">
</font><pre style="margin: 0px; text-indent: 0px;"><font size="4"><span style="color: rgb(192, 192, 192);"> </span>reslice<span style="color: rgb(0, 0, 0);">-></span>SetResliceAxes<span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(192, 192, 192);"> </span>invert<span style="color: rgb(192, 192, 192);"> </span><span style="color: rgb(0, 0, 0);">);</span></font></pre>
<font size="4">
</font><pre style="margin: 0px; text-indent: 0px;"><font size="4"><span style="color: rgb(192, 192, 192);"> </span>reslice<span style="color: rgb(0, 0, 0);">-></span>SetInput<span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(128, 128, 0);">this</span><span style="color: rgb(0, 0, 0);">-></span>imageData<span style="color: rgb(0, 0, 0);">);</span></font></pre>
<font size="4">
</font><pre style="margin: 0px; text-indent: 0px;"><font size="4"><span style="color: rgb(192, 192, 192);"> </span>reslice<span style="color: rgb(0, 0, 0);">-></span>Update<span style="color: rgb(0, 0, 0);">();<br>
<br>But it doesn't rotate the image.How to rotate the image?<br><br>Thanks <br><br>Jothy<br></span></font></pre><br><br><div class="gmail_quote">On Tue, Mar 1, 2011 at 4:07 PM, Jothy <span dir="ltr"><<a href="mailto:jothybasu@gmail.com">jothybasu@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">But in this example FileLowerLeft is switched off.<br><br>Thanks<br><font color="#888888"><br>Jothy</font><div>
<div></div><div class="h5"><br><br><div class="gmail_quote">On Tue, Mar 1, 2011 at 3:50 PM, Mathieu Malaterre <span dir="ltr"><<a href="mailto:mathieu.malaterre@gmail.com" target="_blank">mathieu.malaterre@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">jothy, I think what you are looking for is already in gdcm, have a look at:<br>
gdcmreslice.cxx<br>
<br>
hth<br>
<div><div></div><div>On Tue, Mar 1, 2011 at 4:31 PM, Jothy <<a href="mailto:jothybasu@gmail.com" target="_blank">jothybasu@gmail.com</a>> wrote:<br>
> Hi all,<br>
><br>
> I am trying to rotate vtkImageData using vtkMatrix4x4 about a point. is<br>
> there any example on how to do this?<br>
><br>
> Thanks<br>
><br>
> Jothy<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
><br>
<br>
<br>
<br>
--<br>
<font color="#888888">Mathieu<br>
</font></blockquote></div><br></div></div></div>
</blockquote></div><br></div>