DICOM with vtkImageViewer2()

I have questions regarding DICOM visualisation orientation in vtkImageViewer2().

Just before I start, I read some other posts and I looked at the these websites:

https://www.slicer.org/wiki/Coordinate_systems

https://dicom.innolitics.com/ciods/ct-image/general-series/00185100

http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm

https://nipy.org/nibabel/dicom/dicom_orientation.html

What I would like to do is to have value of a pixel. I make an event which picks up the coordinates however the values of pixels are not correct.

I created the matrix zyx and then. I use vtk.vtkImageData() and numpy_support.numpy_to_vtk then I pass to the vtkImageViewer2()

First I have problem with proper orientation. I wanted to apply affine matrix however I think it does not work with vtkImageViewer2() or I am wrong?

However, from technical point of view should I apply the transformation matrices directly on the numpy matrix or there are better techniques to do so?

Thx.

I’d advise against using vtkImageViewer2 for this purpose, since it was designed to be a quick-and-dirty way to view images and it really doesn’t provide the kind of flexibility that’s needed for medical image visualization.

I prefer viewing images directly in a vtkRenderWindow and use the actor/mapper/camera to control the view. In other words, rather than transform the image, I tell VTK what slice orientation to use for the view (obliques are possible with vtkImageResliceMapper). An example of this approach is the NIFTI test in the VTK source tree (must be run on the command line with “-I” to enable the interactor).

Thanks again David for your response. You are really a compendium of useful information :slight_smile: