Skip to content
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

Automated flipping failed for Morphologist 2021 pipeline #152

Closed
Tracked by #133
YafanWu opened this issue Sep 26, 2023 · 5 comments
Closed
Tracked by #133

Automated flipping failed for Morphologist 2021 pipeline #152

YafanWu opened this issue Sep 26, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@YafanWu
Copy link

YafanWu commented Sep 26, 2023

When trying to allow flipping in the morphologist pipeline, the whole pipeline failed within seconds.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Morphologist 2021'
  2. Click on 'Image orientation handling'
  3. Tick the "allow flip initial MRI" box
  4. Run the pipeline

Screenshots
Screenshot from 2023-09-22 05-52-07

Environment:

  • Engine: [Singularity]
  • Version of BrainVISA [5.1.1]
  • System: Ubuntu 22.04.3

I'm attaching the nifti file I used below (please unzip before use). When using the same nifti file without allowing flipping, the morphologist pipeline gives inverted sulci recognition results, which was to recognise folds that should appear in the left hemisphere to be in the right side(and all wrong).

Thank you very much.
11003 (1).nii.zip

@YafanWu YafanWu added the bug Something isn't working label Sep 26, 2023
@denisri
Copy link
Contributor

denisri commented Sep 26, 2023

Hi,
I confirm the problem. I'll look at it soon.

denisri added a commit to brainvisa/morphologist-gpl that referenced this issue Sep 27, 2023
@denisri
Copy link
Contributor

denisri commented Sep 27, 2023

I have fixed the process.

  • update: as you are using a singularity image, it is read-only. You will need to copy the brainvisa installaton in a read-write filesystem. It is very easy to do but it will consume about 3 GB of extra disk space. To do so:

    • run <brainvisa_install_dir>/bin/bv (with no other argument): a graphical interface for configuration will show up.
    • in this interface, click on the button at "BrainVisa installation: read-only...", check the "install read-write" button and validate.
    • then the "install bugfix patches" button will become available. It will download patches from the web site.
  • However in this case the normalization using SPM, starting with an image in a completely different orientation, does not find out the correct orientation, and the result will still be wrong. You will need to use the manual procedure to correctly reorient the image:

    • un-check the "perform normalization" parameter in the main Morphologist pipeline
    • click AC/PC/IP and left hemisphere points by hand in Anatomist. The thing is that I have no idea where the left side actually is, since the image orientation is not known at all. You will have to get clues about this...
    • You can perform only this first image orientation step by un-selecting later steps in the pipeline
  • After the manual reorientation is done, you could restart completely the Morphologist pipeline using the automatic normalization if you wish to have a better normalization. This time the input image will be correctly oriented and the automatic pipeline should work.

@denisri
Copy link
Contributor

denisri commented Oct 6, 2023

Is the issue fixed ? Can we close the ticket ?

@YafanWu
Copy link
Author

YafanWu commented Oct 8, 2023

I have fixed the process.

  • update: as you are using a singularity image, it is read-only. You will need to copy the brainvisa installaton in a read-write filesystem. It is very easy to do but it will consume about 3 GB of extra disk space. To do so:

    • run <brainvisa_install_dir>/bin/bv (with no other argument): a graphical interface for configuration will show up.
    • in this interface, click on the button at "BrainVisa installation: read-only...", check the "install read-write" button and validate.
    • then the "install bugfix patches" button will become available. It will download patches from the web site.
  • However in this case the normalization using SPM, starting with an image in a completely different orientation, does not find out the correct orientation, and the result will still be wrong. You will need to use the manual procedure to correctly reorient the image:

    • un-check the "perform normalization" parameter in the main Morphologist pipeline
    • click AC/PC/IP and left hemisphere points by hand in Anatomist. The thing is that I have no idea where the left side actually is, since the image orientation is not known at all. You will have to get clues about this...
    • You can perform only this first image orientation step by un-selecting later steps in the pipeline
  • After the manual reorientation is done, you could restart completely the Morphologist pipeline using the automatic normalization if you wish to have a better normalization. This time the input image will be correctly oriented and the automatic pipeline should work.

Hi Denis,

Thank you very much for your help! I've successfully installed read-write version for 5.1.1, but It's a bit complicated with my developer version 5.4.8 as the read-write version couldn't be installed. Thanks for providing me with the guideline of manual labelling, working on them now, might take me a bit of time tho because my background isn't in neuroscience thus I'm also having trouble distinguishing the left side...

@denisri
Copy link
Contributor

denisri commented Oct 9, 2023

You are using a developer version ? I didn't know about that.
The read/write install is only for a user image, which is normally read-only. Developers build the programs from sources, so their install is always read/write. Normally the developer version does not propose the read/write installation because it is already read/write.
The 5.4.x developer images are not ready for use, they are test images for the future. They should not be visible from the web site, but I forgot to hide them and fixed that recently.
If you're not a developer, if possible, I'd suggest to stick with the user install (unless you really need a new feature, but we cannot afford to do support on the dev versions outside of the close developers team).

@denisri denisri closed this as completed Jun 13, 2024
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

No branches or pull requests

2 participants