help > Plot a file on a surface using custom colormap
Showing 1-1 of 1 posts
Display:
Results per page:
Mar 19, 2021  04:03 PM | makis
Plot a file on a surface using custom colormap
I want to use a custom colormap to plot a volume on a surface

I use:

```
surface_file = '/Users/makis/Documents/MATLAB_TOOLBOXES/BrainNetViewer/Data/SurfTemplate/BrainMesh_ICBM152_smoothed.nv';

nifti_file = 'brain_volume.nii'

settings = load('cfg.mat');
settings.EC.vol.cmstring = 'parula(1000);';
settings.EC.vol.CM = parula(1000);
settings.EC.vol.CMt = parula(1000);
settings.EC.vol.color_map = 99;

BrainNet_MapCfg(surface_file, nifti_file, 'settings');

```

I also tried to modify the source code as:

```
switch EC.vol.color_map
%%% Edited by Mingrui Xia, 130624, arrange colormap order by name.
case 99
EC.vol.CMt=parula(1000);
case 13
EC.vol.CMt=jet(1000);
case 12
EC.vol.CMt=hsv(1000);
```