get rid of start with flag in app flow

pull/249/head
edgarriba 2015-12-11 21:26:39 +00:00
rodzic edd4dbf93a
commit 92a9adb8c4
1 zmienionych plików z 38 dodań i 69 usunięć

Wyświetl plik

@ -66,7 +66,6 @@ class ODMApp(ecto.BlackBox):
tree = types.ODM_Tree(p.args['project_path'])
self.tree = ecto.Constant(value=tree)
def connections(self, _p):
# define initial task
initial_task = _p.args['start_with']
@ -78,75 +77,45 @@ class ODMApp(ecto.BlackBox):
## load the dataset
connections = [ self.tree[:] >> self.dataset['tree'] ]
## check if we want to start with resize task
if initial_task_id <= config.processopts.index('resize'):
# run resize cell
connections += [ self.tree[:] >> self.resize['tree'],
self.args[:] >> self.resize['args'],
self.dataset['photos'] >> self.resize['photos'] ]
# resize images
connections += [ self.tree[:] >> self.resize['tree'],
self.args[:] >> self.resize['args'],
self.dataset['photos'] >> self.resize['photos'] ]
# run opensfm with images from load dataset
connections += [ self.tree[:] >> self.opensfm['tree'],
self.args[:] >> self.opensfm['args'],
self.resize['photos'] >> self.opensfm['photos'] ]
## check if we want to start with opensfm task
if config.processopts.index('resize') < initial_task_id \
<= config.processopts.index('opensfm') :
# run cmvs
connections += [ self.tree[:] >> self.cmvs['tree'],
self.args[:] >> self.cmvs['args'],
self.opensfm['reconstruction'] >> self.cmvs['reconstruction'] ]
# run opensfm with images from load dataset
connections += [ self.tree[:] >> self.opensfm['tree'],
self.args[:] >> self.opensfm['args'],
self.dataset['photos'] >> self.opensfm['photos'] ]
else:
# run opensfm with images from load dataset
connections += [ self.tree[:] >> self.opensfm['tree'],
self.args[:] >> self.opensfm['args'],
self.resize['photos'] >> self.opensfm['photos'] ]
# run pmvs
connections += [ self.tree[:] >> self.pmvs['tree'],
self.args[:] >> self.pmvs['args'],
self.cmvs['reconstruction'] >> self.pmvs['reconstruction'] ]
## check if we want to start with cmvs task
if initial_task_id <= config.processopts.index('cmvs'):
# create odm mesh
connections += [ self.tree[:] >> self.meshing['tree'],
self.args[:] >> self.meshing['args'],
self.pmvs['reconstruction'] >> self.meshing['reconstruction'] ]
# run cmvs
connections += [ self.tree[:] >> self.cmvs['tree'],
self.args[:] >> self.cmvs['args'],
self.opensfm['reconstruction'] >> self.cmvs['reconstruction'] ]
# create odm texture
connections += [ self.tree[:] >> self.texturing['tree'],
self.args[:] >> self.texturing['args'],
self.meshing['reconstruction'] >> self.texturing['reconstruction'] ]
## check if we want to start with cmvs task
if initial_task_id <= config.processopts.index('pmvs'):
# create odm georeference
connections += [ self.tree[:] >> self.georeferencing['tree'],
self.args[:] >> self.georeferencing['args'],
self.dataset['photos'] >> self.georeferencing['photos'],
self.texturing['reconstruction'] >> self.georeferencing['reconstruction'] ]
# run pmvs
connections += [ self.tree[:] >> self.pmvs['tree'],
self.args[:] >> self.pmvs['args'],
self.cmvs['reconstruction'] >> self.pmvs['reconstruction'] ]
## check if we want to start with odm_meshing task
if initial_task_id <= config.processopts.index('odm_meshing'):
# create odm mesh
connections += [ self.tree[:] >> self.meshing['tree'],
self.args[:] >> self.meshing['args'],
self.pmvs['reconstruction'] >> self.meshing['reconstruction'] ]
## check if we want to start with odm_texturing task
if initial_task_id <= config.processopts.index('odm_texturing'):
# create odm texture
connections += [ self.tree[:] >> self.texturing['tree'],
self.args[:] >> self.texturing['args'],
self.meshing['reconstruction'] >> self.texturing['reconstruction'] ]
## check if we want to start with odm_georeferencing task
if initial_task_id <= config.processopts.index('odm_georeferencing'):
# create odm georeference
connections += [ self.tree[:] >> self.georeferencing['tree'],
self.args[:] >> self.georeferencing['args'],
self.dataset['photos'] >> self.georeferencing['photos'],
self.texturing['reconstruction'] >> self.georeferencing['reconstruction'] ]
## check if we want to start with odm_orthophoto task
if initial_task_id <= config.processopts.index('odm_orthophoto'):
## create odm orthophoto
connections += [ self.tree[:] >> self.orthophoto['tree'],
self.args[:] >> self.orthophoto['args'],
self.georeferencing['reconstruction'] >> self.orthophoto['reconstruction'] ]
## create odm orthophoto
connections += [ self.tree[:] >> self.orthophoto['tree'],
self.args[:] >> self.orthophoto['args'],
self.georeferencing['reconstruction'] >> self.orthophoto['reconstruction'] ]
return connections