How to access coronal image data array from a Diffusion Weighted Volume Node

How can I access coronal pixel data from a MRMLCorePython.vtkMRMLDiffusionWeightedVolumeNode object in a python slicer extension module?

I’m creating a numpy array based on axial diffusion dicom pixel data, e.g.

{code}
np_dwi_array, flip_angles = dicom_util.read_dicomdir(inputDirectory)
outputDWIVolume.SetIJKToRASMatrix(vtk.vtkMatrix4x4())
slicer.util.updateVolumeFromArray(outputDWIVolume, np_dwi_array)
{code}

I’d like to access the coronal pixel data arrays to do region of interest finding analysis on. It is easier to do this analysis on the coronal orientation, even though the original scan data is in the axial orientation. The coronal images are displayed in slicer so I figure it should be programmatically accessible as well.

Thanks

Slicer reformats the data on the fly for visualization so you can’t just get the DWI coronal. But you can use numpy commands or vtk classes to reformat any of the image data.

1 Like

thanks, a numpy transpose was all that was needed and I was over complicating things