Giter Site home page Giter Site logo

mesh2nifti's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mesh2nifti's Issues

running on windows?

Hi, thanks for this useful code!

I was wondering if it is possible to run this on windows? I am having issues with the install_simnibs_NCC.sh script.

Thank you!
Athena

Python error forming 3D struct

Hello,
This looks to be very useful, though I ran into an error while running it on this mesh file: https://iu.box.com/s/2n7l0cx1p1mdgl2zlbbhlx0wr380a9sj

Here's the error below, with much appreciation for what is probably a simple fix.
Thanks!


[cclab@torch simnibs_sim]$ msh2nifti -mesh almi5_001_tdcs_scalar_171009-194715_final.msh -t1 /data/hammer/space0/nidbs_pilot/simnibs/example/simnibs2.0_example/almi5_T1fs_conform.nii.gz -out /data/hammer/space0/nidbs_pilot/simnibs/example/simnibs2.0_example/test.nii.gz --verbose
Mesh File: almi5_001_tdcs_scalar_171009-194715_final.msh
T1 File: /data/hammer/space0/nidbs_pilot/simnibs/example/simnibs2.0_example/almi5_T1fs_conform.nii.gz
View: 2
Field: normE
Voxel Size: 1 mm^3
gmsh_numpy.py: Reading almi5_001_tdcs_scalar_171009-194715_final.msh in binary with 655656 nodes
0.181132078171 seconds to read $Nodes almi5_001_tdcs_scalar_171009-194715_final.msh
reading triangle block of 895574 triangles
reading triangle block of 3671308 tetrahedra
2.22894096375 seconds to read $EndElements almi5_001_tdcs_scalar_171009-194715_final.msh
6.48640298843 seconds to read almi5_001_tdcs_scalar_171009-194715_final.msh
Found 858200 relevant elements
Getting mesh data..
Applying inverse transform to Mesh coordinates..
min/max X coordinate: 61 195
min/max Y coordinate: 33 202
min/max Z coordinate: 65 183
Pre-mapping candidate elements for each voxel..
Voxelizing the Mesh at size 1mm^3
1%|? | 1/134 [00:01<03:24, 1.54s/it]
Traceback (most recent call last):
File "/usr/local/simnibs/fem_efield/msh2nifti", line 350, in
output_file=args.out, verbose=args.verbose)
File "/usr/local/simnibs/fem_efield/msh2nifti", line 291, in msh2nifti
data[x:(x+vox),y:(y+vox),z:(z+vox)] = gray_vals[cand_idx]
ValueError: could not broadcast input array from shape (3) into shape (1,1,1)
[cclab@torch simnibs_sim]$

mesh2nifti error

First of all, thanks a lot for making this function publically available! It works like a charm for most of my participants, in a few however I get an error when trying to create the grey matter images (see file attached). The mesh itself looks fine, btw. Any idea what could cause this and how to solve it? Best, Inge

foutmelding

Added pip install for nilearn and scikit-learn

Had to remove nibabel and nilearn from conda create at line 81 and added the following two lines at line 84:
$TARGET_DIR/miniconda2/envs/simnibs_env/bin/pip install nilearn
$TARGET_DIR/miniconda2/envs/simnibs_env/bin/pip install scikit-learn

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.