From 919dafefbe98f4cab6bc7b2ba2126638c95e3af0 Mon Sep 17 00:00:00 2001 From: User Date: Thu, 13 Jul 2023 18:52:27 +0200 Subject: [PATCH 1/2] fix adding more than 4 tissues to mcx cfg --- ForwardModel/runMCXlab.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ForwardModel/runMCXlab.m b/ForwardModel/runMCXlab.m index 746c3d2..fce16fe 100644 --- a/ForwardModel/runMCXlab.m +++ b/ForwardModel/runMCXlab.m @@ -249,11 +249,12 @@ cfg.isnormalized = 1; cfg.outputtype = 'fluence'; - cfg.prop=[ 0 0 1.0000 1.0000 % background/air - tiss_prop(1).absorption(iWav) tiss_prop(1).scattering(iWav) tiss_prop(1).anisotropy(1) tiss_prop(1).refraction(1) - tiss_prop(2).absorption(iWav) tiss_prop(2).scattering(iWav) tiss_prop(2).anisotropy(1) tiss_prop(2).refraction(1) - tiss_prop(3).absorption(iWav) tiss_prop(3).scattering(iWav) tiss_prop(3).anisotropy(1) tiss_prop(3).refraction(1) - tiss_prop(4).absorption(iWav) tiss_prop(4).scattering(iWav) tiss_prop(4).anisotropy(1) tiss_prop(4).refraction(1) ]; + cfg.prop=[ 0 0 1.0000 1.0000 ]; % background/air + for i = 1:length(tiss_prop) + cfg.prop = [cfg.prop; ... + tiss_prop(i).absorption(iWav) tiss_prop(i).scattering(iWav) tiss_prop(i).anisotropy(1) tiss_prop(i).refraction(1)] + + end cfg.seed=floor(rand()*10e+7); cfg.nphoton=num_phot; From 1c07104169aa1db2cab743c601a40365b5ecd5a8 Mon Sep 17 00:00:00 2001 From: User Date: Thu, 13 Jul 2023 19:18:54 +0200 Subject: [PATCH 2/2] fix non-existent activeChIdxs in brain-and-scalp recon --- ImgRecon/ImageRecon.m | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/ImgRecon/ImageRecon.m b/ImgRecon/ImageRecon.m index be94e11..4c724a2 100644 --- a/ImgRecon/ImageRecon.m +++ b/ImgRecon/ImageRecon.m @@ -283,13 +283,10 @@ function image_recon_Callback(~, ~, handles) end elseif value2 == 1 % brain and scalp reconstruction without short separation regression (Zhan2012) - - Adot = Adot(activeChIdxs,:,:); - Adot = Adot(longSepChLst,:,:); - - Adot_scalp = Adot_scalp(activeChIdxs,:,:); - Adot_scalp = Adot_scalp(longSepChLst,:,:); - + + Adot = Adot(activeChLst_SDpairs,:,:); + Adot_scalp = Adot_scalp(activeChLst_SDpairs,:,:); + % get alpha and beta for regularization alpha = str2num(get(handles.alpha_brain_scalp,'String')); %#ok<*ST2NM> beta = str2num(get(handles.beta_brain_scalp,'String'));