Skip to content

Commit

Permalink
Add available landmarks to NIRS SD3D output (#40)
Browse files Browse the repository at this point in the history
* Include cranial landmarks in .nirs file

The saving function write_NIRS was missing the cranial landmarks in the SD3D structure

* Added comments to write_NIRS

write_NIRS was modified to include landmarks and comments were added to clarify changes

* Update write_NIRS.m

Cranial landmark names were missing in the SD3D structure, this has been amended.
  • Loading branch information
ernesto-vidal authored Nov 15, 2022
1 parent d661ff7 commit 7a9aecc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion +lumofile/read_lufr.m
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@


% Load layout or take from the user
if isempty(layout_override) & (n_layouts == 0)
if isempty(layout_override) && (n_layouts == 0)

% The user has nor provided a layout, we must use the embedded data if it exists
% enum.groups(gidx + 1).layout = [];
Expand Down
17 changes: 17 additions & 0 deletions +lumofile/write_NIRS.m
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,23 @@

end

% Add Landmarks to SD3D
%
SD3D.Landmarks = zeros(size(layout.landmarks,1),3);
SD3D.LandmarksNames = cell(1,size(layout.landmarks,1));
for li = 1:size(layout.landmarks,1)
SD3D.Landmarks(li,1) = layout.landmarks(li).coords_3d.x;
SD3D.Landmarks(li,2) = layout.landmarks(li).coords_3d.y;
SD3D.Landmarks(li,3) = layout.landmarks(li).coords_3d.z;

% Add Landmarks names
SD3D.LandmarksNames{li} = layout.landmarks(li).name;

end




% Build MeasList
%
SD.MeasList = zeros(size(glch,1), 4);
Expand Down

0 comments on commit 7a9aecc

Please sign in to comment.