Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
Plotting brain regions of interest (ROI) for demonstration purposes in Python
Have you ever wanted to plot a region of the brain to include in a talk or presentation? What about in a lecture? Some might arbitrarily highlight the area of the cortex in which they think a particular region might fall. Others might scour the internet for images. Well...you won't need to do that any more. With roipy
, you can plot exact regions of the brain using the Destrieux Atlas.
This package is hosted on PyPi. You may use pip
to install.
pip install roipy
There are three types of brain plots included in roipy
. A "univariate" plot, a "multivariate" plot and a "whole brain multivariate" plot. There are two methods for generating each plot:
roipy.plotting.Plot()
roipy.utils.plot_multivariate()
)Below is an example of each methods implementation.
# import
from roipy.plotting import Plot
from roipy.utils import plot_multivariate
# Domain general Plot()
P = Plot()
P.plot_multivariate(roi=[1,3,5,34], cmap='viridis')
#Individual function
plot_multivariate(roi=[1,3,5,34], shape='pial', view='lateral', hemi='left', cmap='viridis')
# Save the plot
import matplotlib.pyplot as plt
plt.savefig('brain.png')
The parameter roi
is given a list of integers which correspond to the Destrieux surface atlas.
You can also animate the plots with roipy.animation.Anim()
.
# import
from roipy.animation import Anim
from roipy.plotting import Plot
# Plot() instance
P = Plot()
# Anim() instance
A = Anim()
a.animate(lambda frame: P.plot_multivariate(roi=[1,3,5,34], cmap='viridis'), fname='brain.gif', save=True)
Admittedly, this is more complex as it requires use of the
lambda
function in Python. But, usingroipy.plotting.utils.plot_univariate
, you can devise your own animation style.
FAQs
Plotting brain regions of interest (ROI) for demonstration purposes in Python
We found that roipy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.