Search Tips

Search is based on keyword.

`Ex: "Procedures"`

Do not search with natural language

`Ex: "How do I write a new procedure?"`

Give Feedback Support Portal

# Overlay Masking

The Monitor tab supports the application of custom overlay masks with different framing options, based on a supplied configuration file. The masks allow for semi-transparent region rendering and, when this configuration file is provided, it populates the Monitor > Display > Masks menu, so that you can choose from a dropdown of pre-configured overlays. Providing masks for use in Katana allows you to apply a mask on a specified frame size in the Monitor.

To set up a configuration file so that you can choose overlays from the Monitor > Display > Masks menu, place a monitor_mask.xml file in your KATANA_RESOURCES path. The K keyboard shortcut can be used to toggle the mask, and Alt+K cycles through the available masks.

### Formatting an XML File

An example for a properly formatted .xml files for use with Katana masks can be found under $KATANA_ROOT/plugins/Resources/Examples/monitor_mask.xml. This file is loaded into Katana so that, by default, two monitor masks are available: Mask Aspect + Safe Areas and Mask Aspect (no labels).

Tip: For more technical users, the information below on further formatting instructions for an XML file, may come in useful.

Masks should be defined in XML using a mask element:

    <mask name="myMask" window="(x1,y1,x2,y2)"/>
        ...
    </mask>

The window defines the mask dimensions in pixels. By default, masks (and their drawings) are scaled to fit the Display Window of the viewed image. If the aspect ratio of the mask definition does not match that of the image, the image is anchored to the lower-left corner of the mask, and the overlay scaled such that it covers the longest edge of the image. This scaling can be disabled in the Display > Masks menu in the monitor.

Within each mask, there must be one or more drawable elements:

    <rect window="(x1,y1,x2,y2)"
          fillColor="(r,g,b,a)"
          outlineColor="(r,g,b,a)"
          outlineStippleSize="px"
          outlineWidth="px"
          holdoutWindow="(x1,y1,x2,y2)"
          labelColor="(r,g,b,a)"
          labelSize="f" />;
    <line p1="(x,y)" p2="(x,y)" lineColor="(r,g,b,a)" lineWidth="px" />;

In this example:

• x, y are pixel coordinates.

• r, g, b, and a are all normalized color components between 0-1.

• f is a multiple on the drawn size of text (best experiment to find the right size, but its a scale on 24pt text @72dpi as per FTGL).

• px is a GlLineWidth relative to the mask window definition.

• rect elements require the window attribute and one or more of fillColor or outlineColor. Other attributes are optional.

• line elements require p1 and p2.

Once selected, these are drawn on top of renders displayed in the monitor.