[Insight-users] Some questions in understanding the N4ITK
Nicholas Tustison
ntustison at gmail.com
Mon Jan 9 13:12:58 EST 2012
Hi Wenwu,
First, I would donwload and updated version of N4.cxx
http://advants.svn.sourceforge.net/viewvc/advants/Examples/N4BiasFieldCorrection.cxx?view=log
as I don't use N4.cxx anymore and have updated.
Second, your command line convergence parameter
is incorrect. I'm guessing you meant
-c [20x20x20,0.001]
Doing that works for me.
Nick
Ps. I'm cc'ing the insight users list. I'd recommend keeping this
conversation on the list---I know it's useful for me to search the
archives of previous conversations to find solutions to my
problems.
On Jan 9, 2012, at 10:18 AM, Wenwu wrote:
> Sorry, I forgot to show the commander to run this test. The code is as following:
> N4.exe -d 2 -i e:/image_22 -o e:/image_22BC.mhd -s 2 -c [20*20*20m 0.001] -b [200,3] -t [0.15 0.001, 200]
>
>
> On Mon, Jan 9, 2012 at 6:13 PM, Wenwu <cool.wenwu at gmail.com> wrote:
> Hi Nicholas,
>
> Thank you very much for your kind help! Now there is another problem needed your help!
>
> I run N4 with Dicom image(Reading code I added) to test, because the N4 seems can not output Dicom format, so I choose to output .mhd file. However the outcome is very bad. Could you please give me some suggestion?
>
> In addition, after adding code of writing Dicom format, there is an debug error. The code can run in my other program.
> The code was added as this:
>
> if (outputOption->GetNumberOfParameters() ==0 )
> {
> ...
> typedef itk::GDCMImageIO ImageIOType;
> ImageIOType::Pointer gdcImageTypeIO = ImageIOType::New();
> ...
> Writer->SetFileName(gdcImageTypeIO);
> }
> // of course, other two cases, I also add them
>
> Could you please give some prompt about it?
>
> The original MRI image is attached.
> The result of the N4 processing with .mhd Format is as following:
>
> <image22_BC.png>
>
>
>
>
>
>
>
>
> On Mon, Jan 9, 2012 at 5:17 PM, Nicholas Tustison <ntustison at gmail.com> wrote:
> Hi Wenwu,
>
>> There are some problems when I learn the N4ITK. Firstly, in the paper-"N4ITK:Nick's N3 ITK Implementation For MRI Bias Field Correction" , I found there are 9 parameters (m_MaskMabel, m_numberOfHistogamBins, m_WeinerFilterNoise, m_BiasFieldFullWitdthAtHalfMaximum... ,)need to set, it can also be found in the N4ITK package. However, in the lastest ITK4.0, in the project-ITKBiasCorrectionTestDriver, I open the CMakeLists.txt, and some code is as followiing:
>>
>> itk_add_test(NAME itkN4BiasFieldCorrectionImageFilterTest1
>> COMMAND ITKBiasCorrectionTestDriver
>> --compare DATA{Baseline/N4ControlPoints_3D.nii.gz}
>> ${ITK_TEST_OUTPUT_DIR}/N4ControlPoints_3D.nii.gz
>> itkN4BiasFieldCorrectionImageFilterTest
>> 2
>> DATA{${ITK_DATA_ROOT}/Input/HeadMRVolumeCompressed.mha} # input
>> ${ITK_TEST_OUTPUT_DIR}//N4ControlPoints_3D.nii.gz # control point lattice . , I also can not understand the mean of this parameter
>>
>> 3 # shrink factor
>> 10x10x10 # number of iterations
>> none # mask
>> 150 # spline distance
>> )
>>
>
> The control point lattice is the output defining the bias field.
> You need to remember that this is a test, not a user-level
> application which is what N4.cxx encapsulates.
>
> Nick
>
>
>
>
> --
> Wenwu Zhu
> IRCAD
> University of Strasbourg, France
> Email address: cool.wenwu at gmail.com
>
>
>
>
> --
> Wenwu Zhu
> IRCAD
> University of Strasbourg, France
> Email address: cool.wenwu at gmail.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120109/34b6404c/attachment.htm>
More information about the Insight-users
mailing list