Skip to content

Commit

Permalink
Add version log to README, sync dockerhub.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RenkeHuang committed Nov 18, 2024
1 parent 1978c8b commit da5bede
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
19 changes: 13 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,17 +47,17 @@ docker build --no-cache -t point_utils:latest .
Check out the DockerHub [repository overview page](https://hub.docker.com/repository/docker/renkeh/point_utils/general) for more details.
```bash
# Run the Container and persist the output with Docker volume (map examples directory inside the container to the examples directory on local host)
docker run --rm --name point_utils_container -v $(PWD)/examples:/app/examples point_utils:latest
docker run --rm --name point_utils_container -v $(PWD)/examples:/app/examples point_utils:0.1.1

# If starting the Container with an interactive shell, manually execute the entry script in the shell
# -i: keep STDIN open, -t: allocate a pseudo-TTY for the shell session.
# /bin/bash: open a bash shell inside the container.
docker run --rm -it --name point_utils_container point_utils:latest /bin/bash
docker run --rm -it --name point_utils_container point_utils:0.1.1 /bin/bash
RUN -config examples/config.yaml

# Override the default CMD:
# The following command generates a plot for the data, and copy back to local host
docker run --rm -v $(PWD)/examples:/app/examples point_utils:latest python scripts/visualize.py examples/cdd.txt -o examples/fig.png
docker run --rm -v $(PWD)/examples:/app/examples point_utils:0.1.1 python scripts/visualize.py examples/cdd.txt -o examples/fig.png
```

## Testing
Expand Down Expand Up @@ -98,7 +98,7 @@ Here we give a brief overview of these methods:
#### Local Information Methods
Methods focus on local data characteristics, and rely on the immediate surroundings of the target point to determine the direction of the offset vectors.

- **Nearest-Neighbor via K-D Tree**: Calculate the average displacement vectors from each "B" point to its nearest neighbors and use the opposite direction of this mean vector as the direction of the offset vector for the "B" point.
- **Nearest-Neighbor via K-D Tree**: Calculate the average displacement vectors from each "B" point to its nearest neighbors and use the opposite direction of this mean vector as the direction of the offset vector for the "B" point.

- **Surface Normals via Local Surface Fitting**: Fit a local surface around each "B" point using techniques such as least squares fitting. Compute the surface normal from this fitted surface and use it as the direction for the offset vector.

Expand All @@ -107,7 +107,7 @@ Methods focus on local data characteristics, and rely on the immediate surroundi

#### Global Information Methods
Methods consider the global structure or properties of the entire dataset.
- **Surface Normals via Convex Hull Method**: Construct a Convex Hull for the entire point cloud to determine the global geometric boundaries. Compute the normals of the convex hull to define the direction of the offset vectors.
- **Surface Normals via Convex Hull Method**: Construct a Convex Hull for the entire point cloud to determine the global geometric boundaries. Compute the normals of the convex hull to define the direction of the offset vectors.

- **Radial Expansion**: Calculate the centroid of the entire point cloud. For each B point, computes the vector pointing from the centroid to the point and uses this direction for the offset vector.

Expand All @@ -118,4 +118,11 @@ Methods consider the global structure or properties of the entire dataset.
#### Currently the following three methods are supported:
- Nearest-Neighbor via K-D Tree, implemented in **[KDTreeOffsets](https://github.com/RenkeHuang/point_utils/blob/c5e63ef8e1f9814d2f763a5323391dddd09fdba2/point_utils/offsetter.py#L98-L99) class**
- Convex Hull, implemented in **[ConvexHullOffsets](https://github.com/RenkeHuang/point_utils/blob/c5e63ef8e1f9814d2f763a5323391dddd09fdba2/point_utils/offsetter.py#L153-L154) class**
- Radial Expansion, implemented in **[CentroidOffsets](https://github.com/RenkeHuang/point_utils/blob/c5e63ef8e1f9814d2f763a5323391dddd09fdba2/point_utils/offsetter.py#L201-L202) class**
- Radial Expansion, implemented in **[CentroidOffsets](https://github.com/RenkeHuang/point_utils/blob/c5e63ef8e1f9814d2f763a5323391dddd09fdba2/point_utils/offsetter.py#L201-L202) class**

## Version Log
**Version 0.1.1**
- Support two new methods, convex hull and radial expansion for offset vector computations

**Version 0.1.0**
- Support KDTree for offset vector computations
11 changes: 7 additions & 4 deletions dockerhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The project is under active development and is hosted on [GitHub](https://github

To run the point_utils container and retrieve the result, use the following Docker command:
```bash
docker run --rm --name point_utils_container -v $(PWD)/examples:/app/examples renkeh/point_utils:0.1.0
docker run --rm --name point_utils_container -v $(PWD)/examples:/app/examples renkeh/point_utils:0.1.1
```
This command runs the container and saves the output file to the `examples` directory
on your local machine.
Expand All @@ -21,13 +21,13 @@ directory on your local host.s
Alternatively, you can start the container with an interactive shell, and manually
execute the entry script in the shell:
```bash
docker run --rm -it --name point_utils_container point_utils:latest /bin/bash
docker run --rm -it --name point_utils_container point_utils:0.1.1 /bin/bash
RUN -config examples/config.yaml
```

You can also override the default CMD to run other scripts. For example:
```
docker run --rm -v $(PWD)/examples:/app/examples point_utils:latest python scripts/visualize.py examples/cdd.txt -o examples/fig.png
docker run --rm -v $(PWD)/examples:/app/examples point_utils:0.1.1 python scripts/visualize.py examples/cdd.txt -o examples/fig.png
```
This command generates a plot from the specified data file (`examples/cdd.txt`) and saves the output (`examples/fig.png`) back to the `examples` directory on your local host.

Expand Down Expand Up @@ -64,8 +64,11 @@ RUN pip install -e .
CMD ["python", "scripts/main.py", "-config", "examples/config.yaml"]
```
## Version Log
**Version 0.1.1**
- Support two new methods, convex hull and radial expansion for offset vector computations

**Version 0.1.0**
- support KDTree for offset vector computations
- Support KDTree for offset vector computations

## License
This project is licensed under the MIT License.

0 comments on commit da5bede

Please sign in to comment.