Closed karl-koschutnig closed 1 year ago
Do you want to insert the session name already in the source foldername (i.e. after dicomsort), and then extract it later from the foldername or do you just want the session foldername to be correct in the bids output folder? Because if the latter is the case, then you can simply put {session: <<AccessionNumber>>}
in your bidsmap (instead of {session: <<filepath:blabla>>}
)?
If I understand you correctly, I think that is perfectly possible, you just need to make it a dynamic value expression, e.g. edit your template bidsmap like this:
<<: *func_bidsattr
task: <SeriesDescription:_task-(.*?)_>
Thank you so much - that really helps!! ad 1) that solved my problem - perfect!! I didn't think to put it directly into the bidsmap!
ad 2) also great - works for the task name. However, I also tried to use the same idea to automatically define the IntendedFor-field. All our fmaps follow a naming schema like fmap_i4-"sequence". For example: fmap_i4-Spirit_dir-PA_epi. The i4 stands for intended for and in the example this fmap is intended for the "Spirit" functional run. I used: <ProtocolName:i4-(.*?)> in my bids map (as you suggested for the task. It turns out that this exact phrase shows up in the bids mapper-gui. When I delete the code in the GUI and reinsert the exact same cod, the correct output is shown (spirit). Any idea what that could cause?
Again, thank you so much!
ad 2) Have you tried to run bidscoiner and see what happens? Because I think it just works as you did it (because during bidscoiner runtime, bidscoiner will search for files in the bids session directory with, in this case, that contain the substring Spirit
). I suppose you could even use: {IntendedFor: func/*<ProtocolName:_i4-(.*?)_>*}
I hope to release a new BIDScoin version in the next week or so. So if there is anything you need in there, let me know before :-)
... thanks a lot for asking - it's perfectly fine at the moment!!
However, as a side note, it would be great to have the BIDScoin as a docker container. But this is another story.... ;-)
The resulting image is kind of huge and a bit of a pain to use, but I created your Dockerfile :-)
https://bidscoin.readthedocs.io/en/latest/installation.html#using-a-docker-container
Hi Marcel,
We are trying to implement your bidscoiner pipeline to convert all our MRI data to BIDS. You have helped in the past, and we really appreciate your work!!
I have two things that would make our pipeline easier, and I wanted to ask if it would be possible to implement these suggestions: 1) It would be great to have the option to make subfolders within dicomsort. It is not that easy to bring the session information automatically into BIDS. So we have to provide this information. We currently have the session number included in the Patient Name (something like "sub-001_3" for the 3rd session). This is OK, but we want to register the subject at the Scanner only with sub-001 shortly. So, we'll include the session information in the AccessionNumber Tag (0008 0050) in future studies. The command would then be something like this: dicomsort . -i sub- -j {AccessionNumber} -f {SeriesNumber:03d}-{SeriesDescription}-{EffectiveEchoTime} -n {InstanceNumber:05d}.dcm --force
So -j would be provided with the session info.
2) Another suggestion that would help us is the possibility to grep the task name with the bidscoiner framework automatically. We established a very "strict" naming schema at our Scanner. For example, a functional run has the following sequence name: func_task-Spirit_bold. So, first, we have the associated bids folder (func) then the task-task name (Spirit), followed by the BIDS-suffix (bold). This is an excellent and elegant way to get all relevant info within the sequence name. Here is the question: would it be possible to implement something like this in a custom bidsmap-template: bids: <<: func_bidsattr task: <SeriesDescription:_task-(.?)> I am not so much familiar with RE, but the idea is to search for "task" in the SeriesDescription and the rest (in our example Spirit) as input for the BIDS-Taskname.
What do you think about these suggestions. I would be happy to discuss them with you. Thanks!!