-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathhip_PCAind.m
25 lines (22 loc) · 861 Bytes
/
hip_PCAind.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function [head_ind,notail_ind] = hip_PCAind(dirVect,headPoint,tailPoint,X,x,y,z)
%hip_PCAind Method to obtain the indexes of the tail and heads
% Calculates volumes of the hippocampus segments based on the given variables.
%
% 01/2017: GLU: First version
%
% (C) Garikoitz Lerma-Usabiaga
% BCBL. Basque Center on Cognition, Brain and Language.
% Stanford University
% 2017
% Contact: [email protected]
head_ind = (X(:,z) - ...
((dirVect(x)*(headPoint(x)-X(:,1)) + ...
dirVect(y)*(headPoint(y)-X(:,2)))/dirVect(z) + ...
headPoint(z)) ...
) > 0;
notail_ind = (X(:,z) - ...
((dirVect(x)*(tailPoint(x)-X(:,x)) + ...
dirVect(y)*(tailPoint(y)-X(:,y)))/dirVect(z) + ...
tailPoint(z)) ...
) > 0;
end