Skip to content

Conversation

@jan-petr
Copy link
Contributor

@jan-petr jan-petr commented Sep 1, 2021

Linked issue

#810

@jan-petr jan-petr self-assigned this Sep 1, 2021
@jan-petr jan-petr linked an issue Sep 1, 2021 that may be closed by this pull request
Copy link
Contributor

@MichaelStritt MichaelStritt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm... I partially get what you're doing there 😄
I can quickly test it on a dataset with varying modalities for the sessions like you described.
The question is, if we should note this in our changes.md or if we should create the same PR in the bids-matlab repo instead.

@MichaelStritt MichaelStritt added the bug Something isn't working label Sep 2, 2021
@MichaelStritt
Copy link
Contributor

Damn... I think there's still something wrong.

My multi-session test

Result in bugfix branch

The folders sub-001_1, sub-001_2, & sub-001_3 are there. In sub-001_1 there is only the asl, in sub-001_2 there is the asl and the flair, & in sub-001_3 there is only the asl again... 🤔

Within DCM2NII we seem to find the correct sessions & modalities:

Matching files:
    'sub-001/session_1_abc/ASL/S811203'
    'sub-001/session_1_abc/T1w/S811205'
    'sub-001/session_2_abc/ASL/S811203'
    'sub-001/session_2_abc/FLAIR/S811207'
    'sub-001/session_2_abc/T1w/S811205'
    'sub-001/session_3_abc/ASL/S811203'

@MichaelStritt MichaelStritt self-requested a review September 2, 2021 09:32
@MichaelStritt
Copy link
Contributor

@jan-petr

Test set-up

image

image

image

Test DCM2NII

Here everything seems to work fine. There are a few warnings about missing scans, but the results are perfectly fine.

image

image

image

image

image

Test NII2BIDS

Here it already seems to go wrong. The T1 images are missing.

image

image

image

image

image

Copy link
Contributor

@MichaelStritt MichaelStritt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a bit more user feedback and some cosmetics. For me everything seems to work fine. Can you check if you're okay with 26f08c3 ?

@HenkMutsaerts
Copy link
Member

HenkMutsaerts commented Sep 3, 2021

Looks good. My only question is why we set max sessions /visits to 0 by default, shouldn't this default to 1?

Also, i see that in your test case, you miss having a session with Anat but without ASL. I would test this as well.

@jan-petr
Copy link
Contributor Author

jan-petr commented Sep 3, 2021

Looks good. My only question is why we set max sessions /visits to 0 by default, shouldn't this default to 1?

nMaxVisits and nMaxSessions - not something we changed in this commit. And I can't find this parameter to be used/described anywhere else in the code. AFAIK, we can remove it completely - perhaps make an issue for that and do that in the next release (to be on the safe side).

Also, i see that in your test case, you miss having a session with Anat but without ASL. I would test this as well.

Yes. Not totally related, but doesn't hurt testing as well. @MichaelStritt - can you run your ADNI test again with a non-ASL session as well?

@HenkMutsaerts
Copy link
Member

HenkMutsaerts commented Sep 3, 2021

Looks good. My only question is why we set max sessions /visits to 0 by default, shouldn't this default to 1?

nMaxVisits and nMaxSessions - not something we changed in this commit. And I can't find this parameter to be used/described anywhere else in the code. AFAIK, we can remove it completely - perhaps make an issue for that and do that in the next release (to be on the safe side).

Also, i see that in your test case, you miss having a session with Anat but without ASL. I would test this as well.

Yes. Not totally related, but doesn't hurt testing as well. @MichaelStritt - can you run your ADNI test again with a non-ASL session as well?

nMaxVisits and nMaxSessions were added by Michael I believe in a commit in this PR.
"not totally related" -> I just noticed that Michael left out this test-case:)

Very happy otherwise. Most important thing is to keep stuff modular, the code should be as independent as pragmatically possible.

@jan-petr
Copy link
Contributor Author

jan-petr commented Sep 3, 2021

nMaxVisits and nMaxSessions were added by Michael I believe in a commit in this PR.

I think he just moved stuff around to a subfunction - he did not touch any functionality - just added checks and warnings. Can you confirm Michael - and then create an issue to 1.9.0 to remove the variables...

"not totally related" -> I just noticed that Michael left out this test-case:)

Yes - I agree, useful to check it to avoid future issues.

Very happy otherwise. Most important thing is to keep stuff modular, the code should be as independent as pragmatically possible.

Yes - agree!!

@jan-petr
Copy link
Contributor Author

jan-petr commented Sep 3, 2021

@HenkMutsaerts Can you approve? Because we don't plan changes, just Michael will test stuff and make a new issue...

@MichaelStritt
Copy link
Contributor

MichaelStritt commented Sep 3, 2021

Give me 10 more minutes, I've been improving the unit test this morning 😄

It contains a BIDS2Legacy test with 5 sessions now and a few other things have been improved.

I think he just moved stuff around to a subfunction - he did not touch any functionality - just added checks and warnings. Can you confirm Michael - and then create an issue to 1.9.0 to remove the variables...

Can confirm 👍

Edit: I can do the merge as soon as @HenkMutsaerts approves the PR 👍

Edit: Okay, added it to the release branch directly f1ababc . From my point of view everything is fine. Let's merge and do release testing 👍

@jan-petr
Copy link
Contributor Author

jan-petr commented Sep 3, 2021

Agree. Henk, please click the button. And we'll run the full-tests after merging everything (no risk with merging to release branch without all tests).

@MichaelStritt MichaelStritt force-pushed the bug-#810_BIDS2LegacyMultiSession branch from bdb5c2a to 9aa50ab Compare September 4, 2021 10:08
@MichaelStritt MichaelStritt merged commit 9aa50ab into release-1.8.0 Sep 4, 2021
@MichaelStritt MichaelStritt deleted the bug-#810_BIDS2LegacyMultiSession branch September 4, 2021 10:09
@MichaelStritt MichaelStritt removed the request for review from HenkMutsaerts September 4, 2021 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BIDS2Legacy incorrect conversion of multi-session data

4 participants