diff --git a/doc/license.html b/doc/license.html
index 616057d09..8962a3033 100644
--- a/doc/license.html
+++ b/doc/license.html
@@ -5,7 +5,7 @@
THERE IS NO UNDO BUTTON!
SET UP A BACKUP OF YOUR DATABASE
-Version: 3.241206 (06-Dec-2024)
+Version: 3.241209 (09-Dec-2024)
COPYRIGHT © 2000-2024
USC & McGill University.
diff --git a/doc/version.txt b/doc/version.txt
index 7b9b7ebd2..30e812efc 100644
--- a/doc/version.txt
+++ b/doc/version.txt
@@ -1,2 +1,2 @@
% Brainstorm
-% v. 3.241206 (06-Dec-2024)
\ No newline at end of file
+% v. 3.241209 (09-Dec-2024)
\ No newline at end of file
diff --git a/toolbox/forward/panel_headmodel.m b/toolbox/forward/panel_headmodel.m
index 8682b018b..611466f45 100644
--- a/toolbox/forward/panel_headmodel.m
+++ b/toolbox/forward/panel_headmodel.m
@@ -29,7 +29,7 @@
%% ===== CREATE PANEL =====
-function [bstPanelNew, panelName] = CreatePanel(isMeg, isEeg, isEcog, isSeeg, isMixed) %#ok
+function [bstPanelNew, panelName] = CreatePanel(isMeg, isEeg, isEcog, isSeeg, isMixed, isNirs) %#ok
panelName = 'HeadmodelOptions';
% Java initializations
import java.awt.*;
@@ -41,6 +41,10 @@
isSeeg = 0;
isMixed = 0;
end
+ % Call without 'isNIRS'
+ if (nargin < 6)
+ isNirs = 0;
+ end
% Create main main panel
jPanelNew = gui_river([8,10], [0,15,20,15]);
@@ -124,6 +128,17 @@
jCheckMethodSEEG = [];
jComboMethodSEEG = [];
end
+ % === NIRS ===
+ if isNirs
+ % Checkbox
+ jCheckMethodNIRS = gui_component('CheckBox', jPanelMethod, 'br', 'NIRS: ');
+ jCheckMethodNIRS.setSelected(0);
+ jCheckMethodNIRS.setEnabled(0)
+ % Label
+ gui_component('Label', jPanelMethod, 'tab hfill', ['To compute head model for NIRS, use process:
' ...
+ 'NIRS > Sources > Compute head model from fluence
' ...
+ '(NIRSTORM plugin is required)']);
+ end
% Attach sub panel to NewPanel
jPanelNew.add('br hfill', jPanelMethod);
@@ -329,15 +344,16 @@ function UpdateComment(varargin)
isEeg = any(strcmpi(sStudies(i).Channel.DisplayableSensorTypes, 'EEG'));
isEcog = any(strcmpi(sStudies(i).Channel.DisplayableSensorTypes, 'ECOG'));
isSeeg = any(strcmpi(sStudies(i).Channel.DisplayableSensorTypes, 'SEEG'));
- isNIRS = any(strcmpi(sStudies(i).Channel.DisplayableSensorTypes, 'NIRS'));
+ isNirs = any(strcmpi(sStudies(i).Channel.DisplayableSensorTypes, 'NIRS'));
end
end
% Check that at least one modality is available
- if isNIRS
- errMessage = ['To compute head model for NIRS, use process:' 10 'NIRS > Sources > Compute head model from fluence' 10 'NIRSTORM plugin is required'];
- return;
- elseif ~isMeg && ~isEeg && ~isEcog && ~isSeeg
- errMessage = 'No valid sensor types to estimate a head model.';
+ if ~isMeg && ~isEeg && ~isEcog && ~isSeeg
+ if isNirs
+ errMessage = ['To compute head model for NIRS, use process:' 10 'NIRS > Sources > Compute head model from fluence' 10 'NIRSTORM plugin is required'];
+ else
+ errMessage = 'No valid sensor types to estimate a head model.';
+ end
return;
end
% Check if the first subject has a "Source model" atlas
@@ -356,7 +372,7 @@ function UpdateComment(varargin)
end
% Display options panel
if (nargin < 2) || isempty(sMethod)
- sMethod = gui_show_dialog('Compute head model', @panel_headmodel, 1, [], isMeg, isEeg, isEcog, isSeeg, isMixed);
+ sMethod = gui_show_dialog('Compute head model', @panel_headmodel, 1, [], isMeg, isEeg, isEcog, isSeeg, isMixed, isNirs);
if isempty(sMethod)
return;
end