Code Monkey home page Code Monkey logo

reponeurovis's People

Contributors

sidchop 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

Watchers

 avatar  avatar

reponeurovis's Issues

Example code for Visualise Region-level data (https://sidchop.shinyapps.io/braincodepy/) missing code

In an attempt to reproduce the below code, I found a line was missing to generate unique values in the first place. I've placed ** around it for you. Cheers

# e.g. pip install numpy brainspace surfplot neuromaps nibabel 

from surfplot import Plot
from brainspace.datasets import load_parcellation
from brainspace.mesh.mesh_io import read_surface
from neuromaps.datasets import fetch_fslr
import numpy as np

# Load the surface we want to use as the background
# Read in your own background surface {'.ply', '.vtp', '.vtk', '.fs', '.asc', '.gii'} 
surfaces = read_surface('./path/to/surface/file.gii.gz') 

# Or use one of the surface files included in the neuromaps package 
# Here we are using the 32k FsLR (a symmetric version 
# fsaverage space template with ~32k verticies in each hemisphere
surfaces = fetch_fslr()
lh, rh = surfaces['inflated']

# Next we want to load the parcellation/atlas we want to plot
# on the background surface. A parcellation is a array or surface file the same 
# length (number of vertices) as the background surface, with the same value  
# assigned to clusters of vertivies, representing discrete brain regions  
# We can either read in a surface file in FsLR space
atlas = read_surface('./path/to/surface/atlas/file.gii.gz') 

# Or use one of the surface files included in the brainspace package
atlas = load_parcellation('schaefer', 100, join = True)

# You can either plot this atlas directly, or assign new values 
# to each parcel to demonstrate an statistical effect. Here we assign a 
# random value between [0,1] to each unique parcel (excluding the medial wall [0])
**unique = np.unique(atlas)**
unique = unique[1:len(atlas)]
for i in range(unique.shape[0]):
	rd = np.random.uniform(low=0.0, high=1.0, size=1).round(3)
	atlas = np.where(atlas==unique[i], rd, atlas)

# Generate plot
p = Plot(lh, rh, views=['lateral','medial'], zoom=1.2)
p.add_layer(atlas, cbar=True, cmap='inferno')
p.build()```

Example code typos in web app

Hi,

Thanks for this tool!

For R code, region-level data, atlas_data = left_join(atlas,data)) has an extra ")". Also, ggplot2 needs to be imported as a library.

Best,
Steven

There is no result output after "p.build()" in "Visualise Vertex-level data"

Thank you for this nice tool! I would like to use it to plot surfaces, but I seem to have a slight problem while repeating the steps of the tutorial in "Visualise Vertex-level data".....

I ran the code on jupyter lab; There no output of figure after "p.build()", and the code is shown below:

from surfplot import Plot
from surfplot.datasets import load_example_data
from neuromaps.datasets import fetch_fslr
from brainspace.mesh.mesh_io import read_surface

surfaces = fetch_fslr()
lh, rh = surfaces['inflated']
effect = load_example_data(dataset = 'default_mode', join=True)

p = Plot(lh, rh, views=['lateral','medial','anterior', 'dorsal'], zoom=1.2)
p.add_layer(effect, cbar=True, cmap='inferno')
p.build()

running
noresult

Looking forward to getting your answer, thank you!

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.