33 lines
690 B
Python
33 lines
690 B
Python
#!/usr/bin/python
|
|
# -*- coding: utf-8 -*-
|
|
# \file LoadTIFF.py
|
|
# \brief TODO
|
|
# \author Florent Guiotte <florent.guiotte@gmail.com>
|
|
# \version 0.1
|
|
# \date 04 avril 2018
|
|
#
|
|
# TODO details
|
|
|
|
from core import Input
|
|
import numpy as np
|
|
|
|
## TODO: dep
|
|
import sys
|
|
sys.path.append('../triskele/python')
|
|
import triskele
|
|
|
|
class LoadTIFF(Input):
|
|
def __init__(self, tiffFiles):
|
|
super().__init__(self.__class__.__name__)
|
|
self.files = tiffFiles
|
|
|
|
def _process(self, data, metadata):
|
|
layers = list()
|
|
|
|
for file in self.files:
|
|
print('Loading {}'.format(file))
|
|
layers.append(triskele.read(file))
|
|
|
|
return np.stack(layers, axis=2), self.files
|
|
|