-
Notifications
You must be signed in to change notification settings - Fork 163
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
[BIDS] import NIRS dataset (fixes #469) #589
Conversation
ok. so I broke everything that last commit.... Left: When importing the .snirf, Right when using coordinate from the optodes.txt file. (left is the correct montage covering both motor cortices) If I do right click on the channel file, and then import from a file then all the optodes get pulled to the middle of the brain |
It seems there is some kind of 90 degree rotation between the real montage and what we get. So the json file is saying:
So I guess that the coordinate system in Brainstorm should be ScanRAS. They don't provide the fiducials outside the snirf file so I don't know what to do. If I specify electrodesSpace = 'ACPC'; it is the good orientation, but the electrodes are floating ~3cm above the head. |
If I change the json file to :
where the fiducials comes from the snirf file then the coregistration is ok. would it be possible to take the fiducials automatically from the snirf file when they are not in the json file ? Edit: actually, should we ignore the optodes.tsv and _coordsystem.json files since they are just a copy of what is inside the snirf file with less information? |
In the BIDS logic:
This is a complicated topic, actively debated: bids-standard/bids-specification#761 In the past weeks, I spent a lot of time spotting inconsistencies in public datasets and reporting them on OpenNeuro... Brainstorm should also include a solution for converting to and from "CapTrak", in cs_compute.m and cs_convert.m, in the same way I implemented the ACPC coordinates, in order to align correctly at least on the MNI anatomy...
No, because they are not necessarily in the same coordinate system... |
Thanks a lot for the feedbacks. I will work on them during the weekend :) |
I committed some new code to handle the CapTrak coordinates from BIDS datasets: |
thx. By any chance, do you think you could manage to merge the changes on this branch so I can keep working on it without having any issue with merging conflicts ? :) edit : I found a way :) |
Ok; I think it is ready for review. By the way, shouldn't the process import_bids have the option to create a new protocol instead of adding the data to the current protocol by default? Maybe something like :
|
I'm not sure the dataset name is really a good solution: it is sometimes empty, sometimes very long... not very adapted to be a folder name in the brainstorm_db folder. However, it's indeed not very intuitive that the dataset is going to be imported in the current protocol. I think I will add a new option "Protocol name (empty=current protocol)" in the process options. |
If a channel has two locations, I don't think we need to make the test for both locations. Testing one, and it not there, adding the two points. Much more readable :)
Good job! :) |
Thank you. Should we tweet about it (maybe as response to https://mobile.twitter.com/BIDSstandard/status/1586327298608955392 ) ? We can add it to the updates.txt too :)
Yes, you are right. It seems that the datasets filling those metadata carefully are quite rare...
yes, i have some ideas but need a bit of time to clarify them in my head before writting them here :) Will try to describe them here before the end of the week :) |
Sure! Please feel free to do it.
Yes, I forgot, it will be in my next commits. |
Hello,
This is finally implementing the BIDS importation for NIRS :).
Two datasets can be found here: