# The Training Region

If you specify a training region for shape training, PatMax will only train features from the shapes (or parts of shapes) that lie within the region.

Note: For shape training, if you specify a region shape other than a rectangle, PatMax will train features that lie within the pixel-aligned bounding box that encloses the region. Also, you cannot specify a training-time mask for shape training.

The dimensions of the input region are interpreted in differently depending on which training mode you are using.

- If you are supplying an image to resolve the selected spaces of each shape model, then the training region is interpreted based on its selected space property (which must be a space defined within the supplied image's coordinate space tree).
- If you supply a TrainShapeModelsTransform, then the input region is always interpreted in the implicit root space (the 'from' space in the TrainShapeModelsTransform transformation).

In all cases, PatMax will only train the shapes or parts of shapes that lie within the input region, as shown in the following figure:

The training region is also used to determine the part of the run-time image that is used to compute the clutter score.