mattcieslak / mittens Goto Github PK
View Code? Open in Web Editor NEWA Python library for Analytic Tractography
License: BSD 2-Clause "Simplified" License
A Python library for Analytic Tractography
License: BSD 2-Clause "Simplified" License
mitns = MITTENS(input_fib="HCP.src.gz.odf8.f5rec.fy.gqi.1.25.fib.gz")
should be
mitns = MITTENS(reconstruction="HCP.src.gz.odf8.f5rec.fy.gqi.1.25.fib.gz")
Please,
I'm trying to create a VoxelGraph graph, but I got an error creating the MITTEN object:
mitns = MITTENS(reconstruction="sub-01_dwi_merged.src.gz.odf.gqi.1.25.fib.gz")
Unable to load real affine image
My fib.gz file is an ouput of the preprocessing with QSIPREP: https://qsiprep.readthedocs.io/en/latest/index.html
Anny suggestion how to fix this problem? Am I using the wrong gqi file?
Thank you.
Hello! I am trying to use MITTENS and running into a number of errors.
I successfully converted the Dockerfile into Singularity and attempted it to build it. It ran into issues with cmake (I think, the errors were quite long) and did not complete set up. So I am running it locally on an Ubuntu server (20.04.5 LTS).
I am using Python 3.10, so I updated the now-depreciated numpy functions accordingly (np.float -> np.float64). After updating numpy functions and installing dependencies, I attempted to run the setup.py file. This did not run, due to errors with distutils/numpy.distutils. I wasn't sure if running this file was necessary, so I then tried to run the code in the readme.
from mittens import MITTENS
mitns = MITTENS(reconstruction="subj-id_dwi.odf.gqi.1.25.fib.gz")
This returns the error:
ModuleNotFoundError: No module named 'mittens.fortran'
I decided to try running this code first, since it creates Fortran files:
from mittens.write_solution import write_solution
write_solution("odf8", 35, 1.0)
First, there is no function write_solution
in mittens/write_solution.py. I assume you meant write_files
? When I run this with write_files
, I get back this error:
compatible_indices = np.array([np.flatnonzero(r) for r in compatible_angles])
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (642,) + inhomogeneous part.
Let me know if I can provide any additional details. Thanks so much.
Hi,
in the "get_transition_analysis_matrices" method inside utils. py , shouldn't the odf_vertices variable be transposed to compute the pairwise distances?
The edges probabilities in the graph doesn't match the dsi-studio output and in general the diffusion data.
Thank you
get rid of these calls and make them consistent. error is in backprop_prob_ratio_map
When following the README example, calling voxel_graph.build_atlas_graph() results in the following error message:
*** AttributeError: module 'networkit.graph' has no attribute 'Dijkstra'
Dear @mattcieslak,
In my Ubuntu 20.04 I can't install MITTENS. I got the following error:
$ cd MITTENS
$ pip install -e .
error: extension 'mittens.fortran.singleODF_odf8_ss0_87_am35' has Fortran sources but no Fortran compiler found
Using colab I could install:
!pip install -e drive/MyDrive/Research/ShortestPathTools/MITTENS
ps: here, MITTENS is inside ShortestPatthTools folder, but I have tried with MITTENS in another locations;
Obtaining file:///content/drive/MyDrive/Research/ShortestPathTools/MITTENS
Requirement already satisfied: numpy in /usr/local/lib/python3.7/dist-packages (from mittens==0.0.0) (1.19.5)
Requirement already satisfied: scikit-learn in /usr/local/lib/python3.7/dist-packages (from mittens==0.0.0) (0.22.2.post1)
Requirement already satisfied: tqdm in /usr/local/lib/python3.7/dist-packages (from mittens==0.0.0) (4.41.1)
Collecting networkit
Downloading https://files.pythonhosted.org/packages/58/7a/4ef04f2b34fc81c5f2a5060b5cb989509f847d8aa6e359899922acffacf8/networkit-8.1.tar.gz (3.1MB)
|████████████████████████████████| 3.1MB 8.0MB/s
Requirement already satisfied: nibabel in /usr/local/lib/python3.7/dist-packages (from mittens==0.0.0) (3.0.2)
Collecting dipy
Downloading https://files.pythonhosted.org/packages/50/50/0b97f4ecf9b02170c4967053c34a0c08373e538295c119aadffe8d5ff235/dipy-1.4.1-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (7.7MB)
|████████████████████████████████| 7.7MB 12.9MB/s
Requirement already satisfied: joblib>=0.11 in /usr/local/lib/python3.7/dist-packages (from scikit-learn->mittens==0.0.0) (1.0.1)
Requirement already satisfied: scipy>=0.17.0 in /usr/local/lib/python3.7/dist-packages (from scikit-learn->mittens==0.0.0) (1.4.1)
Requirement already satisfied: h5py>=2.5.0 in /usr/local/lib/python3.7/dist-packages (from dipy->mittens==0.0.0) (3.1.0)
Requirement already satisfied: cached-property; python_version < "3.8" in /usr/local/lib/python3.7/dist-packages (from h5py>=2.5.0->dipy->mittens==0.0.0) (1.5.2)
Building wheels for collected packages: networkit
Building wheel for networkit (setup.py) ... done
Created wheel for networkit: filename=networkit-8.1-cp37-cp37m-linux_x86_64.whl size=8069839 sha256=00570305f6cfee426bf6b50057cc1b4884324b0a66f13be0b79000f0134c6921
Stored in directory: /root/.cache/pip/wheels/25/7e/59/6b58f6984b823663f6d01266ecb0306ce3d74d040acd27a818
Successfully built networkit
Installing collected packages: networkit, dipy, mittens
Running setup.py develop for mittens
Successfully installed dipy-1.4.1 mittens networkit-8.1
Bu I can't import mittens:
from mittens import MITTENS
ModuleNotFoundError Traceback (most recent call last)
in ()
----> 1 from mittens import MITTENS
ModuleNotFoundError: No module named 'mittens'
My goal is to build a voxel graph to use with ShortestPathTool.
Thank you in advance.
Eduardo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.