Hi Bryn,<br><br><br>1) It is normal for the coefficients to be reported with slightly <br>&nbsp;&nbsp;&nbsp; different values each time that the tool is run. This, as you<br>&nbsp;&nbsp;&nbsp; pointed out, is due to the internal use of the OnePlusOne<br>
&nbsp;&nbsp;&nbsp; evolutionary optimizer.<br><br><br>2) Please note that &quot;how big&quot; the changes of the coefficients are,<br>&nbsp;&nbsp;&nbsp; is something that must be interpretend in the context of the <br>&nbsp;&nbsp;&nbsp; polynomials that these coefficients represent.<br>
<br><br>For the record please find below the results that I get in my local machine.<br><br><br>When using the following command:<br><br>&nbsp;./BiasFieldEstimator --input ~/data/BrainWeb/brainweb165a10f17.mha --class-mean 80&nbsp; 130 --class-sigma 10 10 --use-log yes --input-mask brainMask.mha --degree 3 --grow 1.01 --shrink 0.95 --max-iteration 20000 --init-step-size 1.0 --schedule 2 2 2<br>
<br>I get the following output:<br><br><br>Loading images...<br>Images loaded.<br>Setting multires schedule :1<br>Estimating the bias field...<br>--input /home/ibanez/data/BrainWeb/brainweb165a10f17.mha --input-mask brainMask.mha --class-mean 80 130 --class-sigma 10 10 --use-log yes&nbsp; --degree 3 --grow 1.01 --shrink 0.95 --volume-max-iteration 20 --inter-slice-max-iteration 4000 --init-step-size 1 --coefficients 0.00324493 0.00285925 0.0112537 -0.00752933 -0.00259406 0.0103765 0.0118277 0.00271833 -0.0157952 0.00323054 -0.0111964 0.0136344 0.0137674 -0.0195429 0.0252928 0.00874817 -0.00472533 0.0132882 0.00348112 -0.00622985 <br>
<br>The brainMask.mha was generated by binary thresholding the input image<br>brainweb165a10f17.mha at a level of 80.<br><br><br>I can then, take the resulting coefficients as input for the ImageCorrector,<br>with the following command:<br>
<br>./ImageCorrector --input /home/ibanez/data/BrainWeb/brainweb165a10f17.mha --output correctedImage.mha --degree 3 --use-log yes --coefficients 0.00324493 0.00285925 0.0112537 -0.00752933 -0.00259406 0.0103765 0.0118277 0.00271833 -0.0157952 0.00323054 -0.0111964 0.0136344 0.0137674 -0.0195429 0.0252928 0.00874817 -0.00472533 0.0132882 0.00348112 -0.00622985<br>
<br>This produces a corrected image.<br><br><br>You are correct in that, if I run the estimator multiple time, it will produce<br>slightly different results. Again the correctness of each one of the individual<br>results must be interpreted in terms of the polynomials that will be used for<br>
the correction.<br><br>See below, subsequence runs of the exact same estimation command:<br><br><br>Loading images...<br>Images loaded.<br>Setting multires schedule :1<br>Estimating the bias field...<br>--input /home/ibanez/data/BrainWeb/brainweb165a10f17.mha --input-mask brainMask.mha --class-mean 80 130 --class-sigma 10 10 --use-log yes&nbsp; --degree 3 --grow 1.01 --shrink 0.95 --volume-max-iteration 20 --inter-slice-max-iteration 4000 --init-step-size 1 --coefficients 0.0134269 0.0202263 0.00169249 0.00282789 0.00010718 0.00300399 -0.00800395 -0.00404422 0.00371428 0.00299892 0.0187534 -0.00332432 0.0125541 0.0121211 0.00732879 0.0076021 0.00305025 -0.00499408 -0.0234599 0.00227258 <br>
<br>Loading images...<br>Images loaded.<br>Setting multires schedule :1<br>Estimating the bias field...<br>--input /home/ibanez/data/BrainWeb/brainweb165a10f17.mha --input-mask brainMask.mha --class-mean 80 130 --class-sigma 10 10 --use-log yes&nbsp; --degree 3 --grow 1.01 --shrink 0.95 --volume-max-iteration 20 --inter-slice-max-iteration 4000 --init-step-size 1 --coefficients 0.00798128 0.0262933 0.00123127 -0.00268059 -0.00844952 0.0081207 0.0041786 -0.00708119 0.00602885 0.0119248 -0.00464199 0.00428011 0.0180249 -0.0159507 0.0100633 0.00221582 0.00835673 0.014121 -0.00110316 -0.00652514 <br>
<br>Loading images...<br>Images loaded.<br>Setting multires schedule :1<br>Estimating the bias field...<br>--input /home/ibanez/data/BrainWeb/brainweb165a10f17.mha --input-mask brainMask.mha --class-mean 80 130 --class-sigma 10 10 --use-log yes&nbsp; --degree 3 --grow 1.01 --shrink 0.95 --volume-max-iteration 20 --inter-slice-max-iteration 4000 --init-step-size 1 --coefficients -0.0296475 0.00381279 -0.0104907 0.0032725 0.0110771 0.029399 0.020405 0.00330157 0.0034649 -0.00315351 0.00130834 -0.00658817 0.0145596 0.0191295 0.00672149 0.0054705 -0.00427434 0.00168028 -0.0180597 0.00478804 <br>
<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Regards,<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Luis<br><br><br><br>----------------------------------------------<br><div class="gmail_quote">On Tue, Feb 10, 2009 at 12:21 PM, Bryn Lloyd <span dir="ltr">&lt;<a href="mailto:blloyd@vision.ee.ethz.ch">blloyd@vision.ee.ethz.ch</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi<br>
<br>
I tried to use the MRIBiasCorrection tools in the ITK Application folder. However, I am not really sure about their usage.<br>
<br>
As explained in the README file, I call BiasFieldEstimator in order to estimate the coefficients. The strange this is that I get (very) different coefficients each time I run this tool.<br>
Is this because of the Evolutionary algorithm?<br>
<br>
Thanks<br>
Bryn<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div><br>