Package: ximage
📦 Welcome to ximageDeploymentActivityPython VersionsSupported SystemsProject StatusBuild StatusLintingCode CoverageCode QualityCode ReviewLicenseCommunityCitationSlack|DocsTheximagepackage is in active development. Feel free to try it out, to report issues or to suggest changes.ℹ️ Software OverviewThe software currently enables to:label n-dimensional xarray objectsextract patches around n-dimensional labelsextract patches from n-dimensional xarray objectsJoin theDISDRODB Slack Workspaceto meet the community !🚀 Quick Startximageprovides an easy-to-use interface to manipulate image, videos and n-dimensional arrays with classical image processing techniques.Theximagexarray accessor provides a convenient way to labelling and extract patches in n-dimensional arrays !Image labellingmin_value_threshold=1max_value_threshold=np.infmin_area_threshold=5max_area_threshold=np.inffootprint=Nonesort_by="area"sort_decreasing=Truelabel_name="label"### Label xarray objectxr_obj=da.ximage.label(min_value_threshold=min_value_threshold,max_value_threshold=max_value_threshold,min_area_threshold=min_area_threshold,max_area_threshold=max_area_threshold,footprint=footprint,sort_by=sort_by,sort_decreasing=sort_decreasing,label_name=label_name,)Extract patches around labels# Output Optionsn_patches=10n_labels=Nonelabels_id=Nonehighlight_label_id=False# Patch Extraction Optionspatch_size=(100,100)centered_on="label_bbox"padding=0n_patches_per_label=np.Infn_patches_per_partition=1# Tiling/Sliding Optionspartitioning_method=None# "tiling" / "sliding"n_partitions_per_label=Nonekernel_size=Nonebuffer=0stride=Noneinclude_last=Trueensure_slice_size=Truedebug=Trueverbose=Trueda_patch_gen=xr_obj.ximage.label_patches(label_name=label_name,patch_size=patch_size,variable=variable,# Output Optionsn_patches=n_patches,n_labels=n_labels,labels_id=labels_id,highlight_label_id=highlight_label_id,# Patch Extraction Optionscentered_on=centered_on,padding=padding,n_patches_per_label=n_patches_per_label,n_patches_per_partition=n_patches_per_partition,# Tiling/Sliding Optionspartitioning_method=partitioning_method,n_partitions_per_label=n_partitions_per_label,kernel_size=kernel_size,buffer=buffer,stride=stride,include_last=include_last,ensure_slice_size=ensure_slice_size,debug=debug,verbose=verbose,)Look at theTutorialsto have an overview of the software !🛠️ Installationpipximagecan be installed viapipon Linux, Mac, and Windows.
On Windows you can installWinPythonto get Python and pip
running.
Then, install theximagepackage by typing the following command in the command terminal:pipinstallximageTo install the latest development version via pip, see the
[documentation][doc_install_link].conda [NOT YET AVAILABLE]ximagecan be installed viacondaon Linux, Mac, and Windows.
Install the package by typing the following command in a command terminal:condainstallximageIn case conda-forge is not set up for your system yet, see the easy to follow
instructions onconda-forge.💭 Feedback and Contributing GuidelinesIf you aim to contribute or discuss the future development of ximage,
we highly suggest to join theDISDRODB Slack WorkspaceFeel free to also open aGitHub Issueor aGitHub Discussionspecific to your questions or ideas.✍️  ContributorsGionata GhiggiSon Pham-BaCitationYou can cite theximagesoftware by:Ghiggi Gionata & Son Pham-Ba . ghiggi/ximage. Zenodo.https://doi.org/10.5281/zenodo.8131552If you want to cite a specific version, have a look at theZenodo site.📚 Requirements:xarraydaskdask_imageskimageLicenseThe content of this repository is released under the terms of theMITlicense.