-
Notifications
You must be signed in to change notification settings - Fork 193
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
Blockwise and Chunked python bindings #373
Open
kkiefer
wants to merge
15
commits into
ukoethe:master
Choose a base branch
from
kkiefer:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new file: multi_chunked.hxx new file: ../../test/chunkedconvolution/CMakeLists.txt new file: ../../test/chunkedconvolution/test_chunked_convolution.cxx new file: ../../test/chunkedconvolution/utils.hxx modified: multi_array_chunked.hxx modified: ../../test/CMakeLists.txt ** in file multi_chunked.hxx ** The following functions have been overloaded: gaussianSmoothMultiArray gaussianGradientMultiArray gaussianDivergenceMultiArray gaussianGradientMagnitudeMultiArray hessianOfGaussianMultiArray hessianOfGaussianEigenvaluesMultiArray hessianOfGaussianFirstEigenvalueMultiArray hessianOfGaussianLastEigenvalueMultiArray laplacianOfGaussianMultiArray symmetricGradientMultiArray structureTensorMultiArray ** in file multi_array_chunked.hxx ** Added the "function": CompareChunkedArray ** in folder test ** Added test for the overloaded functions in multi_chunked.hxx
I cleaned up the commit history and created a new PR #378. Please continue the discussion there. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The module vigra.blockwise module now contains the following functions, all of which are executed in parrallel. For all functions the out parameter is optional unless your source is a hdf5 chunked array, in this case the user is required to specify the out parameter because we can not provide reasonable default names for the associate file and dataset name. If not specify the out parameter will have the same array type / chunked array backend as source.
Unlike the c++ backend, we do not have a way to construct a chunked array containing tinyvector data
on python side as of right now. This implies that one may only call functions on chunked arrays where source as well as out are chunked arrays containing scalar data. In particular this means one can not compute hessianOfGaussianEigenvalues on chunked arrays on python side but calling hessianOfGaussianFirstEigenvalues is perfectly fine because we only need chunked arrays with tinyvector data internally.
Function 1) to 11) return the out paramter.
Function 12) and 13) return a tuple (maxLabel, out).
We support the following datatypes:
Function 1) to 11) -> source.dtype = numpy.float32 out.dtype = numpy.float32
Function 12) and 13) -> source.dtype = numpy.uint8 | uint32 | float32 out.dtype = numpy.float32
Adding additional datatypes is easy to do, please feel free to make an issue or write an e-mail in case u need them.
The option classes [design is not finalized]:
Both option class live in the module vigra.blockwise.
BlockwiseLabelOptions.
-) default constructor
-) property: blockshape
-) property: numThreads
-) property: backgroundValue
-) property: neighborhood (either "direct" or "indirect")
-) function: hasBackgroundValue() [returns bool]
freestanding factory:
labelOptions(blockshape, neighborhood="direct", backgroundValue=None, numThreads=cpuCount())
BlockwiseConvolutionOptionsXD. [X element of {1,2,3,4,5}]
-) default constructor
-) property: stdDev
-) property: innerScale
-) property: outerScale
-) property: blockshape
-) property: numThreads
freestanding factory:
convolutionOptions(blockshape, sigma=None, innerScale=None, outerScale=None, numThreads=cpuCount()) [X = len(blockshape)]