Skip to content

Commit 2b2b53a

Browse files
author
MCMF
committed
Update of Example_VSDFullBodyBoneModels.m
1 parent 613b3de commit 2b2b53a

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

Example_VSDFullBodyBoneModels.m

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,14 @@
4444
end
4545

4646
%% Convert VSD to STAPLE format
47-
vsdSubjectXLSX = fullfile('VSD', 'MATLAB\res\VSD_Subjects.xlsx');
48-
[~, ~, rawXLSXsdta] = xlsread(vsdSubjectXLSX);
49-
vsdSubjects = cell2table(rawXLSXsdta(2:end,:),'VariableNames',rawXLSXsdta(1,:));
47+
vsdSubjects = readtable(fullfile('VSD\MATLAB\res\', 'VSD_Subjects.xlsx'));
5048
% Remove subjects with incomplete skeletal anatomy
5149
vsdSubjects = vsdSubjects(cellfun(@(x) isempty(strfind(x,'cut off')), vsdSubjects.Comment),:); %#ok<STREMP>
5250

53-
for n_sub = 4%:size(vsdSubjects,1)
51+
% Select subjects to be processed
52+
subs = 1;%1:size(vsdSubjects,1);
53+
54+
for n_sub = subs
5455
load(fullfile('VSD', 'Bones', [vsdSubjects.ID{n_sub} '.mat']),'B','M')
5556
subFolder = fullfile(datasets_folder, ['VSD_' vsdSubjects.ID{n_sub}] , input_geom_format);
5657
if ~isfolder(subFolder)
@@ -120,7 +121,7 @@
120121
% create model folder if required
121122
if ~isfolder(output_models_folder); mkdir(output_models_folder); end
122123

123-
for n_d = 4%:numel(datasets)
124+
for n_d = subs
124125

125126
% current dataset being processed
126127
cur_dataset = datasets{n_d};
@@ -138,9 +139,12 @@
138139
[sign_side , cur_side] = bodySide2Sign(sides{n_side});
139140

140141
% cell array with the bone geometries that you would like to process
141-
bones_list = {'pelvis_no_sacrum', ['femur_', cur_side],...
142-
['tibia_', cur_side], ['talus_', cur_side],...
143-
['calcn_', cur_side]};
142+
bones_list = {...
143+
'pelvis_no_sacrum', ...
144+
['femur_', cur_side],...
145+
['tibia_', cur_side], ...
146+
['talus_', cur_side],...
147+
['calcn_', cur_side]};
144148

145149
% model and model file naming
146150
cur_model_name = ['auto_',datasets{n_d},'_',upper(cur_side)];

0 commit comments

Comments
 (0)