Filters.mesa
Maureen Stone November 28, 1984 10:57:37 am PST
DIRECTORY
FitState USING [Handle],
Seq;
Filters: CEDAR DEFINITIONS = {
The inteface for filters is a sequence of samples, corners and a closed flag. Points should never be duplicated to close a curve. Sample sequences should be checked NIL before calling these routines (corners may be NIL).
AveFilter: PROC[samples: Seq.ComplexSequence, closed: BOOLEAN, skips: Seq.NatSequence ← NIL] RETURNS [Seq.ComplexSequence];
the skip are a sequence of sample indices. Any sample marked as a skip will not be moved. If skips=NIL then this is just an average filter
AveFilterHandle: PROC[handle: FitState.Handle, skipForced: BOOLEANTRUE];
This filters the current samples in the FitState Handle directly. IF skipForced=TRUE the samples marked as forced joints will not be moved.
Dynfilter: PROCEDURE[samples: Seq.ComplexSequence, closed: BOOLEAN, tolerance: REAL] RETURNS [new: Seq.ComplexSequence, totalBadness: REAL];
treats all samples as open. Uses dynamic programming to find a sequence of straight lines within the tolerence
}.