Class Algorithms


  • public class Algorithms
    extends java.lang.Object
    • Constructor Detail

      • Algorithms

        public Algorithms()
    • Method Detail

      • flattenStack

        public Track flattenStack​(Stack inStack,
                                  ErrorStatus errorStatus)
        Flatten a Stack, into a single Track. Note that the 1st Track is the bottom one, and the last is the top.
        Parameters:
        inStack - stack to flatten
        errorStatus - errorStatus to report error during flattening
        Returns:
        flattened track
      • flattenStack

        public Track flattenStack​(java.util.List<Track> tracks,
                                  ErrorStatus errorStatus)
        Flatten a Stack, into a single Track. Note that the 1st Track is the bottom one, and the last is the top.
        Parameters:
        tracks - list of tracks to flatten
        errorStatus - errorStatus to report error during flattening
        Returns:
        flattened track
      • trackTrimmedToRange

        public Track trackTrimmedToRange​(Track inTrack,
                                         TimeRange trimRange,
                                         ErrorStatus errorStatus)
        Returns a new track that is a copy of the inTrack, but with items outside the trimRange removed and items on the ends trimmed to the trimRange. Note that the track is never expanded, only shortened. Please note that you could do nearly the same thing non-destructively by just setting the Track's source_range but sometimes you want to really cut away the stuff outside and that's what this function is meant for.
        Parameters:
        inTrack - track to be trimmed
        trimRange - this is the range, which the track will be trimmed to
        errorStatus - errorStatus to report error during trimming
        Returns:
        trimmed track
      • timelineTrimmedToRange

        public Timeline timelineTrimmedToRange​(Timeline inTimeline,
                                               TimeRange trimRange,
                                               ErrorStatus errorStatus)
        Returns a new timeline that is a copy of the inTimeline, but with items outside the trimRange removed and items on the ends trimmed to the trimRange. Note that the timeline is never expanded, only shortened. Please note that you could do nearly the same thing non-destructively by just setting the Track's sourceRange but sometimes you want to really cut away the stuff outside and that's what this function is meant for.
        Parameters:
        inTimeline - timeline to be trimmed
        trimRange - this is the range, which the timeline will be trimmed to
        errorStatus - errorStatus to report error during trimming
        Returns:
        trimmed timeline