Skip to content

Commit

Permalink
Merge pull request #41 from mapmanager/cudmore-publish-july-2023
Browse files Browse the repository at this point in the history
Cudmore publish july 2023
  • Loading branch information
cudmore authored Jul 16, 2023
2 parents 78689f8 + e961521 commit b60adfa
Show file tree
Hide file tree
Showing 10 changed files with 156 additions and 134 deletions.
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,38 @@
[![PyPI](https://img.shields.io/pypi/v/brightest-path-lib.svg)](https://pypi.org/project/brightest-path-lib/)
<!-- [![Changelog](https://img.shields.io/github/v/release/mapmanager/brightest-path-lib?include_prereleases&label=changelog)](https://github.com/mapmanager/brightest-path-lib/releases) -->

A library of path-finding algorithms to find the brightest path between two points in an image.
A Python package of path-finding algorithms to find the brightest path between points in an image.

<!-- ## Installation
## Getting Started

Install this library using `pip`:
To install and get started with the `brightest-path-lib`, please visit the [documentation website](https://mapmanager.net/brightest-path-lib/installation/).

pip install brightest-path-lib
For more detailed instructions on how to use the `brightest-path-lib`, please see the [API documentation](https://mapmanager.net/brightest-path-lib/api_docs/).

## Usage
## Contributing

Usage instructions go here.
Contributions are very welcome. Tests can be run with `pytest`, please ensure the coverage at least stays the same before you submit a pull request.

## Development
To contribute to this library, first checkout the code. Then create a new virtual environment:
To contribute to this package, first checkout the code. Then create a new virtual environment:

cd brightest-path-lib
python -m venv venv
source venv/bin/activate
python -m venv brightest-venv
source brightest-venv/bin/activate

Now install the dependencies and test dependencies:
Now install the package with the testing dependencies:

pip install -e '.[test]'

To run the tests:

pytest -->
pytest

## Issues

## Setting Up
If you have any suggestions or encounter any problems, please file an [issue](https://github.com/mapmanager/brightest-path-lib/issues) along with a detailed description.

To get started with using this library, please visit our [website](https://mapmanager.net/brightest-path-lib/installation/) for instructions on how to install and use the library.
## License

## Usage
For more detailed instructions on how to use this library, please see the [documentation](https://mapmanager.net/brightest-path-lib/api_docs/) page.
Distributed under the terms of the GNU GPL v3.0 license, "brightest-path-lib" is free and open source software.


3 changes: 3 additions & 0 deletions docs/about.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The brightest-path-tracing Python package was developed by Vasudha Jha as a Computer Science Masters project in the [lab of Robert Cudmore](https://cudmorelab.github.io/) at the University of California at Davis.

Please get in touch if you would like to use any of our tools.
Binary file added docs/assets/images/astar-v2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/nbastar-v2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/tracing-plugin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

To use the library, you'll need to have atleast Python 3.7 installed on your system. Once you've verified that you have Python installed, you can follow these steps to install the library:
To use the library, you'll need to have at least Python 3.7 installed on your system. Once you've verified that you have Python installed, you can follow these steps to install the library:

## 1. Install the library using pip

Expand Down
49 changes: 46 additions & 3 deletions docs/overview.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
<style>
#videotable {
/*float: right;*/
border: 0px solid #ddd;
padding: 5px;
/* font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; */
/* border-collapse: collapse; */
/* width: 100%; */
}

#videotable td, #videotable th {
border: 0px solid #ddd;
text-align: left;
valign: top
padding: 5px;
/* padding: 8px; */
}

#videotable tr:nth-child(even){
/* background-color: #f2f2f2; */
}

/* #videotable tr:hover {background-color: #ddd;} */

#videotable th {
/* padding-top: 12px; */
/* padding-bottom: 12px; */
text-align: left;
background-color: #4CAF50;
color: white;
}
</style>

# Overview

The `brightest-path-lib` is a Python library which allows users to efficiently find the path with the maximum brightness in a 2D or 3D images. It uses the A\* Search and NBA\* Search algorithms, which are informed search algorithms that use heuristics to guide the search towards the most promising areas of the image.
Expand All @@ -11,16 +44,26 @@ The `brightest-path-lib` is a Python library which allows users to efficiently f
<figcaption>Finding Brightest Path using NBA* Search</figcaption>
</figure> -->

![Finding Brightest Path using A* Search](./assets/images/astar.gif)
## Examples

In these examples, a search is performed from the user specified start (green) and stop (red) points. The progress of the search is animated as cyan fill color and the final brightest-path is shown in yellow.

Finding Brightest Path using A* Search
![Finding Brightest Path using A* Search](./assets/images/astar-v2.gif)

![Finding Brightest Path using NBA* Search](./assets/images/nbastar.gif)
Finding Brightest Path using NBA* Search
![Finding Brightest Path using NBA* Search](./assets/images/nbastar-v2.gif)

## Capabilities

With its efficient implementation and intuitive API, this library is a valuable tool for anyone working with 2D or 3D images who needs to identify the path with the maximum brightness.

- The library provides easy-to-use functions that take the image data and start and end points as input and return the path with the maximum brightness as output.
- It supports both grayscale and color images and can handle images of arbitrary sizes.
- The library also provides support for users to know which points in the image are being considered for the brightest path in real-time so that they display them on the original image.

With its efficient implementation and intuitive API, this library is a valuable tool for anyone working with 2D or 3D images who needs to identify the path with the maximum brightness. We are using it for neuronal tracing to identify the path of a neuron or a set of neurons through a stack of images in our Napari Plugin.
## Napi Plugin

We have also created a [Napari Tracing Plugin](https://github.com/mapmanager/napari-tracing) to provide an intuititive graphical-user-interface that uses the `brightest-path-lib`` package. We are using this to trace neuronal dendrites and axons.

![Napari Tracing Plugin](./assets/images/tracing-plugin.png)
104 changes: 40 additions & 64 deletions docs/simple_notebook.ipynb

Large diffs are not rendered by default.

95 changes: 47 additions & 48 deletions docs/threading_notebook.ipynb

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ theme:
name: "material"
features:
- content.code.copy
- navigation.instant

plugins:
- mkdocstrings
Expand All @@ -22,12 +23,13 @@ markdown_extensions:
- md_in_html

nav:
- Overview: index.md
- Overview: overview.md
- Getting Started:
- installation.md
- quickstart_guide.md
- API Documentation: api_docs.md
- Tutorials:
- simple_notebook.ipynb
- threading_notebook.ipynb
- About: about.md

0 comments on commit b60adfa

Please sign in to comment.