mhe / pynrrd

Simple pure-python module for reading and writing nrrd files.
https://pynrrd.readthedocs.io/
MIT License
116 stars 51 forks source link

coronal plane and cross section #95

Closed Chida15 closed 5 years ago

Chida15 commented 5 years ago

How can I get the coronal plane?why can I just get the cross section?

addisonElliott commented 5 years ago

Not sure I fully understand your question. You may need to elaborate.

The data returned by pynrrd is a Numpy data array, so slicing the data from there is up to you.

For example, here is how you could slice the coronal plane for the data:

import nrrd

data, header = nrrd.read('FILE_PATH_HERE')

coronalPlane20 = data[:, 20, :]

Please elaborate and explain your question in more detail. I'm going to close this thread in a few days if no response is given.