MIC-DKFZ / TractSeg

Automatic White Matter Bundle Segmentation
Apache License 2.0
227 stars 76 forks source link

Problem Generating 3D Plots #276

Open xtian26 opened 2 months ago

xtian26 commented 2 months ago

Thank you for the great work you put into TractSeg.

I was running plot_tractometry_results and I am able to produce the graphs where significant difference among subjects are along the tract.

I want to see it on a 3d plot so I tried it but it returns the following error: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (1000,) + inhomogeneous part.

I registered my images to MNI space as suggested in the documentation. I also tried changing the number of fibers, but it won't still work and would return the error. Any help would be greatly appreciated. Thanks!

image

FHannan-UWO commented 1 month ago

Were you able to find a solution to this problem? I am getting the same issue

xtian26 commented 3 weeks ago

Hi! I was able to resolve this in a surprising way. I am running the plot_tractometry_results in an Ubuntu 24.04 LTS.

1 thing I can remember I did was updating the dependencies, viz: Numpy: 1.23.5 Scipy: 1.11.4 Fury: 0.11.0

This was not working in a terminal at first. I tried to open my script(automating the writing of the text file for tractometry results) and tried running the code from the terminal in Visual Studio. It worked and suddenly it was also working for my terminal.

I'll try to look into it and will add details to this. Thanks!

On Sun, Sep 22, 2024 at 8:29 AM FHannan-UWO @.***> wrote:

Were you able to find a solution to this problem? I am getting the same issue

— Reply to this email directly, view it on GitHub https://github.com/MIC-DKFZ/TractSeg/issues/276#issuecomment-2365311154, or unsubscribe https://github.com/notifications/unsubscribe-auth/BKHH2QDT3DSRK7MY3QXWVH3ZXXJKBAVCNFSM6AAAAABLYD3HYOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRVGMYTCMJVGQ . You are receiving this because you authored the thread.Message ID: @.***>

andy1764 commented 2 weeks ago

Thanks for sharing, this was super helpful for my debugging. It turns out the --plot-3D metric flag no longer works for newer version of numpy. I downgraded from 1.26.4 to 1.23.5 and I was able to output the 3D plots. Appreciate the amazing work by the devs and this useful thread!