Home > vbmeg > functions > tool_box > atlas2vb_dir > vb_plot_atlas_area.m

vb_plot_atlas_area

PURPOSE ^

Plot brain atlas for motor and visual area

SYNOPSIS ^

function vb_plot_atlas_area(brainfile,Atlas,alpha_value)

DESCRIPTION ^

 Plot brain atlas for motor and visual area
  vb_plot_atlas_area(brainfile,Atlas)
  vb_plot_atlas_area(brainfile,Atlas,alpha_value)
 --- Input
 brainfile
 Atlas : structure of atlas label
 alpha_value

 2006-11-12 M. Sato

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function    vb_plot_atlas_area(brainfile,Atlas,alpha_value)
0002 % Plot brain atlas for motor and visual area
0003 %  vb_plot_atlas_area(brainfile,Atlas)
0004 %  vb_plot_atlas_area(brainfile,Atlas,alpha_value)
0005 % --- Input
0006 % brainfile
0007 % Atlas : structure of atlas label
0008 % alpha_value
0009 %
0010 % 2006-11-12 M. Sato
0011 %
0012 % Copyright (C) 2011, ATR All Rights Reserved.
0013 % License : New BSD License(see VBMEG_LICENSE.txt)
0014 
0015 if ~exist('alpha_value', 'var'), alpha_value = 1; end
0016 
0017 arealist = get_area_list;
0018 
0019 [V, F, xx, inf_C] = vb_load_cortex(brainfile,'Inflate');
0020 
0021 NL = F.NdipoleL;
0022 FL = F.F3L;
0023 FR = F.F3R;
0024 F  = F.F3;
0025 NV = size(V,1);
0026 
0027 Narea = length(arealist);
0028 
0029 [ixlist, Nlist] = vb_get_atlas_index(arealist,Atlas);
0030 
0031 Maxlabel = sum(Nlist > 0);
0032 
0033 % 脳モデルの色を決めるパラメータ
0034 cscale = -0.4;
0035 c0 = 0.8;
0036 colors = inf_C * cscale  + c0;
0037 colors = repmat(colors, [1 3]);
0038 
0039 % 領域をこの色で表示
0040 cmap = vb_get_class_color(Maxlabel);
0041 angl = [ 10 45 ; -10 45; -60 10; 60 10; 35  20; -35  20];
0042 
0043 Lmax = max(V(1:NL,:));
0044 Lmin = min(V(1:NL,:));
0045 Rmax = max(V((NL+1):NV,:));
0046 Rmin = min(V((NL+1):NV,:));
0047 
0048 subplot(1,2,1)
0049 patch('Faces',FL,'Vertices',V,'FaceColor','interp',...
0050     'EdgeColor','none','FaceVertexCData',colors);
0051 hold on;
0052 
0053 ncolor = 0;
0054 
0055 for n=1:Narea
0056     Fx = vb_patch_select2(ixlist{n},FL,NV);
0057     if isempty(Fx), continue; end
0058     
0059     ncolor = ncolor + 1;
0060     vb_plot_surf(V,Fx,cmap(ncolor,:));
0061 end
0062 
0063 xlim([Lmin(1) Lmax(1)]);
0064 ylim([Lmin(2) Lmax(2)]);
0065 zlim([Lmin(3) Lmax(3)]);
0066 
0067 view(angl(1,:));
0068 alpha(alpha_value);
0069 
0070 subplot(1,2,2)
0071 patch('Faces',FR,'Vertices',V,'FaceColor','interp',...
0072     'EdgeColor','none','FaceVertexCData',colors);
0073 hold on;
0074 
0075 ncolor = 0;
0076 
0077 for n=1:Narea
0078     Fx = vb_patch_select2(ixlist{n},FR,NV);
0079     if isempty(Fx), continue; end
0080 
0081     ncolor = ncolor + 1;
0082     vb_plot_surf(V,Fx,cmap(ncolor,:));
0083 end
0084 
0085 xlim([Rmin(1) Rmax(1)]);
0086 ylim([Rmin(2) Rmax(2)]);
0087 zlim([Rmin(3) Rmax(3)]);
0088 
0089 view(angl(2,:));
0090 alpha(alpha_value);
0091 
0092 return
0093 
0094 function    arealist = get_area_list()
0095 
0096 arealist = { ...
0097 %
0098 %    Motor area
0099 %
0100     'Precentral_L';     ...
0101     'Postcentral_L';    ...
0102     'Supp_Motor_Area_L'; ...
0103     'Parietal_Sup_L';    ...
0104     'Precentral_R';     ...
0105     'Postcentral_R';    ...
0106     'Supp_Motor_Area_R'; ...
0107     'Parietal_Sup_R';    ...
0108 %
0109 %    Visual area
0110 %
0111     'Calcarine_L'
0112     'Calcarine_R'
0113     'Occipital_Sup_L';
0114     'Occipital_Sup_R';
0115     'Occipital_Mid_L';
0116     'Occipital_Mid_R';
0117     'Occipital_Inf_L';
0118     'Occipital_Inf_R';
0119     'Cuneus_L'
0120     'Cuneus_R'
0121     'Fusiform_L'
0122     'Fusiform_R'
0123 %
0124 %    Motor area
0125 %
0126     'brodmann area 1_L'; ...
0127     'brodmann area 2_L'; ...
0128     'brodmann area 3_L'; ...
0129     'brodmann area 4_L'; ...
0130     'brodmann area 5_L'; ...
0131     'brodmann area 6_L'; ...
0132     'brodmann area 7_L'; ...
0133     'brodmann area 8_L'; ...
0134     'brodmann area 1_R'; ...
0135     'brodmann area 2_R'; ...
0136     'brodmann area 3_R'; ...
0137     'brodmann area 4_R'; ...
0138     'brodmann area 5_R'; ...
0139     'brodmann area 6_R'; ...
0140     'brodmann area 7_R'; ...
0141     'brodmann area 8_R'; ...
0142 %
0143 %    Visual area
0144 %
0145     'brodmann area 17_L'; ...
0146     'brodmann area 18_L'; ...
0147     'brodmann area 19_L'; ...
0148     'brodmann area 17_R'; ...
0149     'brodmann area 18_R'; ...
0150     'brodmann area 19_R'; ...
0151     };
0152

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005