rpeltekov / ge3t_shim_tool

Conformal Shimming for GE3T using ExSI and OpenSourceImaging Shim Drivers
MIT License
1 stars 1 forks source link

add context for orientation of data when you pull it from the dicom #1

Open rpeltekov opened 3 months ago

rpeltekov commented 3 months ago

there is currently no concept of orientation, and manually throughout the whole codebase we are extracting a slice, i, by using the naive "[:,i,:]" numpy slice indexing but this results in a lot of missed bugs, and some unexpected flipping / orientation loss.

i propose to add a class that handles all the 3d image data and exposes functions that allow you to more easily get any slice you want in any orientation easily. the original information should be extracted from the dicom when it gets ingested.

rpeltekov commented 3 months ago

this would also involve updating the ROI object such that it uses these orientation references, and is not fixed to only one view as it is currently...

rpeltekov commented 3 months ago

btw, if the dicoms from the scanner come in coronal orientation, i think the correct way to slice an axial view is by slicing [-1::-1, i, :], not [:,i,:] as is currently done throughout the code base. but this should be verified.

This is how the tool visualizes an axial slice: image when this is how it really should be: image