Comments (4)
Hi @PichardRarker, sorry to hear you are having trouble with this. I always found the Siemens data formats to be annoyingly under specified in terms of orientation, and in particular my experience is mostly with either .RDA or TWIX formats, rather than Siemens DICOM, but it looks like you have got things correct. There are lots of things that could be going on, but without any data it is hard to narrow down the problem. When you say that the voxel is rotated, do you mean rotated about its center, or about the centre of the image, or the isocentre of the magnet? Are these images axial/sagittal/coronal? How did you convert the image slices to .nii?
Is this a one off or happening reliably on your data? Can you either obtain some shareable data or do some anonymisation of the data you do have? Without some kind of data it is going to be really hard to do more than suggest possible problems that you will have to investigate further.
from suspect.
Hi Ben,
Thanks for the detailed reply. I'm currently in talks with trial sponsor about getting permission to share some data with you. In the meantime, here are the answers to your questions, in case they are particularly informative:
do you mean rotated about its center, or about the centre of the image, or the isocentre of the magnet?
Rotated around the centre of the voxel, it seems. The true voxel location is the left-hemipshere putamen, with the longest axis of the oblong in the anterior-posterior plane. The voxel I'm seeing is still in the left hemisphere, but is rotated so that the longest axis runs left to right in real-world space.
Are these images axial/sagittal/coronal?
The T1 was acquired sagittaly
How did you convert the image slices to .nii?
An old build of dcm2nii
(I can find find the exact build, if helpful). The conversion was run without reorienting the data (as is standard practice nowadays with dcm2niix
). As part of my initial investigation I tried reorienting the T1 to match that of the MRS (by calling nibabel.aff2axcodes
on the .transform
attribute of the MRSData
object, then reorienting the T1 accordingly) but this produced the same result
Best,
Rich
from suspect.
If the voxel appears rotated through 90 degrees about its own centre, the most likely thing is that the length/width/height of the voxel are being read into the wrong fields. This could be a bug in Suspect caused by only previously using square voxels with Siemens DICOM files, or it could be something more subtle relating to the voxel being planned sagittally (I am assuming the voxels were planned on the T1?) that is not being correctly taken into account.
Looking back at the code (io/siemens.py) I am reminded that Siemens specifies the voxel with a normal vector and a rotation angle in the plane. I don't believe this is enough information to uniquely specify a voxel, but I have never been able to get Siemens to confirm to me how to get the X/Y/Z vectors from the values they provide, and so everything is basically a best guess on my part, working with a small amount of data, and it looks like you have found something where it is different.
To work around this, you can probably just permute the columns of the transform of the MRS voxel to swap the two offending direction vectors over, everything else should then work correctly. If you fancy having a look at the loading code, I think this is the problem line:
Line 173 in b35dbe6
which needs to be different for sagittal voxels if we can figure out which voxels are sagittal/axial/coronal from some other data.
from suspect.
I think that did the trick! If I set the vector to [0, -1, 0]
, and additionally flip the sign of the in-plane rotation angle, I seem to recover the correction orientation
Thank you so much for your help!
from suspect.
Related Issues (20)
- ENH: channel combination methods should accept an axis parameter
- BUG: load_dicom_volume() only considers .ima or .dcm files HOT 1
- ENH: Add the RATS frequency correction method
- ENH: Add TR parameter to MRSBase object
- ENH: Add functions for absolute quantification
- BUG: calculating axial/sagittal/coronal axes of transform does not use normalised direction vectors
- #BUG Siemens IMA load calculates wrong shape sometimes
- LCModel IO - "VOLUME = NaN" HOT 2
- ENH: overhaul of singlet fitting methods
- Siemens TWIX header variations and possible TWIX reader improvement HOT 3
- Support 2D COSY TWIX reader HOT 6
- frequency axis inverted HOT 1
- Processing HOT 3
- `correct_frequency_and_phase`: too many arguments to `residual_water_alignment`
- pydicom >2.0.0 reads MRS with too many elements HOT 2
- Allow update on lmfit's version HOT 1
- Travis CI not working HOT 3
- Compatibility issues in the latest version of Suspecs (v0.4.4) HOT 3
- Anonymize_twix HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from suspect.