I performed a study using a 32-channels coil that gave me a pretty bright spot in the occipital lobe. I thought that usual bias field correction would have take care of it, but it seems that this is not the case. So, I turned myself to the N4 bias field correction, that seemed to me much more apt to the job.
Indeed, a call as following give better reults that, e.g., SPM bias field correction:
What are the parameters numberOfIterations and convergenceThreshold? and how can I know how many iterations and what threshold should be considered?
What does this means 100x100x100x100?
Sorry for lots of questions
Thanks
Last edit: Sara 2018-01-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Probably start with the default, i.e., 50x50x50x50. You might want to see what increasing the number will do---100x100x100x100but keep the convergenceThreshold at 0.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am doing N4 bias Correction on knee MRIs, and this the output that I got from 100 iterations
N4BiasFieldCorrection -d 3 -i image.nii -s 2 -c [100x100x100x100,0.0000000001] -o [image-out.nii,image-bias.nii]
the following image shows the original image, bias field and corrected images. And Bias correction with another Matlab toolbox (Multiplicative intrinsic component optimization (MICO) for MRI bias field estimation).
My question is that I tried ANTs Bias field correction with 100, 50 and 30 iterations separately. However, it does not improve the intensity of tissues as MICO 's bias correction. Of course these two tools are not comparable. I would like to use ANTs, however, i am worried whthere should i change a specific parameters?
I would really appreciate if you guide me.
Thank a lot
I am doing N4 bias Correction on knee MRIs, and this the output that I got
from 100 iterations
N4BiasFieldCorrection -d 3 -i image.nii -s 2 -c [100x100x100x100,0.0000000001] -o [image-out.nii,image-bias.nii]
My question is that I tried ANTs Bias field correction with 100, 50 and 30
iterations separately. However, it does not improve the intensity of
tissues as MICO 's bias correction. Of course these two tools are not
comparable. I would like to use ANTs, however, i am worried whthere should
i change a specific parameters?
I would really appreciate if you guide me.
Thank a lot
the medical images were in .dcm format that I had load them into matlab to create the ground truth from the points. What I did was I loaded the dicom info into matlab, and then I used NIfTI_toolbox in Matlab to save as nii format by calculating the voxel size voxel_size=[dinfo.PixelSpacing',dinfo.SliceThickness]. Am I doing a mistake in ceating nii?
You might be okay. The image just looked odd to me. I don't know what kind of vetting that the Nifti toolbox has gone through. We use dcm2nii. Regardless, N4 should work either way so you might want to explore the other two items I mentioned.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I really apprecaite your help. It is inspiring that you have developed such amazing tools and replying users question with patience and humility. Thanks a lot.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It reduces outlier intensity values using truncation. For example, suppose you have an image with intensity values in the range [0,100] If you specify an upper truncation limit of 95, it will take all intensity values > 95 and set them equal to 95.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you verch for your explanation.
I applied-b [150] option and it did not make any difference in the illumination of different tissues. My the other question is that using DenoiseImage will be useful to use before using TruncateImageIntensity?
I wanna apply the following steps on MRIs in order:
1.N4BiasFieldCorrection
2.DenoiseImage
3.ImageMath (TruncateImageIntensity)
Thanks once again for your help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you have an accurate brain mask, passing that with -x is another way to improve results. The Otsu segmentation often does a decent job but might not be perfect.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Indeed it seems that the script is calculating a mask using the Otsu method by itself, since it print, at the very beginning "Mask not found, creating Otsu mask".
Am I missing something ?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Right, if you don't specify a mask, N4 will create one. But you don't know how well that masking step performs. With an external mask, you can be sure that the whole brain and no extra bits are included.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You can try antsBrainExtraction.sh. You can also run with your existing N4 call and update the bias correction later in the pipeline, if you will define a brain mask at some point.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everybody,
I performed a study using a 32-channels coil that gave me a pretty bright spot in the occipital lobe. I thought that usual bias field correction would have take care of it, but it seems that this is not the case. So, I turned myself to the N4 bias field correction, that seemed to me much more apt to the job.
Indeed, a call as following give better reults that, e.g., SPM bias field correction:
However, this is not as good as I would like, so I decided to try to boost a little bit the results using this second call
The problem is that this call throws this error
Running N4 for 3-dimensional images.
Mask not read. Creating Otsu mask.
Exception caught:
itk::ExceptionObject (0x301df60)
Location: "unknown"
File: /mnt/build/avants/bin/ITKv4/Modules/Core/Common/src/itkProcessObject.cxx
Line: 1186
Description: itk::ERROR: ImageToImageFilter(0x3022720): Input Primary is required but not set.
Now, as you can see, the input image is set and does exist, as it is exactly the same as my first call, does anyone know what I am doing wrong ?
Alain
Hmmm, let's start out by fixing the call. Instead of this
$ N4BiasFieldCorrection -d 3 -i 7875_T1.nii -s 2 -c [numberOfIterations=100x100x100x100,convergenceThreshold=0.0000000001] -o prova2.nii.gz
it should be
$ N4BiasFieldCorrection -d 3 -i 7875_T1.nii -s 2 -c [100x100x100x100,0.0000000001] -o prova2.nii.gz
Thank Nick, I feel slightly dumb for this !
I will check my calls better!
Thanks Nick,
What are the parameters numberOfIterations and convergenceThreshold? and how can I know how many iterations and what threshold should be considered?
What does this means 100x100x100x100?
Sorry for lots of questions
Thanks
Last edit: Sara 2018-01-24
Probably start with the default, i.e.,
50x50x50x50
. You might want to see what increasing the number will do---100x100x100x100
but keep theconvergenceThreshold
at 0.Hi Nick, Thanks for your amazing tool,
I am doing N4 bias Correction on knee MRIs, and this the output that I got from 100 iterations
N4BiasFieldCorrection -d 3 -i image.nii -s 2 -c [100x100x100x100,0.0000000001] -o [image-out.nii,image-bias.nii]
the following image shows the original image, bias field and corrected images. And Bias correction with another Matlab toolbox (Multiplicative intrinsic component optimization (MICO) for MRI bias field estimation).
My question is that I tried ANTs Bias field correction with 100, 50 and 30 iterations separately. However, it does not improve the intensity of tissues as MICO 's bias correction. Of course these two tools are not comparable. I would like to use ANTs, however, i am worried whthere should i change a specific parameters?
I would really appreciate if you guide me.
Thank a lot
Last edit: Sara 2018-06-13
can you share the original image?
brian
On Wed, Jun 13, 2018 at 9:24 AM, Sara saraeb@users.sourceforge.net wrote:
Thanks Brian, I have attached the original image with the name of 'original_image-001-023_org.png'.
Hi Sara,
By "original images" we mean the nifti files.
Thanks,
Nick
Oh I am really sorry, sure. I have attached here. thank you for your help
Last edit: Sara 2018-06-14
A couple things:
Is the image spacing correct? The headers specifies isotropic spacing but that makes the image look odd to me.
Another important parameter to play with is the
-b
option. You should do something like-b [150]
or-b [100]
.You have some outlier intensities so you might want to truncate those before applying N4. You can use
ImageMath
, i.e.Dear Nick,
.dcm
format that I had load them into matlab to create the ground truth from the points. What I did was I loaded the dicom info into matlab, and then I used NIfTI_toolbox in Matlab to save asnii
format by calculating the voxel sizevoxel_size=[dinfo.PixelSpacing',dinfo.SliceThickness]
. Am I doing a mistake in ceatingnii
?You might be okay. The image just looked odd to me. I don't know what kind of vetting that the Nifti toolbox has gone through. We use
dcm2nii
. Regardless, N4 should work either way so you might want to explore the other two items I mentioned.I really apprecaite your help. It is inspiring that you have developed such amazing tools and replying users question with patience and humility. Thanks a lot.
Dear Nick,
Could I ask what exactly
TruncateImageIntensity
is doing?It reduces outlier intensity values using truncation. For example, suppose you have an image with intensity values in the range [0,100] If you specify an upper truncation limit of 95, it will take all intensity values > 95 and set them equal to 95.
Thank you verch for your explanation.
I applied
-b [150]
option and it did not make any difference in the illumination of different tissues. My the other question is that usingDenoiseImage
will be useful to use before usingTruncateImageIntensity
?I wanna apply the following steps on MRIs in order:
1.N4BiasFieldCorrection
2.DenoiseImage
3.ImageMath (TruncateImageIntensity)
Thanks once again for your help
I have a hard time believing that. What are you using to visualize the images?
Dear Nick,
I used itksnap to visualize it. My apologies for asking many question. I could find out my mistake and thanks for your help :)
Last edit: Sara 2018-06-21
If you have an accurate brain mask, passing that with
-x
is another way to improve results. The Otsu segmentation often does a decent job but might not be perfect.I ll try that too, thanks!
Indeed it seems that the script is calculating a mask using the Otsu method by itself, since it print, at the very beginning "Mask not found, creating Otsu mask".
Am I missing something ?
Right, if you don't specify a mask, N4 will create one. But you don't know how well that masking step performs. With an external mask, you can be sure that the whole brain and no extra bits are included.
Yep, I see. So you would still advise to create the mask on my own.
How would you suggest to do it ?
You can try
antsBrainExtraction.sh
. You can also run with your existing N4 call and update the bias correction later in the pipeline, if you will define a brain mask at some point.