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

Implement forced 2D texture extraction. #215

Merged
merged 2 commits into from
Mar 22, 2017

Conversation

JoostJM
Copy link
Collaborator

@JoostJM JoostJM commented Mar 6, 2017

Add additional parameters to optionally force texture calculation to 2D. This is enabled by setting parameter force2Dextraction to True. Then, all angles moving across 'slices' are removed. The dimension which specifies the slice is defined in force2Ddimension. For example, if enabled and dimension is 0, texture is extracted only in the xy-plane (with dimension 0 specifying the 'z' dimension as slice-dimension). Forced 2D extraction is switched off by default.

Additionally, enable specifying custom distances between center voxel and neighbors. These distances are specified in the distances parameter as a list of integers. By default disances = [1].

@JoostJM JoostJM force-pushed the add-forced-2d-calculation branch from 08a1a3a to 10a0eb5 Compare March 20, 2017 09:09
:return: numpy array with shape (N, 3), where N is the number of unique angles
"""

distances = kwargs.get('distances', [1])
force2Dextraction = kwargs.get('force2Dextraction', False)
force2Ddimension = kwargs.get('force2Ddimension', 0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comment - the names of these two are a bit confusing, since to me they both imply boolean type. Maybe call them force2D and force2Ddimension?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fedorov good suggestion, thanks! Will change.

JoostJM added 2 commits March 21, 2017 17:05
Add additional parameters to optionally force texture calculation to 2D. This is enabled by setting parameter `force2Dextraction` to True. Then, all angles moving across 'slices' are removed. The dimension which specifies the slice is defined in `force2Ddimension`. For example, if enabled and dimension is 0, texture is extracted only in the xy-plane (with dimension 0 specifying the 'z' dimension as slice-dimension). Forced 2D extraction is switched off by default.

Additionally, enable specifying custom distances between center voxel and neighbors. These distances are specified in the `distances` parameter as a list of integers. By default `disances = [1]`.
As per @fedorov's suggestion, rename this parameter to prevent confusion.

Additionally, add the default settings controlling forced 2D extraction to default parameters defined in `featureextractor`.
Also update the param schema to allow these setting in the parameter file.
@JoostJM JoostJM force-pushed the add-forced-2d-calculation branch from 3427755 to 91d3065 Compare March 21, 2017 16:13
@JoostJM JoostJM merged commit 8824cc6 into AIM-Harvard:master Mar 22, 2017
@JoostJM JoostJM deleted the add-forced-2d-calculation branch March 22, 2017 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants