Skip to content
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

plot.antsImage bug: error for empty overlay #189

Open
dorianps opened this issue Oct 29, 2017 · 0 comments
Open

plot.antsImage bug: error for empty overlay #189

dorianps opened this issue Oct 29, 2017 · 0 comments

Comments

@dorianps
Copy link
Collaborator

dorianps commented Oct 29, 2017

Sometimes the overlay image might be an empty image. When plot is attempted in that case, there is an error.

> img = antsImageRead('ch2.nii.gz')
> imgempty = img*0
> plot(img,imgempty)
Error in if (window.overlay[1] == window.overlay[2]) { :
  missing value where TRUE/FALSE needed

Trying to set window.overlay gives another error.

> plot(img,imgempty, window.overlay=c(0,0))
Error in max(c(zeroval, (zeroval))):(zeroval + 1) : NA/NaN argument
> plot(img,imgempty, window.overlay=c(0,1))
Error in max(c(zeroval, (zeroval))):(zeroval + 1) : NA/NaN argument

I know which lines are causing the error, but don't have time right now to follow the function flow and apply a surgical fix. Keeping this issue open as a reminder to anyone who can fix the bug.

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

1 participant