-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non-standard fMRI Orientation Must Be Fixed or an Error #221
Comments
The point that I was making in #139 is that you can't just throw in an And if STC is being used then the change of orientation needs to be accounted for there as well. In principle, this could all be done internally to |
What kind of changes do you think would occur to unwarpdir? This is not the kind of reorientation that changes the labels vs the anatomical axes of the image. For the GE data case, there was no adjustment to UnwarpDir needed. |
|
Not sure about polarity, but I doubt fixing the orientation would otherwise break things. In any case, with these sort of complicated situations, one will have to use trial and error anyway to figure out the polarity. As the pipelines currently stand they will produce broken results for data that need fslreorient2std run on them, whereas at least some of the time the results would be correct if it were run. I don't have the data, but it was acquired within the last month on a GE scanner with an HCP-Style protocol. |
If I seems reasonable to me to have fMRIVolume check the orientation and generate an error, with an appropriately informative message, if the input isn't already LAS or RAS oriented, thereby putting the burden on the user to provide appropriately oriented inputs. |
I still don't understand an example situation where this would create a problem. As far as I know, UnwarpDir has always referred to the anatomical labels. It is specified as xyz and it would take quite some creative thinking to make those not refer to medial-lateral, anterior-posterior, and superior-inferior. We work in LPI and RPI not LAS or RAS. |
The FSL tools are technically based on the image axes, not the anatomical labels. To the extent that FWIW, I consider the space we work in to be LAS/RAS, since I believe the more typical usage historically has been to label the orientation based on the increasing index direction. e.g., the following all adopt that "convention": https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Orientation%20Explained Unfortunately, I think FreeSurfer adopted the convention of describing the orientation via the decreasing index direction. |
One would have to mentally translate what they set on the scanner into a strange coordinate system if one does not use fslreorient2std. I would expect setup errors to be more likely attempting to use the HCP Pipelines without fslreorient2std than with it, and any images that need this step are unlikely to be robustly processed in any case. I'm still not seeing the case where the current behavior is a good idea. FreeSurfer's convention is the opposite of ours. |
Here are example of the confusion that unfortunately exists in FSL around this issue:
https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FEAT/UserGuide#Pre-Stats:
Note that both descriptions mention that the specification is in terms of the voxel axes. The use of |
Regarding your earlier comment, at this point the ecosystem is designed around the technical specification of That's why I think the safest path forward at this point is to just generate an error if the orientation of the inputs aren't LAS/RAS :) |
If the SE fieldmaps and the BOLD have the same orientation before the reorient2std, then the same axis flips/swaps apply to both. If they are only flips, then something like "j-" should result in the same distortion warpfield before and after the flips (though technically it confounds both increased versus decreased field strength and direction (which we don't attempt to disambiguate in the pipelines anyway), but with both things reversed, you get the same displacement in real mm). Yes, we could tell the user they need to manually run fslreorient2std and think about the phase direction again, but that isn't much different than automatically running fslreorient2std and the current "try it and see if it works" approach for the phase direction argument. In fact, WITH fslreorient2std, "x, y, z" in the FSL distortion correction tools actually will match the anatomical directions (with a possible sign flip), whereas without it, they might not, so that confusion is currently increased by not running fslreorient2std. There isn't an ideal solution, but other than STC (which we don't do in our data, and the reorient usually doesn't need to swap the third dimension anyway), the end result is generally that running fslreorient2std is better than not, and the question is whether we should yell at the user to do it themselves, or do it for them. wb_command -file-information can report orientation (even on oblique or skew volumes), though it is a bit verbose (note: I ran it on a strange orientation I previously generated for testing purposes):
|
We discussed and Grega's current plan is to implement something that makes it an error to run the HCP Pipelines on incorrectly oriented data. Mike's point is that fully automated tools might not work with coronal or sagittal EPI (where unwarpdir is set based on a dcm2niix output and not by the user); however, these are fairly rare. |
@coalsont : We can treat STC as a separate issue, but the data that Matt saw that prompted this whole thing was flipped on the S/I axis. |
#139 Implemented fslreorient2std in fMRI data but limited it to those datasets where no distortion correction was going to be applied. Recently I was working with a collaborator on an HCP-Style GE acquired dataset where the NIFTI files were upside down in FSL (I believe in RAS convention). This led to multiple fMRI runs not being aligned correctly (trapped in a local minimum upside down). It was stated in #139 that fslreorient2std would break distortion correction; however, I am not sure that is the case (assuming the labels actually match the data). Can someone explain why this is wrong? If it does break distortion correction, the pipeline cannot accept data that is upside down--we cannot expect it to reliably fix the data in these settings and so it should error.
The text was updated successfully, but these errors were encountered: