<div dir="ltr">Using vtkImageReslice you could rotate the vtkImageData.<br><br>You need to create a vtkMatrix4x4 for the rotation nad pass this matrix to vtkImageReslice::<div dir="ltr">SetReSliceAxes<br><br>Jothy</div><br>
<br><div class="gmail_quote">On Wed, Apr 11, 2012 at 3:17 PM, Jothybasu Selvaraj <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">Using vtkImageReslice you could rotate the vtkImageData?<br><br>You need to create a vtkMatrix4x4 for the rotation nad pass this matrix to vtkImageReslice::SetReSliceAxes<br><br>Jothy<br><br><div class="gmail_quote">
<div><div class="h5">
On Wed, Apr 11, 2012 at 3:10 PM, Christoffer Green <span dir="ltr"><<a href="mailto:christoffer.green@gmail.com" target="_blank">christoffer.green@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<span>Hello!</span><div><br></div><div>I have been trying to figure out if it is possible to rotate data directly from a imagedata xml file. Can anyone lend me a hand on how to do that?</div><div><br>
</div><div>I am currently exporting data from matlab to a .vti imagedata xml file and importing it to paraview (that is I am writing the file without using vtk classes) but I</div><div>do not know how to rotate the data. According to the <a href="http://www.vtk.org/VTK/img/file-formats.pdf" style="color:rgb(17,85,204)" target="_blank">www.vtk.org/VTK/img/file-formats.pdf</a> file there is a Coordinate tag</div>
<div>but it does not appear to have an effect when importing, but on the other hand its barely documented and I am really just guessing on how to use it.</div><div><br></div><div>Currently I am testing with this data (but my actual data is much larger):</div>
<div><br></div><div><div><?xml version="1.0"?></div><div><VTKFile type="ImageData" version="0.1" byte_order="LittleEndian"></div><div><span style="white-space:pre-wrap">        </span><ImageData WholeExtent="0 1 0 1 0 0" Origin="0.0 0.0 0.0" Spacing="0.4 0.4 0.4"></div>
<div><span style="white-space:pre-wrap">                </span><Piece Extent="0 1 0 1 0 0"></div><div><span style="white-space:pre-wrap">                        </span><Coordinates></div><div><span style="white-space:pre-wrap">                                </span><DataArray type="Float32" Name="x_coordinate" format="ascii">0.0 0.3 0.0</DataArray></div>
<div><span style="white-space:pre-wrap">                                </span><DataArray type="Float32" Name="y_coordinate" format="ascii">0.5 0.2 0.0</DataArray></div><div><span style="white-space:pre-wrap">                                </span><DataArray type="Float32" Name="z_coordinate" format="ascii">1.0 0.0 0.0</DataArray></div>
<div><span style="white-space:pre-wrap">                        </span></Coordinates></div><div><span style="white-space:pre-wrap">                        </span><PointData></div><div><span style="white-space:pre-wrap">                                </span><DataArray type="Float32" Name="MagnitudeArray" format="ascii">0.1 0.3 0.5 0.8</DataArray></div>
<div><span style="white-space:pre-wrap">                        </span></PointData></div><div><span style="white-space:pre-wrap">                </span></Piece></div><div><span style="white-space:pre-wrap">        </span></ImageData></div><div>
</VTKFile></div>
<div><br></div></div><div>Thanks</div><div><br></div><div>BR/ Christoffer</div>
<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 <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: <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></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div dir="ltr">Jothy<br></div><br>
</div>