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

mask.apply(image) not working #24

Closed
Ralphchahwan opened this issue May 5, 2020 · 1 comment
Closed

mask.apply(image) not working #24

Ralphchahwan opened this issue May 5, 2020 · 1 comment

Comments

@Ralphchahwan
Copy link

Ralphchahwan commented May 5, 2020

Dear @JoHof
Thank you so much for this amazing library, but for some reason it is not working out for me
I hope you could be of help

When I read the image using SimpleITK and then try to apply a mask on that image, I get an error:
IndexError: index 4 is out of bounds for axis 0 with size 4

The error happens in the mask function on line 29:
inimg_raw = np.flip(inimg_raw, np.where(directions[[0,4,8]][::-1]<0)[0]

I am trying to work on CT-images downloaded online, their format is either jpg or png

What can I do to fix this issue?

@JoHof
Copy link
Owner

JoHof commented May 6, 2020

Hi Ralph,

the models were not trained with such images in mind. However, I just added support for jpg and png images using some heuristics to estimate the HU. Download the current version (0.2.5) and use the --noHU tag. Be aware that the results on these kind of images may not be optimal.

@JoHof JoHof closed this as completed May 6, 2020
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