[vtkusers] using vtkLandmarkTransform to align two nii volumes

The Merper msmerps at gmail.com
Thu Oct 11 11:05:44 EDT 2018


Hi VTK experts,
   I am trying to using vtkLandmarkTransform  to align two nii volumes and
am getting puzzling results. I identify the landmarks in the two 3D volumes
by visualizing the volumes in VTK and using the GetPickPosition method. The
coordinates I get are in units of mm with the origin being one corner of 3D
volume.
    I then use vtkLandmarkTransform to get an affine transformation to
align the points. The points align great, but when I apply that same
transform to the analogous nii volume via vtkImageReslice, the results are
wildly off (e.g., the volume is flipped upside down).
   Is the qform matrix of each nii file somehow causing this? Do I need to
first apply the qform matrix to the landmark points to get them in scanner
coordinates before using vtkLandmarkTransform?
       thank you for any advice you can provide,
            -Ms. Merps
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181011/ea1c530a/attachment.html>


More information about the vtkusers mailing list