Fluence in air region, with the 'mediabyte' of 96 and 100

38 views
Skip to first unread message

Seonyeong Park

unread,
May 20, 2024, 9:15:37 PM5/20/24
to mcx-users
Hi Dr. Fang,

First of all, thank you so much for adding new features in v2024.2.
I have been checking the feature, computing a fluence map ("OutputType": "fluence"): Per-voxel mua/mus/g/n format support.
Unfortunately, I am getting the results that I did not expect.
FYI, I used the extended slit source.

In short, when setting 'mediabyte' to either 100 (muamus_float) or 96 (asgn_float), it seems that the air region was not correctly computed.

Here is what I have checked (figures are attached later in this post).

1. mediabyte: 1 or byte ("MediaFormat": "byte")
  • A homogeneous media in a hemispherical water water bowl was assumed.
  • The path of the tissue label (uint8, 340x340x170) file was set to "VolumeFile".
  • The media parameter was set:
    "Media": [
      {
        "mua": 0,
        "mus": 0,
        "g": 1,
        "n": 1
      },
      {
        "mua": 0.0025,
        "mus": 0.0038,
        "g": 0.99,
        "n": 1.33
      },
      {
        "mua": 0.0036086258478462696,
        "mus": 5.863694190979004,
        "g": 0.977524995803833,
        "n": 1.3432118892669678
      }
  ]

2. mediabyte: 100 or muamus_float ("MediaFormat": "muamus_float")
  • A heterogeneous media in a hemispherical water water bowl was assumed.
  • The path of the optical property map (float32, 2x340x340x170) file was set to "VolumeFile".
  • The media parameter was set:
    "Media": [
      {
        "mua": 0,
        "mus": 0,
        "g": 1,
        "n": 1
      },
      {
        "mua": 0.0036086258478462696,
        "mus": 5.863694190979004,
        "g": 0.977524995803833,
        "n": 1.3432118892669678
      }
    ]

3. mediabyte: 96 or asgn_float ("MediaFormat": "asgn_float")
  • A heterogeneous media in a hemispherical water water bowl was assumed.
  • The path of the optical property map (float32, 4x340x340x170) file was set to "VolumeFile".
  • The media parameter was set:
    "Media": [
      {
        "mua": 0,
        "mus": 0,
        "g": 1,
        "n": 1
      }
    ]

Screenshot 2024-05-20 at 1.13.36 PM.png
Screenshot 2024-05-20 at 1.17.03 PM.png

The top figure shows cross-sections of the tissue label map and optical property maps that I used.
The bottom figure includes the computed fluence maps (left to right, maximum intensity projections along the x, y, and z-axis).
As the bottom figure, with the 'mediabyte' of 96 and 100, the optical fluence appears nonzero in the air region.

Could you please let me know how to set the parameters correctly?

Thank you,
Seonyeong

Qianqian Fang

unread,
May 20, 2024, 10:25:44 PM5/20/24
to mcx-...@googlegroups.com, Seonyeong Park

hi Seonyeong,

mcx treats 0-valued voxel, either in label based medium or continuous-medium, as the background - so that photons moving from a non-zero voxel to a zero voxel is considered escaping the domain and will never return, thus can be terminated.

in order to distinguish a continuous medium voxel where both mua and mus are exactly 0 with a 0-valued voxel, mcx modifies the mus value to have a very small value (FLOAT32_EPS or FLOAT16_EPS). However, if you want to mimic a 0-valued voxel like in a labeled volume, you need to set mua or mus to NaN, please see source codes

https://github.com/fangq/mcx/blob/v2024.2/src/mcx_utils.c#L3505

https://github.com/fangq/mcx/blob/v2024.2/src/mcx_utils.c#L3520-L3523


please also try our label-vs-continuous media comparison script

https://github.com/fangq/mcx/blob/master/mcxlab/examples/demo_speed_label_vs_continuous.m

and see if anything useful in understanding the differences.


Qianqian

--
You received this message because you are subscribed to the Google Groups "mcx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mcx-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mcx-users/bb9f38ee-b83a-429d-8d1f-880d3a69b557n%40googlegroups.com.

Park, Seonyeong

unread,
May 21, 2024, 9:25:44 PM5/21/24
to Qianqian Fang, mcx-...@googlegroups.com
Hi Dr. Fang,

Thank you for the explanation!
It works after assigning 'nan' to the air region in continuous mua and mus maps.

Best,
Seonyeong

From: Qianqian Fang <q.f...@neu.edu>
Sent: Monday, May 20, 2024 9:25 PM
To: mcx-...@googlegroups.com <mcx-...@googlegroups.com>; Park, Seonyeong <sp...@illinois.edu>
Subject: Re: [mcx-users] Fluence in air region, with the 'mediabyte' of 96 and 100
 
Reply all
Reply to author
Forward
0 new messages