[slicer-users] Command line for N4ITK MRI Bias Correction

Andriy Fedorov fedorov at bwh.harvard.edu
Wed Oct 20 09:37:12 EDT 2010


Stan,

Yes, Slicer's N4 configuration is set up to use 3 resolutions. And
also, as Steve explained, it is using a different "format" of command
line arguments. So the command line parameters that you will see in
the error log window will need to be "translated" into IJ N4, if you
want to compare the results. Most of the parameters are explained in
the module documentation:

http://wiki.slicer.org/slicerWiki/index.php/Modules:N4ITKBiasFieldCorrection-Documentation-3.6

The actual filters used by Slicer and IJ N4 are almost identical. The
minor changes I did were to keep track of execution progress, and to
fix some uninitialized variables.

Hope this helps

AF



On Wed, Oct 20, 2010 at 09:12, Steve Pieper <pieper at bwh.harvard.edu> wrote:
> Hi Stan -
>
> You can find the command line in the Error Log window (or in the
> terminal window if you run via linux or mac).  I think that will give
> you what you need.
>
> Slicer's command line arguments are handled differently from n4's
> native.  The system is described at the link below.
>
> http://www.slicer.org/slicerWiki/index.php/Slicer3:Execution_Model_Documentation
>
>
> Best,
> Steve
>
> On 10/20/2010 08:00 AM, Estanislao Oubel wrote:
>> Hi all,
>>
>> Is there any way of knowing which arguments are passed to a command line
>> program by a module?
>> I mean, I'd like to recover the command line generated by slicer and
>> then use it externally.
>> I'm testing N4ITK MRI Bias Correction, but I don' have the same results
>> with Slicer and the code I've
>> downloaded from the Insight Journal site (Slicer's results are better).
>> So I wonder if I'm using the command line correctly ...
>>
>> Slicer's default parameters are:
>>
>> Number of iterations: 50,40,30
>> Convergence threshold: 0.0001
>> BSpline grid resolution: 1,1,1
>> Spline distance: 0
>> Shrink factor: 4
>>
>> BSpline order: 3
>> BSpline alpha: 0
>> BSpline beta: 0.5
>> histogram sharpening: 0
>>
>> According to "N4 --help" the command line for these parameters should be:
>>
>> N4 3 -i image.nii.gz -x mask.nii.gz -o
>> [image_corrected.nii.gz,bias.nii.gz] -c [50,0.0001] -b [1,1,1] -s 4 -t 0
>>
>> I'm using 50 iterations because I don't know how to use multiple levels
>> with the command line (perhaps that's the problem)
>> I'm using -b [<initialMeshResolution>] instead of -b
>> [<splineDistance>,<splineOrder>,<sigmoidAlpha>,<sigmoidBeta>]
>>
>> Somebody can help?
>>
>> Thanks a lot!
>>
>> stan
>>
>>
>>
>>
>> _______________________________________________
>> slicer-users mailing list
>> slicer-users at bwh.harvard.edu
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> To unsubscribe: send email to slicer-users-request at massmail.spl.harvard.edu with unsubscribe as the subject
> _______________________________________________
> slicer-users mailing list
> slicer-users at bwh.harvard.edu
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to slicer-users-request at massmail.spl.harvard.edu with unsubscribe as the subject
>



More information about the slicer-users mailing list