Donders-Institute / staff-scientists

The consultancy page for the DCCN staff scientists
https://staff-scientists-dccn.readthedocs.io
3 stars 1 forks source link

MRS plugin for bidscoiner #5

Closed nat-forde closed 1 year ago

nat-forde commented 3 years ago

Describe the issue More a request than a software issue. Currently there is no BIDS standard for MRS data but this is being developed. There is however already spec2nii (https://git.fmrib.ox.ac.uk/wclarke/spec2nii) which converts raw MRS data to nifti and can produce associated sidecar files as needed for BIDS. This being integrated in bidscoiner would be a great help.

Describe yourself

  1. Natalie Forde
  2. Postdoc
  3. Beckmann's group
marcelzwiers commented 3 years ago

The last activity on the spec2nii git repository was 11 months ago... Do you happen to know something about the future support / development of this project?

marcelzwiers commented 3 years ago

Mhhh, I noticed there is also this (spin-off?) repository: https://github.com/wexeee/spec2nii

marcelzwiers commented 3 years ago

Can you provide me with some test data?

nat-forde commented 3 years ago

The last activity on the spec2nii git repository was 11 months ago... Do you happen to know something about the future support / development of this project?

I'm surprised there's been no activity on it for so long. The MRS-BIDS dev seems pretty active (or at least discussion over conventions; https://forum.mrshub.org/t/bids-for-spectroscopy/83) and spec2nii is what they suggest using. The wexeee version I've not come across.

nat-forde commented 3 years ago

Can you provide me with some test data?

Sure, Jill Naaijen is handling our data but I'll get her to share some with you 👍

marcelzwiers commented 3 years ago
I looked into it a bit more but support for all the source data types seems to be more work than I thought. What formats would you need? Format File extension
Siemens Twix .dat
Siemens DICOM .ima / .dcm
Philips .SPAR/.SDAT
Philips .data/.list
Philips DICOM .dcm
GE .7 (pfile)
UIH DICOM .dcm
Bruker 2dseq
Bruker fid
Varian fid
LCModel .RAW
jMRUI .txt
jMRUI .mrui
ASCII .txt
nat-forde commented 3 years ago

.dat (Siemens TWIX), .SPAR/SDAT (Philips) and .7 (GE) plus the accompanying dcm's is what we currently need

marcelzwiers commented 3 years ago

So you don't have MRS data in DICOM format, just in Twix format, right?

nat-forde commented 3 years ago

No, we have DICOMS too! Jill not give you those too?

marcelzwiers commented 3 years ago

No, I'm sure you have DICOM's but the MRS Series I only got them in non-DICOM format. Just to be sure, do you need to convert the DICOM-MRS images or do you always have Twix/SPAR etc data in conjunction?

nat-forde commented 3 years ago

Yeah there are DICOM's from the MRS series too. For the analysis we use I think only the Twix/SPAR etc is required but the DICOM's are potentially also needed for alternative approaches. So incorporating both would be the ideal.

marcelzwiers commented 3 years ago

Do you mean you have DICOMs and Twix data of the same series? In other words, if you convert both to nifti, wouldn't they be identical?

Op do 30 sep. 2021 om 09:56 schreef nat-forde @.***>:

Yeah there are DICOM's from the MRS series too. For the analysis we use I think only the Twix/SPAR etc is required but the DICOM's are potentially also needed for alternative approaches. So incorporating both would be the ideal.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/Donders-Institute/staff-scientists/issues/5#issuecomment-930968007, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADTUGLZBM7NW7CWDNAED3QLUEQJ25ANCNFSM5BIV4HAQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

marcelzwiers commented 3 years ago

I've got a first working version of my new spec2nii2bids plugin. It still needs more testing and tweaking, e.g. I couldn't find out how sex is encoded in the p-file (what's on a man's mind ;-)). I now have:

        sex = datasource.attributes('rhe_patsex')
        if   sex == 0: personals['sex'] = 'F'
        elif sex == 1: personals['sex'] = 'M'
        else:          personals['sex'] = 'O'

Can you perhaps ask the GE-people about this?

marcelzwiers commented 3 years ago

Ok, I was wrong, female = 2:

    elif dataformat=='Pfile' and sourcefile.name:
        sex = datasource.attributes('rhe_patsex')
        if   sex == '0': personals['sex'] = 'O'
        elif sex == '1': personals['sex'] = 'M'
        elif sex == '2': personals['sex'] = 'F'
nat-forde commented 3 years ago

Thanks Marcel! We'll try this out and get back to you!

marcelzwiers commented 3 years ago

Ok, I made a few commits and you can now test it out using module add bidscoin/dev

marcelzwiers commented 2 years ago

Is the MRS plugin working for all the groups?

nat-forde commented 2 years ago

Is the MRS plugin working for all the groups?

You mean the others sites? Unfortunately they are not quite as on top of converting and uploading their data so I'm not sure. We plan to give them a quick workshop on how to use bidscoiner and restructure for upload (our central database is not yet ready to handle bids [something to do with the pseudonymisation]) in the next couple of weeks. Locally it's all working well for both projects with MRS data. I will keep you posted on anything I hear from our other sites.