Additive import by BryonLewis · Pull Request #1309 · Kitware/dive

This is a PR that was an upstream branch for some other deployments. For right now these changes are in the Web Version only. I can make a separate PR to incorporate these changes into the electron version.

Creates an additive import option for postprocess:
additive means that if an annotation file is found during postprocess it will add the tracks to existing tracks instead of doing a replacement.
additive_prepend is a value that is prepended to all types of the new tracks found. This is to easily filter the tracks in the type editor between the new and old tracks.

Code Changes:

  • Post process has additional flags 'additive' to indicate that the import should be additive to the current tracks.
  • 'additivePrepend' is a prepended type that should be added to all tracks imported using additive. I.E, if you have existing tracks named fish and the import has more tracks named fish, if you use an additivePrepend of 'newer' then all of the new annotations will be renamed to 'newer_fish' for their type.
  • There are some UI changes to support this additive prepend functionality. Mostly allowing from the interface to check off an import as being additive and providing a Prepend name value.
  • Fix for transcoding so that videos that contain multiple video streams it will use the first videostream
  • Custom sorting for annotations. Annotations in CSV files were occasionally given in the wrong frame order. This attempts to fix that order by custom sorting the CSV rows in python.

I apologize for the commit history, if required I can squash it down. During the merge it will become squashed anyways.