From 34dc6557a1ee0cb0c61f96f9d6d1889362109990 Mon Sep 17 00:00:00 2001 From: Francois Date: Tue, 4 Apr 2023 10:03:14 +0200 Subject: [PATCH] Surface tab: Allow adding any surface in 3D figures --- doc/license.html | 2 +- doc/version.txt | 2 +- toolbox/gui/panel_surface.m | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/license.html b/doc/license.html index bda493913..0d6220b95 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.230331 (31-Mar-2023)
+Version: 3.230404 (04-Apr-2023)
COPYRIGHT © 2000-2023 USC & McGill University.
diff --git a/doc/version.txt b/doc/version.txt index 800749072..743795af7 100644 --- a/doc/version.txt +++ b/doc/version.txt @@ -1,2 +1,2 @@ % Brainstorm -% v. 3.230331 (31-Mar-2023) \ No newline at end of file +% v. 3.230404 (04-Apr-2023) \ No newline at end of file diff --git a/toolbox/gui/panel_surface.m b/toolbox/gui/panel_surface.m index 94b147862..b1706d0a9 100644 --- a/toolbox/gui/panel_surface.m +++ b/toolbox/gui/panel_surface.m @@ -770,6 +770,8 @@ function ButtonAddSurfaceCallback(surfaceType) bst_error('There are no additional anatomy files that you can add to this figure.', 'Add surface', 0); return; end + % Add "other", to allow importing all the other surfaces + typesList{end+1} = 'Other'; % Ask user which kind of surface he wants to add to the figure 3DViz surfaceType = java_dialog('question', 'What kind of surface would you like to display ?', 'Add surface', [], typesList, typesList{1}); end @@ -796,6 +798,14 @@ function ButtonAddSurfaceCallback(surfaceType) SurfaceFile = sSubject.Surface(iSubCortical).FileName; case 'White' SurfaceFile = sSubject.Surface(iWhite).FileName; + case 'Other' + % Offer all the other surfaces + Comment = java_dialog('combo', 'Select the reference channel:

', 'Select surface', [], {sSubject.Surface.Comment}); + if isempty(Comment) + return; + end + iSurface = find(strcmp({sSubject.Surface.Comment}, Comment), 1); + SurfaceFile = sSubject.Surface(iSurface).FileName; otherwise return; end