-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Description
Some sequences require a lower threshold (e.g., 60th percentile) for example https://github.com/ExploreASL/FlavorDatabase/tree/main/Siemens_PASL_2DEPI_VE12U_7T in issue 909
but other sequences require a higher threshold (e.g., 70th percentile) for example https://github.com/ExploreASL/TestDataSets/tree/main/Philips_3DGRASE_MultiSessions_T1wAlreadyDone_LoQ
Is this a difference in image resolution (that allows higher peaks), or in a biasfield (should we perhaps do biasfield correction before masking) or something else?
Line 85 in xASL_im_M0ErodeSmoothExtrapolate.m
The problem is that we cannot mask more tissue-based, because if registration goes slightly wrong, we still want to be relatively robust/reliable. So we should keep the tissue-based masking intact and perhaps do a temporary biasfield correction to find the correct masking threshold (somewhere between 0.6 and 0.7).
Also to try:
https://github.com/ExploreASL/FlavorDatabase/tree/main/Philips_PCASL_2DEPI_5.6.1.2_Hadamard_1
Requirements
-
1. Tweak xASL_im_M0ErodeSmoothExtrapolate.m to allow for flexible input and output
- sorry accidentally converted this item into an issue 1. Tweak
xASL_im_M0ErodeSmoothExtrapolate.mto allow for flexible input and output #1035 which I will close. Cool feature though! It seems that quality 0 is not really needed or faster withxASL_im_M0ErodeSmoothExtrapolateso I suggest to always use Quality=1 in this function to increase reproducibility. This will lower the reproducibility with 1.8.0 only for the low quality tests.
- sorry accidentally converted this item into an issue 1. Tweak
-
2. Validate with TestDataSets that output stayed the same as previous run
-
3. Run whole TestDataSets and FlavorDatabase to just before the M0 processing, and backup
-
4. Try whole TestDataSets with thresholds 0.6 and 0.7
-
5. See if any patterns can be recognized (contrast differences in M0 images? misalignments with structural images, if they are available or taken from MNI templates? Is it a quality issue?
-
Force quality==1 only for the M0 processing
How to test
Tested: Linux Matlab 2016a results before and after the change in xASL_im_M0ErodeSmoothExtrapolate inputs are identical.
Results:
Threshold 0.6 keeps too much in many cases, so we need to keep the stricter threshold 0.7.
However, this removes too much in cases of relatively low intensitiies in the M0 image, e.g., which is the case for Siemens_PASL_2DEPI_VE12U_7T. What helps, is to enforce an eroded tissue mask to be included.

This is Siemens_PASL_2DEPI_VE12U_7T with threshold 0.7 without the eroded tissue mask, and this is with it:

Now only Philips_PCASL_2DEPI_5.1.7.2_2 below is suboptimal, it would need even higher thresholding because of the misalignment. I suggest not trying to further optimize this, it would be better to improve the registration for such an example. The problem here is not the rigid-body alignment but the affine alignment, ideally the M0 image is affine registered to the tissue priors or posteriors before doing the masking. Better to optimize affine registration in a future issue, e.g., when we implement boundary-based registration (BBR).

See below how the pvGM is larger than the M0 image, leading to the possible inclusion of M0 edges in the smoothing mask.

Have a look at the current result (with quality 1) HERE
Quality
When comparing x.settings.Quality, the high quality setting took ~2.6 seconds and the low quality setting took ~3.5 seconds. The difference is the smoothing kernels; iteration of small kernels can be faster but this is not the case in this MNI space example. So I will remove the low quality setting, but this will slightly reduce the reproducibility with previous ExploreASL releases for low quality settings only (read: the TestDataSets).
Tested finally:
TableComparison (%)=
Columns 1 through 5
'Data' 'mean_qCBF_TotalGM' 'median_qCBF_TotalGM' 'median_qCBF_DeepWM' 'CoV_qCBF_TotalGM'
'GE_3Dspiral_T1pre…' [ 0.5396] [ 0.2738] [ 0.8717] [ -0.8190]
'Philips_2DEPI_FEA…' [ 0] [ 0] [ 0] [ 0]
'Philips_2DEPI_FLA…' [ -0.0680] [ -0.0034] [ 0] [ 0]
'Philips_2DEPI_FLA…' [ 0] [ 0] [ 0] [ 0]
'Philips_2DEPI_Les…' [ NaN] [ 0] [ 0] [ 0]
'Philips_2DEPI_Seg…' [ 0] [ 0] [ 0] [ 0]
'Philips_3DGRASE_F…' [ -1.8294] [ -1.9640] [ 0.2178] [ -1.2218]
'Philips_3DGRASE_M…' [ 2.5662] [ 2.7074] [ 6.2474] [ -0.0412]
'Siemens3DGRASE_St…' [ 10.8546] [ 15.2763] [ 6.9513] [ -4.3133]
'Siemens_2DEPI_noB…' [ 1.6634] [ 1.8174] [ 3.4654] [ 1.3218]
Columns 6 through 11
'GMvol' 'WMvol' 'CSFvol' 'PipelineCompleted' 'TC_ASL_Registration' 'TC_M0_Registration'
[ 0] [ 0] [ 0] [ 0] [ -0.1426] [ 0]
[ 0] [ 0] [ 0] [ 0] [ 0] [ 0]
[ 0] [ 0] [ 0] [ 0] [ 0] [ 0]
[ 0] [ 0] [ 0] [ 0] [ 0] [ 0]
[ 0] [ 0] [ 0] [ 0] [ 0] [ 0]
[ 0] [ 0] [ 0] [ 0] [ 0] [ 0]
[ 0] [ 0] [ 0] [ 0] [ 0.2490] [ 0]
[ 0] [ 0] [ 0] [ 0] [ 0.6956] [ 0]
[ 0] [ 0] [ 0] [ 0] [ 3.6621] [ 0]
[ 0] [ 0] [ 0] [ 0] [ -0.3544] [ 0]
So note that the largest difference was found for Siemens3DGRASE_Structural_AlreadyDone_HiQ, which is the TestDataSet where M0 masking went wrong before. Old M0 processing for this Siemens3DGRASE_Structural_AlreadyDone_HiQ:
New M0 processing:
With CBF difference in [-10 80] mL/100g/min, old right new left:
Release notes
#1033 Improved M0 processing in xASL_im_M0ErodeSmoothExtrapolate to avoid that intracranial signal is masked out in M0's with relatively low intensities (e.g., due to a strong biasfield with centrally low values)


