Giter Club home page Giter Club logo

Comments (22)

LexHayes avatar LexHayes commented on May 28, 2024 1

Hi

Yes with the latest code this seems to have solved the issue! Thanks for your help!

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

Hi Lex, thanks for your feedback. I don't have any PAR/REC fieldmap data or knowledge about them, but I can try and fix it for you. Fieldmaps are quite tricky, and what happens here is that you said you had a phasediff image and then the bidscoiner looked for the associated magnitude image (there should be at least one, see here. But it can't find it. So my question is, do you have the magnitude image in BIDS/sub-3002/ses-1/fmap and/or can you perhaps share your bidsmap.yaml file with me?

from bidscoin.

LexHayes avatar LexHayes commented on May 28, 2024

Hi Marcel,

Thanks for your quick response!
In the raw data set I only have one Fieldmap PAR/REC file. However when I have looked in the PAR header it does have the two sets of 33 slices one set is labelled as image type 0 and the other as image type 3 which I believe is magnitude and phasediff respectively?

I've attached my bidsmap.yaml file as well.

Thanks

bidsmap.pdf

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

Yes, but after conversion of the PAR/REC file there doesn't seem to be a phase image, according to bidscoiner. That is probably because the output filename is different than expected. Or because dcm2niix doesn't convert the PAR/REC file properly. So could you tell me the filenames of the fmap files in BIDS/sub-3002/ses-1/fmap?

from bidscoin.

LexHayes avatar LexHayes commented on May 28, 2024

Hi Marcel, no you are correct there his not a specific phase image produced - I have attached a screenshot of the images that are produced, I end up with a file with an acquisition value although this was not defined in my bidsmapper.yaml file. I hope this is helpful!
Screenshot 2021-02-01 at 12 18 50

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

So if I understand it correctly, you have acquired two fieldmaps (one with acq-PHO01 and one without)? What I need to know in order to fix things is what the exact output is of dcm2niix. Can you call it directly for me and tell me what it produced? Also, if you send me the BIDS/code/bidscoin/bidscoiner.log, that could perhaps be useful too

from bidscoin.

LexHayes avatar LexHayes commented on May 28, 2024

Sure! When I call dcm2niix directly it produces the following files for the input file sub-3002_fmap.PAR/REC;
sub-3002_<protocol_name><examination_date/time><acquisition_number>ph.json
sub-3002
<protocol_name><examination_date/time><acquisition_number>ph.nii.gz
sub-3002
<protocol_name><examination_date/time><acquisition_number>pha.json
sub-3002
<protocol_name><examination_date/time><acquisition_number>pha.nii.gz
sub-3002
<protocol_name><examination_date/time><acquisition_number>.json
sub-3002_<protocol_name><examination_date/time><acquisition_number>.nii.gz
sub-3002_<protocol_name><examination_date/time><acquisition_number>.json
sub-3002_<protocol_name><examination_date/time><acquisition_number>.nii.gz

I have also sent you the bidscoiner.log file.

Many thanks for your support!

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

Btw, I see that you removed the run-<<1>> index. This is generally not advisable, as this runindex is used to account for multiple acquisitions. In your case dcm2niix produces two phase images that are now both written by bidscoiner to the same acq-PH00 image. I will try and see if I can easily catch these fieldmaps in my code (the combination of fieldmaps and dcm2niix is tricky).

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

I am also a bit confused because your logs show DICOM data from Toshiba but we are discussing PAR/REC data from Philips

from bidscoin.

LexHayes avatar LexHayes commented on May 28, 2024

Hi,

Yes toshiba is the name of the hard-drive that the data is stored on and the folder 'DICOMS' is named as such because I have data from three different sites two of which produced DICOMS and one produced PAR/REC

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

Have you tried using the magnitude suffix instead of fieldmap? Because I suspect that your PAR/REC output is not a fieldmap but one magnitude- and two phase-images? That may perhaps solve your problem?

from bidscoin.

LexHayes avatar LexHayes commented on May 28, 2024

Ah yes thank you this now appends 'magnitude' or 'phase' onto the output files as shown below;
Screenshot 2021-02-10 at 13 58 31
however there is still the 'acq-PHO01' label present despite this not being specified?
Similarly this is happening with my functional runs for which I have two echos per task per run and the converted files are being named;
acq-E0*_bold.nii.gz/json
I notice with DICOM data there is an EchoTime attribute number which would allow me to distinguish between the echos, is this something that is possible with PAR/REC files as well?

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

I'll take a look at it that because it should go in the echo entity. As for your functional scans, this is the desired behaviour because BIDS 1.4.1 does not provide an echo entity for functional scans (therefore I appended the echo info to the acquisition entity). The upcoming BIDS 1.5 does provide for this and you can give it a try by installing the latest / development bidscoin version:

pip install git+https://github.com/Donders-Institute/bidscoin

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

I just committed an experimental fix (195e02a) for your fieldmaps in the latest bidscoin version

from bidscoin.

LexHayes avatar LexHayes commented on May 28, 2024

Thanks for taking a look at that. I've just installed the latest experimental version and tried to re-run bids mapper. The gui opens fine but when I try to click on any of the 'edit' buttons I get the following error;

File "/Users/ah2816/opt/anaconda3/envs/Python/lib/python3.8/site-packages/bidscoin/bidseditor.py", line 980, in get_allowed_suffixes
for run in runs:
TypeError: 'NoneType' object is not iterable
Abort trap: 6

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

I see, shouldn't happen but I can't reproduce it here. Did you start with a clean bids output directory? What template did you use? The standard one or the bidsmap_dccn one? If you made your own template, can you perhaps then share it with me?

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

I made a tiny tweak in the code (4926f8b) maybe that helps...

from bidscoin.

LexHayes avatar LexHayes commented on May 28, 2024

My bids output directory is clean and I made my own template which I have attached
bidsmap.yaml.zip

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

Sorry, I noticed that the pip install git+https://github.com/Donders-Institute/bidscoin was a bit broken. Should work much better now :-)

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

You made that template with a text editor?

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

The idea of a template is that it works for a collection / variety of studies, as a starting point. So the attributes should be as generic as possible, so that it will work for more studies. The study specific attibutes and bids-labels are then added by the bidsmapper+bidseditor and saved in the study folder as a (study specific) bidsmap.yaml file. Your custom bidsmap, seems a bit like neither?

from bidscoin.

marcelzwiers avatar marcelzwiers commented on May 28, 2024

I cannot exactly reproduce your error here

  1. Do you get the error when you, for example, use the -t bidsmap_dccn option?
  2. Do you still get the error with your custom template when you use the latest code (i.e. after pip install --upgrade git+https://github.com/Donders-Institute/bidscoin)?

from bidscoin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.