35 lines
652 B
Python
35 lines
652 B
Python
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
# \file dfc_base.py
|
|
# \brief TODO
|
|
# \author Florent Guiotte <florent.guiotte@gmail.com>
|
|
# \version 0.1
|
|
# \date 27 août 2018
|
|
#
|
|
# TODO details
|
|
|
|
import numpy as np
|
|
|
|
import sys
|
|
sys.path.append('..')
|
|
import ld2dap
|
|
|
|
def run(rasters, treshold=1e4):
|
|
# Parse parameters type
|
|
treshold = float(treshold)
|
|
|
|
# Pipelines
|
|
loader = ld2dap.LoadTIFF(rasters)
|
|
dfc_filter = ld2dap.Treshold(treshold)
|
|
dfc_filter.input = loader
|
|
out_vectors = ld2dap.RawOutput()
|
|
out_vectors.input = dfc_filter
|
|
|
|
# Compute vectors
|
|
out_vectors.run()
|
|
|
|
return out_vectors.data
|
|
|
|
def version():
|
|
return 'v0.0'
|