Skip to content

Get label probabilities#8

Merged
casperdcl merged 8 commits intocasperdcl:develfrom
KrisThielemans:get_label_probabilities
Sep 16, 2020
Merged

Get label probabilities#8
casperdcl merged 8 commits intocasperdcl:develfrom
KrisThielemans:get_label_probabilities

Conversation

@KrisThielemans
Copy link
Copy Markdown
Contributor

@KrisThielemans KrisThielemans commented Jul 28, 2020

This PR (#8) fixes #2

Also this PR supersedes:

@KrisThielemans KrisThielemans force-pushed the get_label_probabilities branch from b2d08b0 to fd4e8f1 Compare July 28, 2020 21:03
@KrisThielemans
Copy link
Copy Markdown
Contributor Author

This PR has a problem. skimage.transform.resize is used for interpolation as follows

brainweb/brainweb/utils.py

Lines 445 to 447 in 202eb40

arr = resize(arr, new_shape,
order=1, mode='constant', anti_aliasing=False,
preserve_range=True).astype(dtype)

However this does not give "probability maps", and there's no guarantee they'd add to 1 at all. In fact, I get values slightly negative or larger than 1 at edges of the masks (which I don't understand).

This seems therefore only correct when using outres=brainweb.

@casperdcl
Copy link
Copy Markdown
Owner

Sorry somehow missed the notification about this! Will review and merge in <24h

@casperdcl casperdcl linked an issue Sep 16, 2020 that may be closed by this pull request
@casperdcl casperdcl changed the base branch from master to devel September 16, 2020 10:50
@casperdcl casperdcl mentioned this pull request Sep 16, 2020
pass the `outres` parameter to ToPetMmr. This meant I had to encode the
resolution in the cached filename.
allow returning a 4D array with the masks (useful for PVC for instance)
@casperdcl casperdcl force-pushed the get_label_probabilities branch from 714868d to dcaf64d Compare September 16, 2020 11:24
@casperdcl casperdcl merged commit 7eaa3ee into casperdcl:devel Sep 16, 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

Successfully merging this pull request may close these issues.

allow specifying different resolution get_mMR_from_file ignore parameters? extract labelfields

2 participants