How to use N4BiasFieldCorrection

As mentioned above, I have no idea how to use that since I can not see what is the input and what is the output.?:disappointed:

Here is the ubuntu man page:
http://manpages.ubuntu.com/manpages/trusty/man1/N4BiasFieldCorrection.1.html

It looks like you can also call β€œN4BiasFieldCorrection --help” for more information.

You mean this? I am so sorry to say that I use win10. And I know little about Linux~~

@111

That is an error of a jupyter notebook, with probably a python interpreter, potentially running on Windows 10 in which you introduced a shell command line. You get an error because you are using a long dash before the --help argument, instead of the double short-dash --. If you wrote the command correctly as @Jonathan_R_Williford suggested, I bet you would have got an error for using shell in a Python cell (I’d say a NameError: name 'N4BiasFieldCorrection' is not defined).

N4BiasFieldCorrection is a tool written in C++ that you need to install in your computer. You can either compile it from scratch (e.g. compiling the Advanced Normalization Tools -ANTs-) or you can download a binary for windows (also possible from here https://github.com/stnava/ANTs/releases/tag/v2.1.0).

Once you have it installed, you should be able to run the command @Jonathan_R_Williford suggested. If you are to do it inside a jupyter notebook, then you should use the ! magic like so: ! N4BiasFieldCorrection --help.

However, given your too broad question in the beginning and your reply showing a jupyter notebook, I am under the impression that you probably should first understand your framework before you start looking the particular pieces (like N4BiasFieldCorrection).

1 Like