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

Update c extensions #463

Merged
merged 5 commits into from Feb 20, 2019
Merged

Conversation

JoostJM
Copy link
Collaborator

@JoostJM JoostJM commented Feb 13, 2019

Update C extensions to make extraction N-Dimensional

Rewrite the functions to be dimension unaware.
For testing purposes, number of dimensions are hardcoded in the python wrapper and additional output is printed.
- Update checks from ensuring NDim = 3 to NDim(image) == NDim(mask)
- Parse out number of dimensions from image array and use it to instantiate the size and strides arrays
- Switch calloc for malloc (no need to have the arrays initialized.
- Switch the loops for initializing the texture arrays for a `memset` statement
At certain places only a specific (range of) dimension(s) is allowed (e.g. local binary pattern filter). At those places, a check is implemented, preventing calculation if the dimensionality is wrong.
Additionally, add the dimensionality to the output as part of the diagnostic features.
- Move parsing of distances and building the angles array to a separate function
- Move the conversion of image and mask objects to the try_parse_arrays function
@JoostJM JoostJM merged commit 5cb7cd4 into AIM-Harvard:master Feb 20, 2019
@JoostJM JoostJM deleted the update-c-extensions branch March 15, 2019 09:52
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.

None yet

1 participant