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

**URL:** <https://discourse.slicer.org/t/how-to-access-coronal-image-data-array-from-a-diffusion-weighted-volume-node/6054>\
**Category:** Support\
**Tags:** diffusion\
**Created:** [March 7, 2019, 12:05am UTC](https://discourse.slicer.org/t/how-to-access-coronal-image-data-array-from-a-diffusion-weighted-volume-node/6054 "2019-03-07T00:05:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_DiMatteo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/john_dimatteo/32/3168_2.png) [@John\_DiMatteo](https://discourse.slicer.org/u/John_DiMatteo)\
**Post date:** [March 7, 2019, 12:05am UTC](https://discourse.slicer.org/t/how-to-access-coronal-image-data-array-from-a-diffusion-weighted-volume-node/6054/1 "2019-03-07T00:05:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [March 7, 2019, 8:53pm UTC](https://discourse.slicer.org/t/how-to-access-coronal-image-data-array-from-a-diffusion-weighted-volume-node/6054/2 "2019-03-07T20:53:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![John\_DiMatteo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/john_dimatteo/32/3168_2.png) [@John\_DiMatteo](https://discourse.slicer.org/u/John_DiMatteo)\
**Post date:** [March 11, 2019, 4:50pm UTC](https://discourse.slicer.org/t/how-to-access-coronal-image-data-array-from-a-diffusion-weighted-volume-node/6054/3 "2019-03-11T16:50:14Z")

</div>

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