Package: napari-3d-counter
napari-3d-counterA simple plugin for counting objects in 3D imagesThisnapariplugin was generated withCookiecutterusing@napari'scookiecutter-napari-plugintemplate.InstallationYou can installnapari-3d-counterviapip:pip install napari-3d-counterTo install latest development version :pip install git+https://github.com/pnewstein/napari-3d-counter.gitCount3D UsageCount3D can be launched from the plugin menuAdding a cellYou can add a cell of the currently selected cell type by clicking on the viewer.Ensure thatPoint adderlayer is selectedEnsure thatAdd pointstool is selectedClick on the viewer where you would like the point to be addedThe counter on the current cell type's button will be incrementedhttps://github.com/pnewstein/napari-3d-counter/assets/30813691/745d495e-1d18-43dd-aa5e-e9ecd835cdaeChanging cell typeYou can change the currently selected cell type by clicking on that cell type's
button. This change will be reflected in the GUI. Additionally, the keyboard
shortcut for that cell type can be used. Keyboard shortcuts are listed on the
button, and are "q", "w", "e", "r", "t", "y" by defaulthttps://github.com/pnewstein/napari-3d-counter/assets/30813691/844d04ce-2795-4226-a98b-d5fe5a0b131eUndo last added cellThe undo button (shortcut u) will remove last added cell, regardless of
cell typehttps://github.com/pnewstein/napari-3d-counter/assets/30813691/c04ca5e3-9f48-4dd5-89e5-a9866b353e03Remove a particular cellTo remove a particular cell. Change to the layer containing the cell you would
like to remove. Then select theselect pointstool to select the points to
delete, then useDelete selected pointsto delete those pointsThis change will be reflected in the counts.https://github.com/pnewstein/napari-3d-counter/assets/30813691/d0787cba-9b23-46d5-9cd3-21a4ad73460aChange appearance of a cell typeChanges to the name or edge color of a points layer will be reflected in the
previously added points, as well as the GUI. Features that are editable in this way include:
- face color
- edge color
- symbol
- sizehttps://github.com/pnewstein/napari-3d-counter/assets/30813691/6c495270-d4c4-473e-9091-8d2e0f8e2764Save configurationUse theMake launch_cell_count.pybutton to create a python script that will
launch napari with 3DCounter added to the dock and current cell type appearances
already loadedhttps://github.com/pnewstein/napari-3d-counter/assets/30813691/3448652d-3064-4900-8bbe-e88d75667108Save cellsUse the "Save cells" button to save the cell coordinates for all layers into a
csv filehttps://github.com/pnewstein/napari-3d-counter/assets/30813691/38b30f2a-cc83-46c2-8b19-4d44715c07c5Load cellsUse the "Load cells" button to load the cells from a csv file into new layershttps://github.com/pnewstein/napari-3d-counter/assets/30813691/7df74688-85b1-4b61-aa51-dab179763832Launch with saved configurationTo run Count3D with custom configuration, paste the following code into your napari ipython consolefromnapari_3d_counterimportCount3D,CellTypeConfigcell_type_config=[# The first celltype is called "cq+eve+" and should be greenCellTypeConfig(name="cq+eve+",color="g"),# The first celltype is called "cq+eve-" and should be cyanCellTypeConfig(name="cq+eve-",color="c"),# The first celltype is called "cq-eve+" and should be redCellTypeConfig(name="cq-eve+",color="r"),]# Launch the plugin with configurationviewer.window.add_dock_widget(Count3D(viewer,cell_type_config=cell_type_config))ContributingContributions are very welcome. Tests can be run withtox, please ensure
the coverage at least stays the same before you submit a pull request.LicenseDistributed under the terms of theGNU GPL v3.0license,
"napari-3d-counter" is free and open source softwareIssuesIf you encounter any problems, pleasefile an issuealong with a detailed description.