Skip to content

dcm2niix -m default #3533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
lamaresh opened this issue Jan 19, 2023 · 2 comments
Open

dcm2niix -m default #3533

lamaresh opened this issue Jan 19, 2023 · 2 comments

Comments

@lamaresh
Copy link

the default value for -m argument in dcm2niix is 2 and possible values are 0,1,2,y,n where 0=, 1=y and 2 is described as auto and is an intermediate behaviour so images are not split only on the base of series instance UID (https://github.com/rordenlab/dcm2niix/blob/master/console/main_console.cpp)

in nipype the corresponding merge_imgs input trait is a boolean. I think it should be update to an Enum to maintain the same behaviour of the command line program, something like this for Dcm2niixInputSpec:

merge_imgs = traits.Enum(
        "2",
        "1",
        "0",
        argstr="-m %s",
        usedefault=True,
        desc="merge 2D slices from same series regardless of echo, exposure, etc. - [0=no, 1=yes, 2=auto]")
@effigies
Copy link
Member

We need to preserve backwards compatibility. Fortunately, True == 1 and False == 0, so we could still use an enum:

merge_imgs = traits.Enum(0, 1, 2, argstr='-m %d')

We cannot change the default to 2, though, as that would break tools relying on the default being False.

@lamaresh
Copy link
Author

lamaresh commented Jan 19, 2023

maybe you could skip the argument if not specified by the user, so dcm2niix will use it's own version default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants