pull/1133/head
Stephen Mather 2020-07-08 21:13:25 -04:00 zatwierdzone przez GitHub
rodzic 80e161f426
commit 847d1b5872
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 21 dodań i 21 usunięć

Wyświetl plik

@ -170,36 +170,36 @@ class ODMSplitStage(types.ODM_Stage):
submodel_paths = [os.path.abspath(p) for p in mds.get_submodel_paths()]
# Align
octx.align_reconstructions(self.rerun())
## octx.align_reconstructions(self.rerun())
self.update_progress(55)
## self.update_progress(55)
# Aligned reconstruction is in reconstruction.aligned.json
# We need to rename it to reconstruction.json
remove_paths = []
for sp in submodel_paths:
sp_octx = OSFMContext(sp)
## for sp in submodel_paths:
## sp_octx = OSFMContext(sp)
aligned_recon = sp_octx.path('reconstruction.aligned.json')
unaligned_recon = sp_octx.path('reconstruction.unaligned.json')
main_recon = sp_octx.path('reconstruction.json')
## aligned_recon = sp_octx.path('reconstruction.aligned.json')
## unaligned_recon = sp_octx.path('reconstruction.unaligned.json')
## main_recon = sp_octx.path('reconstruction.json')
if io.file_exists(main_recon) and io.file_exists(unaligned_recon) and not self.rerun():
log.ODM_INFO("Submodel %s has already been aligned." % sp_octx.name())
continue
## if io.file_exists(main_recon) and io.file_exists(unaligned_recon) and not self.rerun():
## log.ODM_INFO("Submodel %s has already been aligned." % sp_octx.name())
## continue
if not io.file_exists(aligned_recon):
log.ODM_WARNING("Submodel %s does not have an aligned reconstruction (%s). "
"This could mean that the submodel could not be reconstructed "
" (are there enough features to reconstruct it?). Skipping." % (sp_octx.name(), aligned_recon))
remove_paths.append(sp)
continue
## if not io.file_exists(aligned_recon):
## log.ODM_WARNING("Submodel %s does not have an aligned reconstruction (%s). "
## "This could mean that the submodel could not be reconstructed "
## " (are there enough features to reconstruct it?). Skipping." % (sp_octx.name(), aligned_recon))
## remove_paths.append(sp)
## continue
if io.file_exists(main_recon):
shutil.move(main_recon, unaligned_recon)
## if io.file_exists(main_recon):
## shutil.move(main_recon, unaligned_recon)
shutil.move(aligned_recon, main_recon)
log.ODM_INFO("%s is now %s" % (aligned_recon, main_recon))
## shutil.move(aligned_recon, main_recon)
## log.ODM_INFO("%s is now %s" % (aligned_recon, main_recon))
# Remove invalid submodels
submodel_paths = [p for p in submodel_paths if not p in remove_paths]
@ -362,4 +362,4 @@ class ODMMergeStage(types.ODM_Stage):
log.ODM_INFO("Normal dataset, nothing to merge.")
self.progress = 0.0