From b49b43756b70acbe033934c4b45ebd6023ea87da Mon Sep 17 00:00:00 2001 From: Liam Keegan Date: Thu, 27 Jun 2024 14:10:03 +0200 Subject: [PATCH] For MEDIA_ASGN_F2H where mua/mus are nan ensure that the provided g/n values are nontheless read --- src/mcx_utils.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/mcx_utils.c b/src/mcx_utils.c index 4e96ff92..c5bcd387 100644 --- a/src/mcx_utils.c +++ b/src/mcx_utils.c @@ -3525,16 +3525,14 @@ void mcx_loadvolume(char* filename, Config* cfg, int isbuf) { if (f2h[0] != f2h[0] || f2h[1] != f2h[1]) { /*if one of mua/mus is nan in continuous medium, convert to 0-voxel*/ cfg->vol[i] = 0; - continue; + } else { + cfg->vol[i] = mcx_float2half2(f2h); } if (cfg->mediabyte == MEDIA_ASGN_F2H) { - cfg->vol[i] = mcx_float2half2(f2h); f2h[0] = val[(i << 2) + 2]; // g f2h[1] = val[(i << 2) + 3]; // n cfg->vol[i + datalen] = mcx_float2half2(f2h); - } else { - cfg->vol[i] = mcx_float2half2(f2h); } } } else if (cfg->mediabyte == MEDIA_2LABEL_SPLIT) {