Command line for N4ITK MRI Bias Correction

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Command line for N4ITK MRI Bias Correction

stan-2
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
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Command line for N4ITK MRI Bias Correction

pieper
Administrator
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
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Command line for N4ITK MRI Bias Correction

Andrey Fedorov
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 <[hidden email]> 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
>> [hidden email]
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
>
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Command line for N4ITK MRI Bias Correction

stan-2
Thanks a lot Andriy, Steve, and Stuart !

I don't see the command line in the terminal ... Do I have to enable any
option?
I'm using Slicer 3.6.1 under linux 64 (debian squeeze)

stan




Le 20/10/2010 15:37, Andriy Fedorov a écrit :

> 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<[hidden email]>  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
>>> [hidden email]
>>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>>> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
>>>        
>> _______________________________________________
>> slicer-users mailing list
>> [hidden email]
>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
>>
>>      

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
Reply | Threaded
Open this post in threaded view
|

Re: Command line for N4ITK MRI Bias Correction

stan-2
Cool. Thanks!


Le 20/10/2010 16:40, Stuart Wallace a écrit :

> Click on the circle with the X in the middle in the bottom right corner. Popup window should popup from there.
> Sent from my Verizon Wireless BlackBerry
>
> -----Original Message-----
> From: Estanislao Oubel<[hidden email]>
> Sender: [hidden email]
> Date: Wed, 20 Oct 2010 16:25:02
> To: Andriy Fedorov<[hidden email]>
> Cc:<[hidden email]>
> Subject: Re: [slicer-users] Command line for N4ITK MRI Bias Correction
>
> Thanks a lot Andriy, Steve, and Stuart !
>
> I don't see the command line in the terminal ... Do I have to enable any
> option?
> I'm using Slicer 3.6.1 under linux 64 (debian squeeze)
>
> stan
>
>
>
>
> Le 20/10/2010 15:37, Andriy Fedorov a écrit :
>    
>> 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<[hidden email]>   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
>>>> [hidden email]
>>>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>>>> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
>>>>
>>>>          
>>> _______________________________________________
>>> slicer-users mailing list
>>> [hidden email]
>>> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
>>> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
>>>
>>>
>>>        
> _______________________________________________
> slicer-users mailing list
> [hidden email]
> http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
> To unsubscribe: send email to [hidden email] with unsubscribe as the subject
>
>
>    

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject