Git Product home page Git Product logo

mica-mni / enigma Goto Github PK

View Code? Open in Web Editor NEW
116.0 116.0 26.0 135.1 MB

The ENIGMA Toolbox is an open-source repository for accessing 100+ ENIGMA statistical maps, visualizing cortical and subcortical surface data, and relating neuroimaging findings to micro- and macroscale brain organization. 🤠

Home Page: https://enigma-toolbox.readthedocs.io

License: BSD 3-Clause "New" or "Revised" License

MATLAB 47.22% Python 52.78%
analysis awesome connectomics enigma life-changing-magic mri multiscale multisite neuroimaging open-source straight-fire visualization workflows

enigma's People

Contributors

caseypaquola avatar codacy-badger avatar dependabot[bot] avatar kmrasmussen avatar mnoergaard avatar neuroimagingdatascience avatar saratheriver avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enigma's Issues

save picture as tiff format

Hi!
this is not an issue.
I'd like to save my figure in tiff format and I notice that there is a BSTIFFWriter class in your implementation. I check its definition and I don't think it can specifically save image objects as tiff file. is there a way to save your image object in tiff format?

Thanks
Lang

AttributeError: module 'numpy' has no attribute 'float'.

>>> from enigmatoolbox.datasets import load_summary_stats
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

i'm using the latest numpy 1.24.3 on python 3.10.10

ImportError: cannot import name 'VTK_UNICODE_STRING' from 'vtk.util.vtkConstants' when importing load_summary_stats

Hi

I am getting this import error ImportError: cannot import name 'VTK_UNICODE_STRING' from 'vtk.util.vtkConstants' when I try to import from enigmatoolbox.datasets import load_summary_stats

This happens in python 3.8 and python 3.9 on a linux ubuntu and linux redhat distros

It looks like VTK_UNICODE_STRING is depreciated (https://gitlab.kitware.com/vtk/vtk/-/issues/18327) and there is definitely no VTK_UNICODE_STRING in vtk.util.vtkConstants.

I can do everything I want to do by from vtk.util.vtkConstants import VTK_STRING#, VTK_UNICODE_STRING in the vtk.wrappers.utils file and was going to issue a pull request however saw this then effects the is_vtk_string() function in that file which seems to be used all over vtk.interface and my pull request would probably break everything.

Thanks

embed_nb for plot_cortical

Hi @saratheriver,

I'm attempting to do some fairly simple visualization (for testing purposes) using my own data. I've attempted to use plot_cortical inside of Jupyter notebook but receive an error (see below). I have no problem with exporting to a file.

Call:

plot_cortical(array_name=CT_schaefer_fsa5, surface_name="fsa5", cmap = 'viridis', embed_nb = True)

Error:

TypeError                                 Traceback (most recent call last)
Cell In[19], line 8
      5 CT_schaefer_fsa5 = parcel_to_surface(CT_schaefer_200, 'schaefer_200_fsa5')
      7 # Project the results on the surface brain
----> 8 plot_cortical(array_name=CT_schaefer_fsa5, surface_name="fsa5", cmap = 'viridis', embed_nb = True)

File ~\.conda\envs\brainstat\lib\site-packages\enigmatoolbox\vtk_interface\decorators.py:41, in wrap_input.<locals>._wrapper_decorator.<locals>._wrapper_wrap(*args, **kwds)
     38 @functools.wraps(func)
     39 def _wrapper_wrap(*args, **kwds):
     40     args, kwds = _wrap_input_data(args, kwds, *xargs, skip=skip)
---> 41     data = func(*args, **kwds)
     42     return data

File ~\.conda\envs\brainstat\lib\site-packages\enigmatoolbox\plotting\surface_plotting.py:528, in plot_cortical(array_name, surface_name, color_bar, color_range, label_text, cmap, nan_color, zoom, background, size, interactive, embed_nb, screenshot, filename, scale, transparent_bg, **kwargs)
    526 kwds = {'view': view, 'share': 'r'}
    527 kwds.update(kwargs)
--> 528 return plot_surf(surfs, layout, array_name=array_name, color_bar=color_bar,
    529                  color_range=color_range, label_text=label_text, cmap=cmap,
    530                  nan_color=nan_color, zoom=zoom, background=background,
    531                  size=size, interactive=interactive, embed_nb=embed_nb,
    532                  screenshot=screenshot, filename=filename, scale=scale,
    533                  transparent_bg=transparent_bg, **kwds)

File ~\.conda\envs\brainstat\lib\site-packages\enigmatoolbox\plotting\surface_plotting.py:419, in plot_surf(surfs, layout, array_name, view, color_bar, color_range, share, label_text, cmap, nan_color, zoom, background, size, embed_nb, interactive, scale, transparent_bg, screenshot, filename, return_plotter, **kwargs)
    415 if screenshot:
    416     return p.screenshot(filename, transparent_bg=transparent_bg,
    417                         scale=scale)
--> 419 return p.show(embed_nb=embed_nb, interactive=interactive, scale=scale,
    420               transparent_bg=transparent_bg)

File ~\.conda\envs\brainstat\lib\site-packages\enigmatoolbox\plotting\base.py:308, in Plotter.show(self, embed_nb, interactive, transparent_bg, scale)
    306     if interactive:
    307         return self.to_panel(scale)
--> 308     return self.to_notebook(transparent_bg, scale)
    310 else:
    312     self._check_closed()

File ~\.conda\envs\brainstat\lib\site-packages\enigmatoolbox\plotting\base.py:413, in Plotter.to_notebook(self, transparent_bg, scale)
    411 writer = BSPNGWriter(writeToMemory=True)
    412 result = serial_connect(wimg, writer, as_data=False).result
--> 413 data = memoryview(result).tobytes()
    414 from IPython.display import Image
    415 return Image(data)

TypeError: memoryview: a bytes-like object is required, not 'BSVTKObjectWrapper'

What am I missing about the use of the embed_nb flag?

adding titles for various plotting features

Hi @saratheriver and team! Thank you for making this toolbox - the functionality and scope of it are really impressive. I have a probably very dumb question but have not been able to figure it out on my own. I have been playing around with some of the plotting functions, e.g. plot_cortical, and I cannot seem to figure out if it is possible to add a title to the plots. The documentation and examples show plots with a beautiful standardized font and titles, but the corresponding code blocks do not seem to include the addition of titles. I looked into the plotter functionality underlying plot_cortical and related functions, and I am wondering if I have to pass a title to *kwargs, and if so, how to do that. I would appreciate any guidance here :)

subcortical plotting with 2D array

Hi, firstly thanks so much for making this great toolbox!

I'm having an issue plotting multiple subcortical maps at once (ie. plotting each row of an array on a different row in the figure). I've done the same with cortical data and it works no problem, so I'm wondering if it's a bug in the code. My command is below, where subcortical_arr is a numpy array of shape (5,14):

plot_subcortical(array_name=subcortical_arr, ventricles=False, size=(800, 400), color_bar=True,
                 interactive=False, embed_nb=True, color_range=(0.2, 0.8))

I get this error message:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Input In [53], in <cell line: 1>()
----> 1 plot_subcortical(array_name=subcortical_arr, ventricles=False, size=(800, 400), color_bar=True,
      2                  interactive=False, embed_nb=True, color_range=(0.2, 0.8))

File /opt/miniconda3/lib/python3.9/site-packages/enigmatoolbox-2.0.2-py3.9.egg/enigmatoolbox/plotting/surface_plotting.py:640, in plot_subcortical(array_name, ventricles, color_bar, color_range, label_text, cmap, nan_color, zoom, background, size, interactive, embed_nb, screenshot, filename, scale, transparent_bg, **kwargs)
    638 for an in array_name:
    639     if isinstance(an, np.ndarray):
--> 640         name = surf_lh.append_array(an[:n_pts_lh], at='p')
    641         surf_rh.append_array(an[n_pts_lh:], name=name, at='p')
    642         array_name2.append(name)

File /opt/miniconda3/lib/python3.9/site-packages/enigmatoolbox-2.0.2-py3.9.egg/enigmatoolbox/vtk_interface/wrappers/data_object.py:213, in BSDataSet.append_array(self, array, name, at, convert_bool, overwrite)
    210         raise ValueError('Array shape is not valid.')
    212 if at in ['point', 'p']:
--> 213     _array_overwrite(self.PointData, to_point)
    214 elif at in ['cell', 'c']:
    215     _array_overwrite(self.CellData, to_cell)

File /opt/miniconda3/lib/python3.9/site-packages/enigmatoolbox-2.0.2-py3.9.egg/enigmatoolbox/vtk_interface/wrappers/data_object.py:210, in BSDataSet.append_array.<locals>._array_overwrite(attributes, has_same_shape)
    207         warnings.warn('Array was not appended. Array name already '
    208                       'exists.')
    209 else:
--> 210     raise ValueError('Array shape is not valid.')

ValueError: Array shape is not valid.

Any help would be much appreciated, thanks!

About the Connectivity Data in the ENIGMA Toolbox

Hi @saratheriver,

Recently, I used the functional and structural connectivity data provided by the useful toolbox for exploring the relationship between brain function and structure, also the effect caused by using different parcellations. However, the Glasser_360 and Schaefer templates are both partitioned to some extent based on functional information. I trying to introduce 'Brainneome Atlas', which is generated using structural information for further comparison.

So, I wonder if you can add the functional and structural connectivity data generated with Brainnetome Atlas into ENIGMA Toolbox, or provide the detailed parameters and subject list of HCP used for generating the connectivity data, especially regarding the DTI data processing? If there is a publicly available code, it would be even better.

Thanks a lot!

Matching data to expected label order for plotting

Greetings,

I have some external data I would like to plot onto the surface with the ENIGMA toolbox. I have the data and know which value corresponds to what region with respect to the DK atlas (68 regions). However, I do not know what order the plotting function expects for the values (i.e., which index corresponds to what label). Where can I find the set of atlas labels that ENIGMA expects the data to match in order?

Thank you.

environment setup for using enigmatoolbox.plotting.plot_cortical?

When trying to use the plot_cortical function on my linux machine, it was not working. It seems that some setup is necessary.
I tried to install opengl libs, but it's still not working. Do you have any suggestions on this issue? Thanks.

2022-06-17 21:38:19.158 ( 5.660s) [ 83139740]vtkOpenGLRenderWindow.c:483 ERR| vtkXOpenGLRenderWindow (0x55e18f3aa470): Unable to find a valid OpenGL 3.2 or later implementation. Please update your video card driver to the latest version. If you are using Mesa please make sure you have version 11.2 or later and make sure your driver in Mesa supports OpenGL 3.2 such as llvmpipe or openswr. If you are on windows and using Microsoft remote desktop note that it only supports OpenGL 3.2 with nvidia quadro cards. You can use other remoting software such as nomachine to avoid this issue.
2022-06-17 21:38:19.158 ( 5.661s) [ 83139740] vtkOpenGLState.cxx:1785 WARN| Hardware does not support the number of textures defined.
2022-06-17 21:38:19.158 ( 5.661s) [ 83139740] vtkOpenGLState.cxx:1785 WARN| Hardware does not support the number of textures defined.
2022-06-17 21:38:19.160 ( 5.662s) [ 83139740] vtkOpenGLState.cxx:1785 WARN| Hardware does not support the number of textures defined.
2022-06-17 21:38:19.160 ( 5.663s) [ 83139740] vtkOpenGLState.cxx:1785 WARN| Hardware does not support the number of textures defined.
2022-06-17 21:38:19.160 ( 5.663s) [ 83139740] vtkOpenGLState.cxx:1785 WARN| Hardware does not support the number of textures defined.
2022-06-17 21:38:19.161 ( 5.664s) [ 83139740] vtkOpenGLState.cxx:1785 WARN| Hardware does not support the number of textures defined.
2022-06-17 21:38:19.161 ( 5.664s) [ 83139740] vtkOpenGLState.cxx:1785 WARN| Hardware does not support the number of textures defined.
2022-06-17 21:38:19.166 ( 5.668s) [ 83139740] vtkOpenGLState.cxx:1785 WARN| Hardware does not support the number of textures defined.
2022-06-17 21:38:19.166 ( 5.668s) [ 83139740] vtkOpenGLState.cxx:1785 WARN| Hardware does not support the number of textures defined.
2022-06-17 21:38:19.166 ( 5.668s) [ 83139740] vtkOpenGLState.cxx:1785 WARN| Hardware does not support the number of textures defined.
2022-06-17 21:38:19.167 ( 5.669s) [ 83139740] vtkShaderProgram.cxx:437 ERR| vtkShaderProgram (0x55e18feed780): 1: #version 150
2: #ifndef GL_ES
3: #define highp
4: #define mediump
5: #define lowp
6: #endif // GL_ES
7: #define attribute in
8: #define varying out
9:
10:
11: /=========================================================================
12:
13: Program: Visualization Toolkit
14: Module: vtkPolyDataVS.glsl
15:
16: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
17: All rights reserved.
18: See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
19:
20: This software is distributed WITHOUT ANY WARRANTY; without even
21: the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
22: PURPOSE. See the above copyright notice for more information.
23:
24: =========================================================================
/
25:
26: in vec4 vertexMC;
27:
28:
29:
30: // frag position in VC
31: out vec4 vertexVCVSOutput;
32:
33: // optional normal declaration
34: //VTK::Normal::Dec
35: in vec3 normalMC;
36: uniform mat3 normalMatrix;
37: out vec3 normalVCVSOutput;
38:
39: // extra lighting parameters
40: //VTK::Light::Dec
41:
42: // Texture coordinates
43: in vec2 tcoord;
44: out vec2 tcoordVCVSOutput;
45:
46:
47: // material property values
48: //VTK::Color::Dec
49:
50: // clipping plane vars
51: //VTK::Clip::Dec
52:
53: // camera and actor matrix values
54: uniform mat4 MCDCMatrix;
55: uniform mat4 MCVCMatrix;
56:
57: // Apple Bug
58: //VTK::PrimID::Dec
59:
60: // Value raster
61: //VTK::ValuePass::Dec
62:
63: // picking support
64: //VTK::Picking::Dec
65:
66: void main()
67: {
68: //VTK::CustomBegin::Impl
69:
70: //VTK::Color::Impl
71:
72: normalVCVSOutput = normalMatrix * normalMC;
73: //VTK::Normal::Impl
74:
75: tcoordVCVSOutput = tcoord;
76:
77:
78: //VTK::Clip::Impl
79:
80: //VTK::PrimID::Impl
81:
82: vertexVCVSOutput = MCVCMatrix * vertexMC;
83: gl_Position = MCDCMatrix * vertexMC;
84:
85:
86: //VTK::ValuePass::Impl
87:
88: //VTK::Light::Impl
89:
90: //VTK::Picking::Impl
91:
92: //VTK::CustomEnd::Impl
93: }

2022-06-17 21:38:19.167 ( 5.669s) [ 83139740] vtkShaderProgram.cxx:438 ERR| vtkShaderProgram (0x55e18feed780): 0:1(10): error: GLSL 1.50 is not supported. Supported versions are: 1.10, 1.20, 1.00 ES, and 3.00 ES

surface_to_parcel ROI labels

Hi @saratheriver

Can you clarify something for me? I was using my own data and following the examples for surface_to_parcel using aparc_fsa5. The output I get from that has 71 values whereas I would expect 68 parcels. Likewise schaefer_100_fsa5 has 101, rather than 100.

I assume the first value to be unparcellated areas (label = 0), but for aparc_fsa5, what are the extra 2 values and are they on the front end or back end of the data? Would it be possible for surface_to_parcel to have the ROI label names for export to CSV?

Obtaining Cohen's D for cortical thickness

Hi Enigma team,

I am trying to apply to my data a pipeline that had been previously used to analyse results from the Enigma dataset. There, the authors used already processed data from Enigma using the parcellated cortical thickness data across 68 regions from the DK atlas. They used the cortical thickness of patients vs controls)

In my dataset, I have obtained the ROI-specific cortical thickness data for each subject, and I have the demographics too. Now I would like to obtain Cohen's d for the patients vs controls also adjusting for covariates (age/sex/site etc...). I have been able to obtain from enigma Cohen's D in Enigma, but I have been unable to find out how these were obtained, and particularly how could I get these after adjusting for confounders.

Would it be possible to share these methods?

Many thanks,

Best regards,

Carlos

Addition of DK-114 parcellation

Dear enigma toolbox team,

First of all, congratulations on such a cool and useful toolbox. Taking advantage of your kind offer about adding new parcellations to the toolbox, would it be possible to add the Desikan-Killiany atlas 114 ROIs (DK-114) parcellation to the enigma toolbox? (commonly used by van den Heuvel group publications, e.g. https://doi.org/10.1093/brain/awz330)

Best,

Gabriel

conte69_164k to conte69_32k

Hi Sara,
would it be possible to add the conversion from data in conte69_164k to conte69_32k?
Best,
Gabriel

Unable to run the example scripts

Hi,

I'm trying to plot subcortical regions with your example data -or with random data shaped like (1, 16).

import numpy as np
from enigmatoolbox.datasets import load_example_data

# Load all example data from an individual site
cov, metr1_SubVol, metr2_CortThick, metr3_CortSurf = load_example_data()

from enigmatoolbox.utils.useful import reorder_sctx

# Re-order the subcortical data alphabetically and by hemisphere
metr1_SubVol_r = reorder_sctx(metr1_SubVol)

metr1_SubVol_r.iloc[0, 2:].to_numpy()
# this np array has a shape of (1, 16) 

from enigmatoolbox.plotting import plot_subcortical

plot_subcortical(
    # ventricles=False,
    array_name=metr1_SubVol_r.iloc[0, 2:].to_numpy(),
    cmap='RdBu_r', color_bar=True, color_range=(-0.5, 0.5),
)

I'm having python 3.8 on mac M1 processor. installed vtk==9.1.0 via pip. getting many errors:

2022-08-08 09:51:01.378 (  64.234s) [          32FB66] vtkPythonAlgorithm.cxx:112    ERR| vtkPythonAlgorithm (0x600001c18820): Failure when calling method: "ProcessRequest":

ValueError: Input port 1 of ''vtkTriangleFilter'' does not accept multiple connections.

2022-08-08 09:51:01.490 (  64.346s) [          32FB66]       vtkExecutive.cxx:753    ERR| vtkCompositeDataPipeline (0x600001430000): Algorithm vtkPythonAlgorithm(0x600001c18820) returned failure for request: vtkInformation (0x600003834e80)

Debug: Off
  Modified Time: 195
  Reference Count: 2
  Registered Events: (none)
  Request: REQUEST_DATA
  FROM_OUTPUT_PORT: 0
  ALGORITHM_AFTER_FORWARD: 1
  FORWARD_DIRECTION: 0

ValueError: Input port 1 of ''vtkTriangleFilter'' does not accept multiple connections.

Finally, it throws ValueError: Array shape is not valid. though I checked the array_name in the code which needs to be (1, 16) or (1, 14) ordered.. Any thoughts?

Enigma sleep?

Hi Sara and Boris,

very cool toolbox and excellent use of emoticons! I was just browsing around. Let me know if you are also interested in Enigma sleep. I am sort of involved there and possibly sleep has also a lot of relationships with the other working group disorders.

cheers,
Sofie

More surface to plot visualization

The visualiztion of surface in enigma toolbox is so beautiful and convenient.
However, the surfaces in it are just two: the pial of fsa and conte69. How could I do if I want to add a inflated surface to plot?

Parcellation

Hi,

Currently trying to complete the Vertexwise → parcellated data

I just want to confirm that the ENIGMA toolbox can indeed take freesurfer table outputs from aparc_stats? I've obtained thickness values for lh (34) and rh (34) into txt formats. Not sure if ENIGMA is able to map these values onto atlas?

Getting this error:

CT_schaefer_200 = surface_to_parcel(CT, 'aparc_fsa5')
The logical indices in position 2 contain a true value outside of the array bounds.

Error in surface_to_parcel (line 31)
surf2parcel(:, ii) = nanmean(surf_data(:, label_vector == thisparcel), 2);

CT looks like the following :
CT =

Columns 1 through 15
2.5700 2.3310 2.2130 1.9630 3.2860 2.7520 2.2920 2.7030 2.0360 2.1370 2.3080 2.0430 2.2780 2.6820 2.6050
Columns 16 through 30
2.2320 2.4320 2.3020 2.2680 1.7770 2.0400 2.1910 2.3720 2.2140 2.3880 2.1750 2.2760 2.1000 2.7060 2.3550
Columns 31 through 45
2.2690 3.4880 2.3270 2.6600 2.4280 2.4940 2.2360 2.2080 3.6770 2.7530 2.2590 2.6610 2.0990 2.2480 2.4490
Columns 46 through 60
2.1280 2.3300 2.6960 2.7750 2.2880 2.4240 2.5230 2.2940 1.8560 2.1740 2.2920 2.3980 2.1880 2.5320 2.2450
Columns 61 through 68
2.3160 2.1050 2.7430 2.4480 2.3960 3.5600 2.5450 2.5090

Unable to coerce Matrix: zscore_matrix

Hi ENIGMA-TOOLBOX team,
Thanks for doing such a great job putting this together.

This isn't really a support issue as much as a cry for help...

I'm trying to use the toolbox to load some of my own cortical and subcortical data, z-score it and display it. I'm following the same format as the example data with the following parameters:

print(cov.shape) print(metr1_SubVol_r.shape) print(metr2_CortThick.shape) print(metr3_CortSurf.shape) (159, 10) (159, 18) (159, 74) (159, 74)

I can reverse and re-order the subcortical volumes file, then use the SV_z = zscore_matrix(metr1_SubVol_r.iloc[:, 1:-1], group, controlCode). When I try and make a zscore matrix for my two CortThick and CortSurf CT_z = zscore_matrix(metr2_CortThick.iloc[:, 1:-1], group, controlCode) and CT_z = zscore_matrix(metr2_CortThick.iloc[:, 1:-1], group, controlCode)

I get an error with my dataframe:

raise ValueError( "Unable to coerce to DataFrame, shape " f"must be {left.shape}: given {right.shape}" ValueError: Unable to coerce to DataFrame, shape must be (159, 72): given (159, 70)

Can anyone see what I am doing wrong here? Could it be something is amiss with the csv I am uploading?

Super grateful for any pointers.

Conor

Question about the function load_sc in enigma toolbox

Hi, thank you for providing the efficient toolbox.
Recently, I checked the Structural Connectivity data return by load_sc, but I found the values in the matrix have negative ones with the parcellation ['schaefer_100', 'schaefer_200', 'schaefer_300', 'schaefer_400', 'glasser_360'], except 'aparc'. Are these negative values normal?

AttributeError: module 'numpy' has no attribute 'float' when importing

Hi,

I am having the following error when importing datasets:

(...)

File C:\ProgramData\Miniconda3\lib\site-packages\enigmatoolbox\mesh\mesh_elements.py:623
    dtype=np.float):

  File C:\ProgramData\Miniconda3\lib\site-packages\numpy\__init__.py:305 in __getattr__
    raise AttributeError(__former_attrs__[attr])

AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

I guess the fix is as easy as change 'np.float' to 'float' in mesh_elements.py:623, but not sure

Create Surface Visualizations for Other Kinds of Atlases?

Hi!

Does anyone know if it's possible to create surface visualizations for other kinds of atlases (such as AAL)? In other words, is there a way for me to input a custom atlas?

I'm interested in creating a Z-score map using AAL as an atlas

The interpolation method of surface mapping [how to change to nearest method]

When I draw a atlas in enigmatoolbox, the color of parcellations' edge will be strange, as follows:

image

I guess it is due to the interpolation before the image rendering, but I can't find how to change the method in the code. I am not familar with the VTK, it seems a difficult task for me. So, would you please help me to solve this problem? Thank you!

A question about vector images for plot_cortical function

Hi,

thank you so much for creating an incredible brain visualization tool that allows us to see very clearly the connections between molecules or genes and each brain region.

However, when I use the plot_cortical function in python, I found a problem, that is how can I use the plot_cortical or plot_subcortical functions to generate cortical and subcortical images that are exported as editable vectors or 3D images? I would appreciate it if you could answer my question.

Spin Permutation Test

Hello, I ran spin permutation tests with the example data set provided and got this error:

~/.local/lib/python3.8/site-packages/enigmatoolbox/permutation_testing/permutation_testing.py in perm_sphere_p(x, y, perm_id, corr_type, null_dist)
264 y_perm2 =[]
265 for ii in range(nroi):
--> 266 x_perm2 = np.append(x_perm2, x[int(perm_id[ii, rr])])
267 y_perm2 = np.append(y_perm2, y[int(perm_id[ii, rr])])
268 x_perm = np.vstack((x_perm, x_perm2))

IndexError: index 69 is out of bounds for axis 0 with size 68

bug report about the version 1.1.3

In vtk_interface/pipeline.py
About line 61:
when add_conn is False, the isinstance(add_conn,int) will return True, because it can't discriminate "bool" and "int".
And I don't if there is any other problems such as above.

In 1.1.1 ,there is if add_conn is True or type(add_conn) == int , it works!

ENIGMA toolbox chop.m script not working

Hi Sara

The chop.m script seems to be corrupted in some way. I tried to characterize the cohen's d effect size with different vEco classes and received this error:

% Stratify cortical atrophy based on Economo-Koskinas classes
class_mean = economo_koskinas_spider(CT_d, 'axis_range', [-0.4 0])
1 x 2 files to read, % remaining: 100 Done

axis_range =

-0.3508 -0.2581
-0.3508 -0.2581
-0.3508 -0.2581
-0.3508 -0.2581
-0.3508 -0.2581

Attempt to execute SCRIPT chop as a function:
C:...\ENIGMA-1.1.0\matlab\shared\useful\chop.m

Error in economo_koskinas_spider (line 149)
num2str(chop(in.axis_range(ii,1) +
newinc(jj)*diff(in.axis_range(ii,:)),2)), ...

Thanks a lot,
Matthias

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.