RGY views from numpy array

When I first import my imaging file, it looks like this:

If I then get it as a numpy array through arr = array("imaging") and write it as a new volume by doing addVolumeFromArray(arr, name="newarray"), it looks like this:

I would like for the views to correspond to eachother. So for example, the red “R” view would be a top-down view of the patient in the new volume as well.

Is there any way to keep all the formatting of the volume it came from?

A simple numpy array cannot store the image geometry (image origin, spacing, and axis directions = IJK to RAS matrix). You need to copy the IJKToRASMatrix from the original volume to the new volume.

ijkToRas = vtk.vtkMatrix4x4()