Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/rle-extents
FInd a bounding box around a rle volume
https://github.com/mikolalysenko/rle-extents
Last synced: 7 days ago
JSON representation
FInd a bounding box around a rle volume
- Host: GitHub
- URL: https://github.com/mikolalysenko/rle-extents
- Owner: mikolalysenko
- Created: 2013-05-02T21:00:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-14T15:44:38.000Z (over 11 years ago)
- Last Synced: 2024-12-16T22:35:32.487Z (10 days ago)
- Language: JavaScript
- Size: 105 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
rle-extents
===========
Computes a bounding box for a [narrowband level set](https://github.com/mikolalysenko/rle-core).## Install
npm install rle-extents
## Example
```javascript
//First run length encode a bunny
var bunny = require("bunny")
var bunny_rle = require("rle-rasterize")(bunny.cells, bunny.positions)//Compute extents of the volume
var extents = require("rle-extents")(bunny_rle)
console.log("lo=", extents[0], "hi=", extents[1])
```## `require("rle-extents")(volume)`
Computes a bounding box for a narrowband level set.* `volume` is a narrowband level set
**Returns** A pair of 3D arrays representing the lower and upper bounds on the volume.
## Credits
(c) 2013 Mikola Lysenko. MIT License