# Dwibiascorrect with ants: high intensity in cerebellum/brainstem

**URL:** https://community.mrtrix.org/t/dwibiascorrect-with-ants-high-intensity-in-cerebellum-brainstem/1338
**Category:** Uncategorized
**Created:** [November 29, 2017, 12:24pm UTC](https://community.mrtrix.org/t/dwibiascorrect-with-ants-high-intensity-in-cerebellum-brainstem/1338 "2017-11-29T12:24:28Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Siti\_N\_Y](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@Siti\_N\_Y](https://community.mrtrix.org/u/Siti_N_Y)
#### Post date: [November 29, 2017, 12:24pm UTC](https://community.mrtrix.org/t/dwibiascorrect-with-ants-high-intensity-in-cerebellum-brainstem/1338/1 "2017-11-29T12:24:28Z")

</div>

Hi,

I’m getting strange looking images after the dwibiascorrect step using ants on some of my subjects (17 out of 68 subjects). The command itself completes with no errors, but when I check the bias corrected images I get very high intensities in the inferior parts of the brain for some subjects, while others look fine.

Here is an example of a “bad” subject:

 ![image](https://community.mrtrix.org/uploads/default/original/1X/7f3e909feccb557167ebb24e192c9bc08303c259.jpg)

and here is a “good” one:

 ![image](https://community.mrtrix.org/uploads/default/original/1X/45ae844706d5c66c5a4c014f3c6a182c2581ce3f.jpg)

Running dwibiascorrect using fsl appears to solve the problem. This is the same “bad” subject above bias corrected using the -fsl flag:

 ![image](https://community.mrtrix.org/uploads/default/original/1X/d29e4016118a3183bf568e57f517a97819903cb5.jpg)

So could this be an ants problem or a problem with these 17 subjects, or do you think I might be doing something wrong? Am I better off running all subjects using fsl, so that the bias correction method is the same across all subjects?

Thanks,  
Siti

---

<div class="post-metadata">

### Author: ![Lucius](https://community.mrtrix.org/user_avatar/community.mrtrix.org/lucius/32/1156_2.png) [@Lucius](https://community.mrtrix.org/u/Lucius)
#### Post date: [November 29, 2017, 4:21pm UTC](https://community.mrtrix.org/t/dwibiascorrect-with-ants-high-intensity-in-cerebellum-brainstem/1338/2 "2017-11-29T16:21:41Z")

</div>

I receive similar results sometimes with ANTs, FODs are then as well “overproportional” modulated in the lower high intensity parts.

Best regards, Lucius

Edit: less pictures

 ![12](https://community.mrtrix.org/uploads/default/original/1X/a674e86cace6e4b2d54f555d1b95f62705be203b.jpg) ![48](https://community.mrtrix.org/uploads/default/original/1X/548357ebb6478f8c4d5106d63ac34fe0275caa3d.png)

---

<div class="post-metadata">

### Author: ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)
#### Post date: [December 18, 2017, 11:25pm UTC](https://community.mrtrix.org/t/dwibiascorrect-with-ants-high-intensity-in-cerebellum-brainstem/1338/3 "2017-12-18T23:25:11Z")

</div>

Hi Siti & Lucius (and all),

I suspect that this observation may be related to the tuning of N4 parameters within the `dwibiascorrect` script [here](https://github.com/MRtrix3/mrtrix3/commit/726496edf86ecdfbe5cc68dd6530105f6b790e87#diff-bd288f9ce77b63b3acf3d4bc5bbeeac4) that occurred as part of the 3.0\_RC2 update. The field estimation parameters were made more “aggressive” in order to perform a more comprehensive bias field correction. However it is possible that this change was a little over-zealous: I have since encountered problematic data myself (not this exact same effect, but vaguely comparable). We are therefore intending a further re-tuning of these parameters, for which you can see the details [here](https://github.com/MRtrix3/mrtrix3/pull/1148).

Indeed it would be very informative to us if you could both re-run your data using these proposed N4 parameters, and let us know whether or not they work appropriately for your data. You could either check out the `dev` branch using Git, or simply make the same change to the `dwibiascorrect` script to your local version of that file.

Rob

---

<div class="post-metadata">

### Author: ![Lucius](https://community.mrtrix.org/user_avatar/community.mrtrix.org/lucius/32/1156_2.png) [@Lucius](https://community.mrtrix.org/u/Lucius)
#### Post date: [December 19, 2017, 8:32am UTC](https://community.mrtrix.org/t/dwibiascorrect-with-ants-high-intensity-in-cerebellum-brainstem/1338/4 "2017-12-19T08:32:54Z")

</div>

Hi, I changed

> run.command(‘N4BiasFieldCorrection -d 3 -i mean\_bzero.nii -w mask.nii -o [corrected.nii,’ + bias\_path + ‘] -b [150,3] -c [1000x1000,0.0]’)

to

> run.command(‘N4BiasFieldCorrection -d 3 -i mean\_bzero.nii -w mask.nii -o [corrected.nii,’ + bias\_path + ‘] -s 2 -b [150] -c [200x200,0.0]’)

which resulted in less intense field estimations in the cerebellum part. The ventricles and tumorous part seem slightly more intense in

> ants\_test\_200.mif

See the screenshots.  
Best, Lucius

 ![57](https://community.mrtrix.org/uploads/default/original/2X/3/3984dd6ea81fab9aa5b1a3ebc1e1edd21b8e0c98.jpg) ![13](https://community.mrtrix.org/uploads/default/original/2X/b/bb2ecae1642770eaa89a14dc7ee701dcb99fca3e.jpg)

---

<div class="post-metadata">

### Author: ![Siti\_N\_Y](https://community.mrtrix.org/letter_avatar_proxy/v4/letter/s/51bf81/32.png) [@Siti\_N\_Y](https://community.mrtrix.org/u/Siti_N_Y)
#### Post date: [January 15, 2018, 2:34pm UTC](https://community.mrtrix.org/t/dwibiascorrect-with-ants-high-intensity-in-cerebellum-brainstem/1338/5 "2018-01-15T14:34:33Z")

</div>

Hi Rob & Lucius,

Sorry for the long delay in responding to this. I’ve also modified the dwibiascorrect as Lucius did and it looks like it worked for my data too.

 ![image](https://community.mrtrix.org/uploads/default/original/2X/4/48344c461e8c9fea28c7356413ba59cd1225199d.jpg)

Thanks for the fix!

Best,  
Siti

---

<div class="post-metadata">

### Author: ![rsmith](https://community.mrtrix.org/user_avatar/community.mrtrix.org/rsmith/32/2672_2.png) [@rsmith](https://community.mrtrix.org/u/rsmith)
#### Post date: [January 16, 2018, 10:47pm UTC](https://community.mrtrix.org/t/dwibiascorrect-with-ants-high-intensity-in-cerebellum-brainstem/1338/6 "2018-01-16T22:47:39Z")

</div>

Thanks, that’s very encouraging to see.

These will become the new parameters for N4 within `dwibiascorrect` with the next _MRtrix3_ tagged update, which is hopefully not too far away.

Rob

---

<div class="post-metadata">

### Author: ![ThijsDhollander](https://community.mrtrix.org/user_avatar/community.mrtrix.org/thijsdhollander/32/1617_2.png) [@ThijsDhollander](https://community.mrtrix.org/u/ThijsDhollander)
#### Post date: [January 17, 2018, 12:23am UTC](https://community.mrtrix.org/t/dwibiascorrect-with-ants-high-intensity-in-cerebellum-brainstem/1338/7 "2018-01-17T00:23:08Z")

</div>

Yep, that’s to be expected to fix the problem (as I designed it to, at least). Eventually, this step will become less crucial, as all analysis will be able to be done with some form of multi-tissue CSD (even just 2-tissue CSD), which enables the far superior `mtnormalise` to be performed on the multi-tissue CSD output, for joint bias field and intensity normalisation. At that stage, there is more specificity in the data to tackle the problem of (spatial variant) normalisation. At some point, I’ll be producing a manuscript that details some insights into normalisation, and the various ways in which this can be done, and what they mean for interpretation of the outcome (both in healthy tissue as well as various pathologies). There’s more unique ways to play around with the data than you might expect at first sight. 😉

---

<div class="post-metadata">

### Author: ![annspe](https://community.mrtrix.org/user_avatar/community.mrtrix.org/annspe/32/3918_2.png) [@annspe](https://community.mrtrix.org/u/annspe)
#### Post date: [June 28, 2023, 10:28am UTC](https://community.mrtrix.org/t/dwibiascorrect-with-ants-high-intensity-in-cerebellum-brainstem/1338/9 "2023-06-28T10:28:04Z")

</div>

Dear MRtrix experts

We have encountered a similar problem in two of 129 adolescent subjects. After having changed the N4 parameters as suggested from

> run.command(‘N4BiasFieldCorrection -d 3 -i mean\_bzero.nii -w mask.nii -o [corrected.nii,’ + bias\_path + ‘] -b [150,3] -c [1000x1000,0.0]’)

to

> run.command(‘N4BiasFieldCorrection -d 3 -i mean\_bzero.nii -w mask.nii -o [corrected.nii,’ + bias\_path + ‘] -s 2 -b [150] -c [200x200,0.0]’)

the image quality seemed to be improved.

In the discussion from 2018 Rob said “These will become the new parameters for N4 within `dwibiascorrect` with the next _MRtrix3_ tagged update, which is hopefully not too far away.” However, we observed that this change was not implemented in the latest MRtrix version 3.0.4. Is there a reason why you decided not to include this parameter change? Should we therefore just exclude these two subjects or would you suggest to change the parameters to 200 for all the subjects in this cohort?

Thank you very much for your support!

Anna
