Add quick start Notebook
This commit is contained in:
parent
7ec65323d9
commit
92771dd4c3
44
Readme.md
Normal file
44
Readme.md
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
TRISKELE -- Unofficial Python wrapper
|
||||||
|
===========
|
||||||
|
|
||||||
|
This work is based on
|
||||||
|
[TRISKELE](https://sourcesup.renater.fr/projects/triskele/) from OBELIX. It's a
|
||||||
|
a dumb, raw, work in progress prototype. In early access. Brace yourself.
|
||||||
|
|
||||||
|
Dependencies
|
||||||
|
------
|
||||||
|
|
||||||
|
- TRISKELE: make, gcc, boost-libs, intel-tbb, gdal
|
||||||
|
- Python wrapper: python-pip, python-gdal
|
||||||
|
|
||||||
|
Setup
|
||||||
|
-----
|
||||||
|
|
||||||
|
First, clone the project.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://git.normalized.xyz/Florent/Triskele.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Then compile TRISKELE to get the apGenerator binary.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd Triskele
|
||||||
|
make -f MakefileNoOTB -j8 apGenerator
|
||||||
|
```
|
||||||
|
|
||||||
|
Finally, install triskele python in develop mode.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd python
|
||||||
|
pip install -e .
|
||||||
|
```
|
||||||
|
|
||||||
|
Usage
|
||||||
|
----
|
||||||
|
|
||||||
|
```python
|
||||||
|
import triskele
|
||||||
|
```
|
||||||
|
|
||||||
|
See example in this linked [Notebook](./Triskele-demo.ipynb).
|
||||||
345
Triskele-demo.ipynb
Normal file
345
Triskele-demo.ipynb
Normal file
File diff suppressed because one or more lines are too long
345
python/.ipynb_checkpoints/Triskele-demo-checkpoint.ipynb
Normal file
345
python/.ipynb_checkpoints/Triskele-demo-checkpoint.ipynb
Normal file
File diff suppressed because one or more lines are too long
@ -15,7 +15,7 @@ import numpy as np
|
|||||||
from .CreaTIFF import read, write
|
from .CreaTIFF import read, write
|
||||||
|
|
||||||
class Triskele:
|
class Triskele:
|
||||||
def __init__(self, raster, dtype=np.uint8, normalize_to_dtype=True, cache_dir='/tmp', verbose=True):
|
def __init__(self, raster, dtype=np.uint8, normalize_to_dtype=True, cache_dir='/tmp', verbose=False):
|
||||||
|
|
||||||
self.verbose = verbose
|
self.verbose = verbose
|
||||||
self.triskele_bin = Path(os.path.dirname(os.path.realpath(__file__))\
|
self.triskele_bin = Path(os.path.dirname(os.path.realpath(__file__))\
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user