Thank you for the reply.<div><br></div><div>Interesting, I had not realized that vtk cannot handle rotated image data (without conversion/interpolation), that explains why there are no such properties in the xml file.</div>
<div><br></div><div>Well, that throws quite the wrench in my plans, but thanks for letting me know :)</div><div><br></div><div>BR/ Christoffer<br><br><div class="gmail_quote">On Thu, Apr 12, 2012 at 3:53 PM, David E DeMarle <span dir="ltr"><<a href="mailto:dave.demarle@kitware.com">dave.demarle@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">No, vtk's image data is defined to be axis aligned.<br>
You have to apply filters to transform them (and change type to<br>
structuredgrid in the process), so the image data file formats are not<br>
the place to specify the transformation you want.<br>
<br>
David E DeMarle<br>
Kitware, Inc.<br>
R&D Engineer<br>
21 Corporate Drive<br>
Clifton Park, NY 12065-8662<br>
Phone: <a href="tel:518-881-4909" value="+15188814909">518-881-4909</a><br>
<br>
<br>
<br>
On Wed, Apr 11, 2012 at 12:54 PM, Christoffer Green<br>
<div class="HOEnZb"><div class="h5"><<a href="mailto:christoffer.green@gmail.com">christoffer.green@gmail.com</a>> wrote:<br>
> My question was if it is possible to define this within the xml file itself.<br>
><br>
> Thanks.<br>
><br>
> BR/ Christoffer<br>
><br>
><br>
> On Wed, Apr 11, 2012 at 4:20 PM, Jothybasu Selvaraj <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Using vtkImageReslice you could rotate the vtkImageData.<br>
>><br>
>><br>
>> You need to create a vtkMatrix4x4 for the rotation nad pass this matrix to<br>
>> vtkImageReslice::<br>
>> SetReSliceAxes<br>
>><br>
>> Jothy<br>
>><br>
>><br>
>> On Wed, Apr 11, 2012 at 3:17 PM, Jothybasu Selvaraj <<a href="mailto:jothybasu@gmail.com">jothybasu@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> Using vtkImageReslice you could rotate the vtkImageData?<br>
>>><br>
>>> You need to create a vtkMatrix4x4 for the rotation nad pass this matrix<br>
>>> to vtkImageReslice::SetReSliceAxes<br>
>>><br>
>>> Jothy<br>
>>><br>
>>> On Wed, Apr 11, 2012 at 3:10 PM, Christoffer Green<br>
>>> <<a href="mailto:christoffer.green@gmail.com">christoffer.green@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hello!<br>
>>>><br>
>>>> I have been trying to figure out if it is possible to rotate data<br>
>>>> directly from a imagedata xml file. Can anyone lend me a hand on how to do<br>
>>>> that?<br>
>>>><br>
>>>> I am currently exporting data from matlab to a .vti imagedata xml file<br>
>>>> and importing it to paraview (that is I am writing the file without using<br>
>>>> vtk classes) but I<br>
>>>> do not know how to rotate the data. According to<br>
>>>> the <a href="http://www.vtk.org/VTK/img/file-formats.pdf" target="_blank">www.vtk.org/VTK/img/file-formats.pdf</a> file there is a Coordinate tag<br>
>>>> but it does not appear to have an effect when importing, but on the<br>
>>>> other hand its barely documented and I am really just guessing on how to use<br>
>>>> it.<br>
>>>><br>
>>>> Currently I am testing with this data (but my actual data is much<br>
>>>> larger):<br>
>>>><br>
>>>> <?xml version="1.0"?><br>
>>>> <VTKFile type="ImageData" version="0.1" byte_order="LittleEndian"><br>
>>>> <ImageData WholeExtent="0 1 0 1 0 0" Origin="0.0 0.0 0.0" Spacing="0.4<br>
>>>> 0.4 0.4"><br>
>>>> <Piece Extent="0 1 0 1 0 0"><br>
>>>> <Coordinates><br>
>>>> <DataArray type="Float32" Name="x_coordinate" format="ascii">0.0 0.3<br>
>>>> 0.0</DataArray><br>
>>>> <DataArray type="Float32" Name="y_coordinate" format="ascii">0.5 0.2<br>
>>>> 0.0</DataArray><br>
>>>> <DataArray type="Float32" Name="z_coordinate" format="ascii">1.0 0.0<br>
>>>> 0.0</DataArray><br>
>>>> </Coordinates><br>
>>>> <PointData><br>
>>>> <DataArray type="Float32" Name="MagnitudeArray" format="ascii">0.1 0.3<br>
>>>> 0.5 0.8</DataArray><br>
>>>> </PointData><br>
>>>> </Piece><br>
>>>> </ImageData><br>
>>>> </VTKFile><br>
>>>><br>
>>>> Thanks<br>
>>>><br>
>>>> BR/ Christoffer<br>
>>>><br>
>>>> _______________________________________________<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>
>>> Jothy<br>
>>><br>
>><br>
>><br>
>><br>
>> --<br>
>> Jothy<br>
>><br>
><br>
><br>
> _______________________________________________<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>
</div></div></blockquote></div><br></div>