private/parseCoordinateTextField.m
e0049736
 function voxelList = parseCoordinateTextField(model)
 s = get(model.txtVoxelDef,'String');
ea0c5c02
 rows = size(s,1);
 voxelList = [];
aa21d53b
 for i = 1:rows
     if all(isspace(s(i,:)))
         continue;
     end
     line = s(i,:);
     if (strfind(line,'+'))
         % has radius
ea0c5c02
         [roi rem] = strtok(line,'+');
aa21d53b
         rad = eval(str2mat(rem(2:end)));
     else
         % radius set to 0
         roi = line;
         rad = 0;
ea0c5c02
     end
aa21d53b
     coord.name = roi;
     coord.rad = rad;
     voxelList = [voxelList; coord];
 
 end
ea0c5c02
 end