35 lines
983 B
Python
35 lines
983 B
Python
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
# \file AttributeProfiles.py
|
|
# \brief TODO
|
|
# \author Florent Guiotte <florent.guiotte@gmail.com>
|
|
# \version 0.1
|
|
# \date 04 avril 2018
|
|
#
|
|
# TODO details
|
|
|
|
from core import Filter
|
|
|
|
## TODO: dep
|
|
import sys
|
|
sys.path.append('../triskele/python')
|
|
import triskele
|
|
|
|
class AttributeProfiles(Filter):
|
|
def __init__(self, area=None, sd=None, moi=None):
|
|
super().__init__(self.__class__.__name__)
|
|
self.area = area
|
|
self.sd = sd
|
|
self.moi = moi
|
|
|
|
def _process(self, data, metadata):
|
|
t = triskele.Triskele(data, verbose=False)
|
|
att_min = t.filter(tree='min-tree', area=self.area,
|
|
standard_deviation=self.sd,
|
|
moment_of_inertia=self.moi)
|
|
att_max = t.filter(tree='max-tree', area=self.area,
|
|
standard_deviation=self.sd,
|
|
moment_of_inertia=self.moi)
|
|
|
|
return att, None
|