Dear Bruce and Christian,
I found the easy way of simply writing 'set cleanup = 0' at the beginning of mri_nu_correct.mni and then I run this command mri_nu_correct.mni --i T2-scic/mri/orig/001.mgz --o nu.mgz --n 2
This way I get all the masks and iterations that were computed.
Now I also see that it generates as many folders as there are iterations, ending with nu2_field and nu2_est if there are two iterations. I see more files now and now I am thinking that the last output is nu2_field, which would be the bias field. So this is why I did not divide anything by hand (also because my 001.mgz and the nu.mgz do not have the same image dimensions) and the info about masked-out voxel would be missing in that case.
All the best and thanks. Barbara
On 28/08/2014 14:46, Bruce Fischl wrote:
Hi Barbara what exactly did you divide? If you look at the recon-all.log it will show the exact inputs and outputs of nu_correct.
cheers Bruce
On Thu, 28 Aug 2014, Barbara Kreilkamp wrote:
Dear Christian,
Thanks a bunch for this answer. I ran all the steps you mentioned (except for the one where I simply do uncorrected/corrected, as these images have different dimensions, it seems nu3 does more than just normalization of intensities, but also image cropping). Do you know anything about the image cropping?
I ended up with the output nu1_mask and nu1_est and I think the last one is the bias field, at least it looks very much like one :). Am I right?
Thanks for your help, Barbara
On 27/08/2014 22:53, Christian Thode Larsen wrote:
Hi Barbara,
I'm not aware of any way that you can do it directly by passing arguments to recon-all (some might correct me on that), but it is possible:
- As N3 models the bias as a multiplicative effect uncorrected =
corrected * bias, the simplest way is to divide each voxel of the volume before and after correction, in order to obtain a volume containing the bias. Note that N3 (by default) works within a mask where low-intensity voxels have been thresholded away. These voxels will contain garbage if you divide all voxels in the volume.
- Somewhat more complicated: you can specify the -keeptmp flag combined
with -tmp SOMEDIR/ (remember the trailing slash) to N3, in order to preserve its working files. This requires you to modify the N3 binary call in the mri_nu_correct.mni script. You also need to convert the mnc files from the tmp dir, so that you can work with the volumes.
- if you do 2), you also get hold of the low-intensity voxel mask that
N3 operates within. You can use this to constrain the division mentioned in 1).
Best, Christian
On 8/27/2014 11:18 PM, Barbara Kreilkamp wrote:
Dear all,
Is there a way to output the N3's (non-parametric normalization step) output? I am interested in the bias field that was computed to correct the image intensities.
Thank you for your help, Barbara _______________________________________________ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is addressed. If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Partners Compliance HelpLine at http://www.partners.org/complianceline . If the e-mail was sent to you in error but does not contain patient information, please contact the sender and properly dispose of the e-mail.
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer