function Jreduce = reduce_cortex(parm,Jindx,Reduce_ratio);
% ٤򲼤
% Make new cortex model with reduced resolution

% Jindx    : Ȥβ٤ǥå
% Jreduce  : Υǥå
% Reduce_ratio : ǡְȤΨ
Reduce_ratio = 1/2 : 1/2 ˴ְ

----------------------------------------------------
function	Iextract = fat_area(Jarea, R, nextIX, nextDD)
% Ⱦ R ζ˵ꥹȤ˲ä
% Dilation according to surface-distance
% Iextract : ĺꥹ
% Jarea    : ĺꥹ
%   R      : ˵Ⱦ ( m )
R = 0.015  : Ⱦ 15mm ä

function	Iextract = cut_area(Jarea, R, nextIX, nextDD)
% Ⱦ R ζ˵ꥹȤ
% Erosion according to surface-distance
R = 0.015  : Ⱦ 15mm 

function	Iextract = close_area(Jarea, R, nextIX, nextDD)
% 
function	Iextract = open_area(Jarea, R, nextIX, nextDD)
% Ω

function	Iextract = merge_area(Jarea, V)
% ʣΰιʻ
% Merge area
% Iextract : ĺꥹ
% Jarea{n} : ĺꥹ(륢쥤)

function	xxP = gauss_filter(parm,Rradius,Rmax,xxP,Iextract)
% Gauss filtering of fMRI activity

------------------------------------------
function	B = dilation_3d(B, R)
% Dilation : Ⱦ R ζ˵ä
% ФƤ˵Ԥ

% B : 3D-ޥѥ
% R : ˵Ⱦ (ܥ륵򣱤ȤĹ)
ܥΰդΥ w (mm) ǤȤ
Ⱦ r (mm) ä뤿ˤ
R = r/w

function	B = erosion_3d(B, R)
% Erosion : Ⱦ R ζ˵
% ФƤ˵Ԥ

function	B = closing_3d(B, R1, R2)
% 
%		dilation_3d(B, R1)
%		erosion_3d( B, R2)

function	B = opening_3d(B, R1, R2)
% Ω
%		erosion_3d( B, R1)
%		dilation_3d(B, R2)

