[vtkusers] alignment between nifti and vtk files

Martijn Steenwijk martijnsteenwijk at gmail.com
Fri Mar 2 07:30:40 EST 2012


Okay, what you should do is left-right flip the vtkImageData (use
vtkImageFlip) and set the origin of the vtkImageData to (0,0,0). Probably
this will fix the problem.

On Fri, Mar 2, 2012 at 1:29 PM, Hila Hiler <hilahiler at gmail.com> wrote:

> The poly data is a segmentation from the nifti file and was written by
> vtkPolyDataWriter.
> I read the nifti file by itk.
> To visualize them I use Mitk.
>
> please ask more if I missed any detail ...
>
> On Fri, Mar 2, 2012 at 2:18 PM, Martijn Steenwijk <
> martijnsteenwijk at gmail.com> wrote:
>
>> Hi Hila,
>>
>> How was the polydata obtained and how do you read the nifti file in VTK?
>>
>> Best,
>> Martijn
>>
>> On Fri, Mar 2, 2012 at 12:29 PM, Hila Hiler <hilahiler at gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I have one vtk file consists of polyData and another nifti file consists
>>> gray values.
>>> I'd like to align them.
>>>
>>> *data of vtk file:
>>> ===============*
>>>        GetGeometry3D(0):       Geometry3D (0314A390)
>>>          IndexToWorldTransform:
>>>         Matrix:
>>>           1 0 0
>>>           0 1 0
>>>           0 0 1
>>>         Offset: [0, 0, 0]
>>>         Center: [0, 0, 0]
>>>         Translation: [0, 0, 0]
>>>         Inverse:
>>>           1 0 0
>>>           0 1 0
>>>           0 0 1
>>>         Scale : 1 1 1
>>>          BoundingBox:         ( -16.886,63.6804 -102.803,88.6225
>>> -19.869,79.0607  )
>>>          Origin: [0, 0, 0]
>>>          ImageGeometry: 0
>>>          Spacing: [1, 1, 1]
>>>          TimeBounds: [-3.40282e+038, 3.40282e+038]
>>>
>>> *
>>> data of nifti file:
>>> ===============*
>>> GetGeometry2D(0):         PlaneGeometry (0BE3CAE8)
>>>            IndexToWorldTransform:
>>>           Matrix:
>>>             0.488281 0 0
>>>             0 -0.488281 0
>>>             0 0 -1
>>>           Offset: [-122.375, 115.432, -122.515]
>>>           Center: [0, 0, 0]
>>>           Translation: [-122.375, 115.432, -122.515]
>>>           Inverse:
>>>             2.048 0 0
>>>             0 -2.048 0
>>>             0 0 -1
>>>           Scale : 1 1 1
>>>            BoundingBox:           ( 0,512 0,512 0,1  )
>>>            Origin: [-122.375, 115.432, -122.515]
>>>            ImageGeometry: 1
>>>            Spacing: [0.488281, 0.488281, 1]
>>>            TimeBounds: [-3.40282e+038, 3.40282e+038]
>>>
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120302/bf389974/attachment.htm>


More information about the vtkusers mailing list