Coder Social home page Coder Social logo

Comments (5)

m-reuter avatar m-reuter commented on July 29, 2024

Hi @rafaloz , I haven't seen this error before. It looks like a bug in the code, that only happens in rare situations. For some reason one of those variables is not an array therefore should not be indexed.
If you add print statements and call the python file directly with the listed command it should print those values.
If you can share the inputs (not the image, just the insurf, aparc and cortex label) we could also try to debug this here.

from fastsurfer.

rafaloz avatar rafaloz commented on July 29, 2024

Hello @m-reuter, I have been trying to debug it myself but there are many things I do not understand about the whole pipeline so it is taking me a while. If you can help me I'll be very thankful! Here are the files:

10008A_brain.tar.gz

from fastsurfer.

m-reuter avatar m-reuter commented on July 29, 2024

Hi, I just ran this on my machine and it works (using dev, not sure if there have been any changes).

python3 smooth_aparc.py \         
    --insurf 10008A_brain/surf/rh.white.preaparc \
    --inaparc 10008A_brain/label/rh.aparc.DKTatlas.mapped.prefix.annot \
    --incort 10008A_brain/label/rh.cortex.label \
    --outaparc 10008A_brain/label/rh.aparc.DKTatlas.mapped.annot
Reading in surface: 10008A_brain/surf/rh.white.preaparc ...
Reading in annotation: 10008A_brain/label/rh.aparc.DKTatlas.mapped.prefix.annot ...
Reading in cortex label: 10008A_brain/label/rh.cortex.label ...
Non-cortex vertices with labels: 67
Fill Round: 1
rows: 881  reduced to 428
Fill Round: 2
rows: 453  reduced to 209
Fill Round: 3
rows: 244  reduced to 75
Fill Round: 4
rows: 169  reduced to 38
Fill Round: 5
rows: 131  reduced to 31
Fill Round: 6
rows: 100  reduced to 19
Fill Round: 7
rows: 81  reduced to 14
Fill Round: 8
rows: 67  reduced to 7
Fill Round: 9
rows: 60  reduced to 8
Fill Round: 10
rows: 52  reduced to 8
Fill Round: 11
rows: 44  reduced to 7
Fill Round: 12
rows: 37  reduced to 7
Fill Round: 13
rows: 30  reduced to 8
Fill Round: 14
rows: 22  reduced to 6
Fill Round: 15
rows: 16  reduced to 6
Fill Round: 16
rows: 10  reduced to 5
Fill Round: 17
rows: 5  reduced to 3
Fill Round: 18
rows: 2  reduced to 2
rows: 133486  reduced to 32026
rows: 133486  reduced to 15615
rows: 133486  reduced to 7644
Outputting fixed annot: 10008A_brain/label/rh.aparc.DKTatlas.mapped.annot

Things you can try:

  • run everything in our released docker image (to make sure you have the right dependencies installed, maybe there is a problem)
  • checkout our dev branch and use the smooth_aparc.py from there in case there were any changes.

from fastsurfer.

m-reuter avatar m-reuter commented on July 29, 2024

Also I tested with nibabel version 5.0.1, 5.1.0 and 5.2.1 and it worked with all of them.

from fastsurfer.

rafaloz avatar rafaloz commented on July 29, 2024

Hi @m-reuter, you are right, I reinstalled FastSurfer and is working flawlessly. Thanks for the help, sorry for the inconvenience.

from fastsurfer.

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.