-
Notifications
You must be signed in to change notification settings - Fork 33
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
Various improvements #166
Merged
Various improvements #166
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
- enable custom output formatting via dedicated method - allow multiple file extensions via `file_ext` tuple/list - add missing call to read_tar - allow passing parallel as ('auto', threshold) tuple
- accept dotprops (see new `dp_dist` parameter) - new parameter: `n_largest`
- VoxelNeuron.density = fraction of filled voxels - VoxelNeuron.nnz = number of non-zero voxels - VoxelNeuron.count_nonzero(): see above
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.
Initially, the purpose of this PR is to improve NAVis' handling of image data. However, over time it has morphed into a collection of more-or-less related improvements:
navis.config.add_units=True
(default isFalse
) will add units to certain neuron properties; this is a test balloon and could be extended/switched on by defaultread_nrrd
,read_mesh
andread_tiff
to useBaseReader
(allows reading from URLs and archives, parallel processing, etc)BaseReader
now understands patterns for searching directories (mostly forread_mesh
)read_*
function that use the reader now have anerror
parameter to determine what happens if file content can't be parsedDotprops
:navis.drop_fluff
can now be used to remove dust or get the N largest connected components inDotprops
read_nrrd
andread_tiff
now accept athin
parameternavis.neuron2nx
now works withDotprops
TreeNeurons
can now be initialised from a(vertices, edges)
tuple (see also newnavis.edge2neuron
function)navis.thin_voxels
uses scikit-image (optional dependency) to thin images to single-voxel widthTreeNeuron.vertices
gives quick, read-only access to node positionsVoxelNeuron.nnz
andVoxelNeuron.density
TODOs
add tutorial on image transforms/registrationnavis.downsample_neuron
use Poisson disk sampling for dotprops (implemented but not exposed yet - it's expensive)look into whether we can makenavis.skeletonize
smarter for dotpropsaddvoxel2skeleton
function for VoxelNeurons (using kimimaro) and wrap innavis.skeletonize
Important
This PR switches a number of
ImportErrors
toModuleNotFoundErrors
. Forpykdtree
on OSX that may mean that it fails to import if the wheel was compiled with OMP support butlibomp
is not installed. We for now pinned thepykdtree
version.