[vtkusers] Rotating ImageData from vti file

Christoffer Green christoffer.green at gmail.com
Wed Apr 11 12:54:29 EDT 2012


My question was if it is possible to define this within the xml file itself.

Thanks.

BR/ Christoffer

On Wed, Apr 11, 2012 at 4:20 PM, Jothybasu Selvaraj <jothybasu at gmail.com>wrote:

> Using vtkImageReslice you could rotate the vtkImageData.
>
>
> You need to create a vtkMatrix4x4 for the rotation nad pass this matrix to
> vtkImageReslice::
> SetReSliceAxes
>
> Jothy
>
>
> On Wed, Apr 11, 2012 at 3:17 PM, Jothybasu Selvaraj <jothybasu at gmail.com>wrote:
>
>> Using vtkImageReslice you could rotate the vtkImageData?
>>
>> You need to create a vtkMatrix4x4 for the rotation nad pass this matrix
>> to vtkImageReslice::SetReSliceAxes
>>
>> Jothy
>>
>>  On Wed, Apr 11, 2012 at 3:10 PM, Christoffer Green <
>> christoffer.green at gmail.com> wrote:
>>
>>>  Hello!
>>>
>>> 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?
>>>
>>> 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
>>> do not know how to rotate the data. According to the
>>> www.vtk.org/VTK/img/file-formats.pdf file there is a Coordinate tag
>>> 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.
>>>
>>> Currently I am testing with this data (but my actual data is much
>>> larger):
>>>
>>> <?xml version="1.0"?>
>>> <VTKFile type="ImageData" version="0.1" byte_order="LittleEndian">
>>> <ImageData WholeExtent="0 1 0 1 0 0" Origin="0.0 0.0 0.0" Spacing="0.4
>>> 0.4 0.4">
>>>  <Piece Extent="0 1 0 1 0 0">
>>> <Coordinates>
>>> <DataArray type="Float32" Name="x_coordinate" format="ascii">0.0 0.3
>>> 0.0</DataArray>
>>>  <DataArray type="Float32" Name="y_coordinate" format="ascii">0.5 0.2
>>> 0.0</DataArray>
>>> <DataArray type="Float32" Name="z_coordinate" format="ascii">1.0 0.0
>>> 0.0</DataArray>
>>>  </Coordinates>
>>> <PointData>
>>> <DataArray type="Float32" Name="MagnitudeArray" format="ascii">0.1  0.3
>>>  0.5  0.8</DataArray>
>>>  </PointData>
>>> </Piece>
>>> </ImageData>
>>> </VTKFile>
>>>
>>> Thanks
>>>
>>> BR/ Christoffer
>>>
>>> _______________________________________________
>>> Powered by www.kitware.com
>>>
>>> Visit other Kitware open-source projects at
>>> http://www.kitware.com/opensource/opensource.html
>>>
>>> Please keep messages on-topic and check the VTK FAQ at:
>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.vtk.org/mailman/listinfo/vtkusers
>>>
>>>
>>
>>
>> --
>> Jothy
>>
>>
>
>
> --
> Jothy
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120411/cd811ae3/attachment.htm>


More information about the vtkusers mailing list