Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Units for FWHM of N4BiasFieldCorrection #334

Closed
spinicist opened this issue Jun 28, 2016 · 7 comments
Closed

Units for FWHM of N4BiasFieldCorrection #334

spinicist opened this issue Jun 28, 2016 · 7 comments

Comments

@spinicist
Copy link
Contributor

spinicist commented Jun 28, 2016

Hi,
I've cross-posted this question to the ITK community list as well. Sorry for the duplication.

What are the units for the FWHM of the histogram-sharpening option on N4BiasFieldCorrection? mm? Voxels? Something else entirely?

I am trying to bias-correct some pre-clinical images that have small voxels (100 micron isotropic), and reducing the FWHM by a factor of 10 makes quite a difference to the output bias field.

Thanks.

@ntustison
Copy link
Member

I would suggest reading the original N3 paper (page 88) as the meaning of that parameter is exactly the same in N4. You can read this there but, in the image formation model, u(x) = v(x)f(x) + n(x), F is the probability distribution of the spatially-dependent scaling factor f(x) (i.e., bias field). The FWHM parameter is in reference to the F distribution. Another reason to read the original N3 discussion is that Sled discusses varying the FWHM parameter in the evaluation.

@spinicist
Copy link
Contributor Author

Thanks Nick. I’ll add the paper to my reading list.

I did some more experimenting today and found that adding an extra stage (and so correspondingly decreasing the spline distance) made a bigger improvement than decreasing the FWHM.

On 28 Jun 2016, at 15:35, Nick Tustison notifications@github.com wrote:

I would suggest reading the original N3 paper https://www.nitrc.org/docman/view.php/6/880/sled.pdf (page 88) as the meaning of that parameter is exactly the same in N4. You can read this there but, in the image formation model, u(x) = v(x)f(x) + n(x), F is the probability distribution of the spatially-dependent scaling factor f(x) (i.e., bias field). The FWHM parameter is in reference to the F distribution. Another reason to read the original N3 discussion is that Sled discusses varying the FWHM parameter in the evaluation.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #334 (comment), or mute the thread https://github.com/notifications/unsubscribe/AKie-PjQPO7h-xFpNcZOKJppmFczosnEks5qQTE-gaJpZM4JAEj6.

@ntustison
Copy link
Member

If you have small voxels, be sure you're taking that into account when using the spline distance option. --b [200] (mm) works for brain images but wouldn't work for your images.

@spinicist
Copy link
Contributor Author

Yes, I’m using -b [1x1x1,3] for the spline initialisation. I guess that’s why adding the third stage made such an improvement.

On 28 Jun 2016, at 15:59, Nick Tustison notifications@github.com wrote:

If you have small voxels, be sure you're taking that into account when using the spline distance option. --b 200 works for brain images but wouldn't work for your images.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #334 (comment), or mute the thread https://github.com/notifications/unsubscribe/AKie-NmelVbyzDlXPrTeM7aU94oJ93RKks5qQTa0gaJpZM4JAEj6.

@gdevenyi
Copy link
Contributor

I find a good way to think about bias field correction is the following:
The FWHM of the bias field correction (N3 or N4) is the minimum scale of the bias field (inhomogeneity in the MRI magnet filed). This decreases with increasing field strength, I'm sure there somewhere exists a paper that has actually worked this out (anyone know of one?).

In the original N3, you just specify the FWHM of the correction, and it tries to fit at that scale immediately. This sometimes has issues, especially when fitting smaller scales due to poor initialization of the splines compared to the actual field.

N4, in comparison, can be initialized at a larger scale, and then with each step decrease the scale to improve convergence.

Your initialization -b [1x1x1,3] creates one control node in each dimension across the image, the therefore is that the scale of correction depends on the size of the image.

Instead, it may make more sense to initialize with a real-world scale like -b [200] as @ntustison suggests. Then, for each stage you add for convergence, the bias field scale FWHM halves

i.e.
--convergence [200,0] will fit 200mm scale only
--convergence [200x200,0] will fit 200mm then 100mm
--convergence [200x200x200,0] will fit 200mm scale, then 100mm, then 50mm
and so on.
The ultimate scale you stop at should be either determined empirically, or based on a paper that describe the bias field extents (which may or may not exist).

Note: My discussions of scale are a slight simplification, N4 actually picks a number of control points based on the scale specified and then doubles them each step.

@spinicist
Copy link
Contributor Author

Thanks Gabriel.

Just to clear up some potential misconceptions - the FWHM I was asking about is for the -t option, not the spline point spacing of the -b option.

The bias field is the inhomogeneity in the RF coil’s receive field - not the main magnetic field. The scale of this inhomogeneity is on the order of the wavelength of the RF field at the field strength / frequency of your scanner. For a 3T scanner the frequency is 128 MHz, which in free space would have a wavelength of about 2 meters. However dielectric effects reduce this to around 20 cm in water - see page 32 of this thesis: http://d-scholarship.pitt.edu/9979/1/saekho_121904.pdf http://d-scholarship.pitt.edu/9979/1/saekho_121904.pdf. For 7T the frequency is 300 MHz, so the corresponding wavelengths will be reduced by a factor of 2.3. So I should probably be using an initial spline distance of ~85mm, given that 200mm is the default and I assume was worked out on 3T images. I’ll give that a try.

Toby

On 30 Jun 2016, at 14:55, Gabriel A. Devenyi notifications@github.com wrote:

I find a good way to think about bias field correction is the following:
The FWHM of the bias field correction (N3 or N4) is the minimum scale of the bias field (inhomogeneity in the MRI magnet filed). This decreases with increasing field strength, I'm sure there somewhere exists a paper that has actually worked this out (anyone know of one?).

In the original N3, you just specify the FWHM of the correction, and it tries to fit at that scale immediately. This sometimes has issues, especially when fitting smaller scales due to poor initialization of the splines compared to the actual field.

N4, in comparison, can be initialized at a larger scale, and then with each step decrease the scale to improve convergence.

Your initialization -b [1x1x1,3] creates one control node in each dimension across the image, the therefore is that the scale of correction depends on the size of the image.

Instead, it may make more sense to initialize with a real-world scale like -b [200] as @ntustison https://github.com/ntustison suggests. Then, for each stage you add for convergence, the bias field scale FWHM halves

i.e.
--convergence [200,0] will fit 200mm scale only
--convergence [200x200,0] will fit 200mm then 100mm
--convergence [200x200x200,0] will fit 200mm scale, then 100mm, then 50mm
and so on.
The ultimate scale you stop at should be either determined empirically, or based on a paper that describe the bias field extents (which may or may not exist).

Note: My discussions of scale are a slight simplification, N4 actually picks a number of control points based on the scale specified and then doubles them each step.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub #334 (comment), or mute the thread https://github.com/notifications/unsubscribe/AKie-Cz2WcvBTaNGKEt3mKEnQh9P2udaks5qQ8rKgaJpZM4JAEj6.

@gdevenyi
Copy link
Contributor

gdevenyi commented Jul 4, 2016

Ah, I missed you were discussing a different parameter.

Thanks for the citation, that's really helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants