Hi David,
Thank you for your thoughtful answer. I truly appreciate all of your responses to vtk users’ questions.
Since I am a new vtk user, it took me a little bit to thoroughly understand your suggestions. My script works now. The key solution for me was realizing that the y- and z- axis flipping that the vtkDICOMImageReader quietly does is significant. If I do the following:
- read the DICOM
- flip image in Y
- flip the image in Z
- construct the affine
- inverse the affine
- pipe the (y- and z- flipped) image into a vtkImageReslice object
- apply the affine to the vtkImageReslice object using SetResliceAxes
… then the resulting image is properly aligned (orthogonal / axial).
I don’t have access to the vtkDICOMReader package, because I am running the vtk libraries from a downloaded executable. I did not build vtk from source code.
I am going to try using vtkImageResliceMapper and also the vtkImageStack, as you recommend.
Michelle