GGAlign.mesa
Contents: Allows the client to build a set of trigger objects (joints, segments, and control points) which can be sent through a GGGravity filter to create a set alignment objects.
Pier, May 13, 1987 2:41:22 pm PDT
Bier, April 6, 1987 9:35:53 pm PDT
DIRECTORY
GGBasicTypes, GGGravity, GGInterfaceTypes, GGModelTypes;
GGAlign: CEDAR DEFINITIONS =
BEGIN
Caret: TYPE = GGInterfaceTypes.Caret;
FeatureData: TYPE = GGGravity.FeatureData;
Filters: TYPE = GGInterfaceTypes.Filters;
GGData: TYPE = GGInterfaceTypes.GGData;
Line: TYPE = GGBasicTypes.Line;
AlignBag: TYPE = GGGravity.AlignBag;
Outline: TYPE = GGModelTypes.Outline;
OutlineDescriptor: TYPE = GGModelTypes.OutlineDescriptor;
Point: TYPE = GGBasicTypes.Point;
Scene: TYPE = GGModelTypes.Scene;
SelectionClass: TYPE = GGInterfaceTypes.SelectionClass;
Sequence: TYPE = GGModelTypes.Sequence;
Slice: TYPE = GGModelTypes.Slice;
SliceDescriptor: TYPE = GGModelTypes.SliceDescriptor;
Traj: TYPE = GGModelTypes.Traj;
TrajEnd: TYPE = GGModelTypes.TrajEnd;
TriggerBag: TYPE = REF TriggerBagObj;
TriggerBagObj: TYPE = GGInterfaceTypes.TriggerBagObj;
Vector: TYPE = GGBasicTypes.Vector;
FilterOutlineProc: TYPE = PROC [outlineD: OutlineDescriptor, scene: Scene] RETURNS [stationary: OutlineDescriptor];
FilterSliceProc: TYPE = PROC [sliceD: SliceDescriptor, scene: Scene] RETURNS [stationary: SliceDescriptor];
[Artwork node; type 'ArtworkInterpress on' to command tool]
Creating a TriggerBag
emptyTriggerBag: TriggerBag;
Use this as an (immutable) empty TriggerBag.
CreateTriggerBag: PROC [] RETURNS [triggerBag: TriggerBag];
Allocates a new empty TriggerBag.
FlushTriggerBag: PROC [triggerBag: TriggerBag];
Takes an old TriggerBag and makes it empty.
CopyTriggerBag: PROC [triggerBag: TriggerBag] RETURNS [copy: TriggerBag];
Allocates a copy of triggerBag. The copy shares featureDatas with the original but has freshly allocated LIST structures.
Creating an AlignBag
emptyAlignBag: AlignBag; -- an (immutable) empty object bag.
CreateAlignBag: PROC [] RETURNS [objectBag: AlignBag];
FlushAlignBag: PROC [objectBag: AlignBag];
Filling the Trigger Bag
FillStaticTriggerBag: PROC [anchor: Caret, scene: Scene, heuristics: BOOL, triggerBag: TriggerBag];
FillDynamicTriggerBag: PROC [anchor: Caret, scene: Scene, heuristics: BOOL, triggerBag: TriggerBag];
Filling the SceneBag
FillStaticSceneBag: PROC [scene: Scene, sceneBag: TriggerBag];
FillDynamicSceneBag: PROC [scene: Scene, sceneBag: TriggerBag];
Filling the Align Bag
FillStaticAlignBag: PROC [triggerBag: TriggerBag, sceneBag: TriggerBag, filters: Filters, hideAlignments: BOOL, midpoints: BOOL, alignBag: AlignBag];
FillDynamicAlignBag: PROC [triggerBag: TriggerBag, sceneBag: TriggerBag, filters: Filters, hideAlignments: BOOL, midpoints: BOOL, action: ATOM, alignBag: AlignBag];
Filling all of the Bags at Once
SetStaticBags: PROC [ggData: GGData];
SetDynamicBags: PROC [ggData: GGData, action: ATOM];
StaticToDynamicBags: PROC [ggData: GGData] RETURNS [repaintForeground: BOOL];
DynamicToStaticBags: PROC [ggData: GGData] RETURNS [repaintForeground: BOOL];
UpdateBagsForAdd: PROC [oldOutline: Outline, newOutline: Outline, trajEnd:
TrajEnd, ggData: GGData] RETURNS [repaintForeground: BOOL];
UpdateBagsForNewSlices: PROC [newSlices: LIST OF Slice, ggData: GGData];
UpdateBagsForDelete: PROC [oldOutline: Outline, ggData: GGData] RETURNS [repaintForeground: BOOL];
The Filter Routines shown in the figure as boxes and ovals
AddAnchorTrigger: PROC [anchor: Caret, triggerBag: TriggerBag]; -- private
AddAllHotOutlines: PROC [scene: Scene, triggerBag: TriggerBag]; -- private
AddAllHotSlices: PROC [scene: Scene, triggerBag: TriggerBag]; -- private
AddHeuristics: PROC [scene: Scene, heuristics: BOOL, atom: ATOM, triggerBag: TriggerBag]; -- private
RemoveMoving: PROC [scene: Scene, triggerBag: TriggerBag]; -- private
BuiltInFilters: PROC [triggerBag: TriggerBag, filters: Filters, hideAlignments: BOOL, alignBag: AlignBag];
AddAllMidpoints: PROC [sceneBag: TriggerBag, midpoints: BOOL, alignBag: AlignBag];
Incremental Addition versions of the Filter Routines shown in the figure as boxes and ovals.
CreateAnchorTrigger: PUBLIC PROC [anchor: Caret, triggerBag: TriggerBag] RETURNS [feature: FeatureData];
Just like AddAnchorTrigger except it returns the feature in addition to adding it to the triggerBag.
AddHotOutline: PROC [outlineD: OutlineDescriptor, triggerBag: TriggerBag] RETURNS [feature: FeatureData];
Add outlineD to triggerBag and return the new feature which represents outlineD.
AddHotSlice: PROC [sliceD: SliceDescriptor, triggerBag: TriggerBag] RETURNS [feature: FeatureData];
Add slice to triggerBag and return the new feature which represents slice.
HeuristicsOutline: PROC [outline: Outline, heuristics: BOOL] RETURNS [honoraryTrigger: OutlineDescriptor]; -- private
RemoveMovingOutline: PROC [outlineD: OutlineDescriptor, scene: Scene] RETURNS [stationary: OutlineDescriptor];
Returns those part of outline that are in outlineD but are not moving.
RemoveMovingSlice: PROC [sliceD: SliceDescriptor, scene: Scene] RETURNS [stationary: OutlineDescriptor];
Returns those part of slice that are in sliceD but are not moving.
IncrementalFilters: PROC [trigger: FeatureData, filters: Filters, hideAlignments: BOOL, alignBag: AlignBag] RETURNS [alignObjects: LIST OF FeatureData];
IncrementalFilterSlice: PROC [sliceD: SliceDescriptor, filters: Filters, hideAlignments: BOOL, alignBag: AlignBag] RETURNS [alignObjects: LIST OF FeatureData];
IncrementalFilterOutline: PROC [outlineD: OutlineDescriptor, filters: Filters, hideAlignments: BOOL, alignBag: AlignBag] RETURNS [alignObjects: LIST OF FeatureData];
IncrementalMidpointsOutline: PROC [outlineD: OutlineDescriptor, midpoints: BOOL, alignBag: AlignBag];
Incremental Deletion versions of the Filter Routines shown in the figure as boxes and ovals.
RemoveAnchorTrigger: PUBLIC PROC [triggerBag: TriggerBag];
RemoveEntireHotOutline: PROC [outline: Outline, triggerBag: TriggerBag] RETURNS [oldD: OutlineDescriptor];
RemoveHotOutline: PROC [outlineD: OutlineDescriptor, triggerBag: TriggerBag];
RemoveEntireHotSlice: PROC [slice: Slice, triggerBag: TriggerBag] RETURNS [oldSliceD: SliceDescriptor];
RemoveHotSlice: PROC [sliceD: SliceDescriptor, triggerBag: TriggerBag];
RemoveMentionOutline: PROC [outline: Outline, alignBag: AlignBag];
Removes all alignment objects and midpoints that were triggered (only) by this outline. Removes mention of this outline from those alignment objects that are trigger by other triggers as well.
RemoveMentionSlice: PROC [slice: Slice, alignBag: AlignBag];
Removes all alignment objects and midpoints that were triggered (only) by this slice. Removes mention of this slice from those alignment objects that are trigger by other triggers as well.
END.