Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

A lot of console output even after turning it off #491

Open
ArturRuppel opened this issue Oct 16, 2022 · 1 comment
Open

A lot of console output even after turning it off #491

ArturRuppel opened this issue Oct 16, 2022 · 1 comment

Comments

@ArturRuppel
Copy link

Hello,

thanks for this great tool! I have a minor issue with not being able to turn off the console outputs during registration. The function that is supposed to suppress them doesn't seem to be working for me.

Here my code snippet:

` moving_image_sitk = sitk.GetImageFromArray(moving_image)
fixed_image_sitk = sitk.GetImageFromArray(fixed_image)

    parameterMap = sitk.GetDefaultParameterMap('translation')
    parameterMap['Metric'] = ["AdvancedNormalizedCorrelation"]
    parameterMap['WriteResultImage'] = ["false"]
    parameterMap['NumberOfResolutions'] = ['6']

    elastixImageFilter = sitk.ElastixImageFilter()
    elastixImageFilter.LogToConsoleOff()
    elastixImageFilter.SetFixedImage(fixed_image_sitk)
    elastixImageFilter.SetMovingImage(moving_image_sitk)
    elastixImageFilter.SetParameterMap(parameterMap)
    elastixImageFilter.Execute()`

Thanks in advance, hope that is enough information!

@ArturRuppel
Copy link
Author

For some reason it started to work after changing the interpolator with this line of code:

parameterMap['ResampleInterpolator'] = ["FinalLinearInterpolator"]

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

No branches or pull requests

1 participant