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

BUG: Lesions in background or surrounded by darker tissue could cause… #1265

Merged
merged 1 commit into from
Nov 4, 2021

Conversation

cookpa
Copy link
Member

@cookpa cookpa commented Nov 4, 2021

… a divide by zero

Fix this by checking lesion clusters for non-zero intensity. Also, for
very small clusters, dilate by 2 voxels instead of 1, to improve the
chance of finding suitable neighborhood voxels.

If lesions cannot be filled, they are skipped and a warning is printed

Fixes #1258

… a divide by zero

Fix this by checking lesion clusters for non-zero intensity. Also, for
very small clusters, dilate by 2 voxels instead of 1, to improve the
chance of finding suitable neighborhood voxels.

If lesions cannot be filled, they are skipped and a warning is printed
@cookpa
Copy link
Member Author

cookpa commented Nov 4, 2021

@ntustison @dorianps this is mostly a bug fix but I did add extra dilation for small lesions. The problem encountered by a user was that for small lesions near CSF, the immediate neighborhood may contain 0 valid (ie, brighter) voxels. So I added extra dilation in that case to have a slightly larger pool of voxels to choose from. Does that sound OK?

@ntustison
Copy link
Member

Thanks @cookpa . I would have to defer to @dorianps regarding this change.

@dorianps
Copy link
Collaborator

dorianps commented Nov 4, 2021

Unfortunately I have not used LesionFilling that much. I created a separate approach based on JIF and a number of T1w from controls (starting with a symmetric left right flip to fill first with the subject itself). So, I can't say if this is good or not. From what you describe @cookpa sounds ok.

@cookpa
Copy link
Member Author

cookpa commented Nov 4, 2021

OK thanks!

@cookpa cookpa merged commit 28dd25c into master Nov 4, 2021
@cookpa cookpa deleted the fixSmallLesionError branch November 4, 2021 16:55
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

Successfully merging this pull request may close these issues.

LesionFilling seems not to save the resultant image.
3 participants