Comments (2)
This is the bit of code that plots the entire principal gradient:
def rebuild_nii_individ(num):
onlyfiles = [f for f in listdir_nohidden('./data/Outputs/Regs/') if isfile(join('./data/Outputs/Regs/', f))]
for sub in onlyfiles:
data = np.load('./data/Outputs/Regs/%s' % sub)
a = data[:,num].copy()
nim = nib.load('cc400_roi_atlas.nii')
imdat=nim.get_data()
imdat_new = imdat.copy()
for n, i in enumerate(np.unique(imdat)):
if i != 0:
imdat_new[imdat == i] = a[n-1] * 10 # scaling factor. Could also try to get float values in nifti...
nim_out = nib.Nifti1Image(imdat_new, nim.get_affine(), nim.get_header())
nim_out.set_data_dtype('float32')
# to save:
nim_out.to_filename('res.nii')
nilearn.plotting.plot_epi(nim_out, cut_coords=(0,0,0))
from autism-gradients.
num == gradient number
from autism-gradients.
Related Issues (13)
- Plots HOT 3
- Compare gradients against known neurosynth keywords
- Compare gradients against known network
- Stats HOT 1
- Include selection based on SUB_IN_SMP variable
- Clean-up code HOT 17
- Upload raw time series data HOT 2
- Reverse neurosynth inference
- Include matlab kernel in environment and add instructions for a full set up
- script 5c return nans... HOT 5
- website figures HOT 5
- Add more matlab_kernel setup instructions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from autism-gradients.