001/*******************************************************************************
002 * This software is provided as a supplement to the authors' textbooks on digital
003 * image processing published by Springer-Verlag in various languages and editions.
004 * Permission to use and distribute this software is granted under the BSD 2-Clause
005 * "Simplified" License (see http://opensource.org/licenses/BSD-2-Clause).
006 * Copyright (c) 2006-2025 Wilhelm Burger, Mark J. Burge. All rights reserved.
007 * Visit https://imagingbook.com for additional details.
008 ******************************************************************************/
009
010package imagingbook.common.image;
011
012/**
013 * Enumeration type representing the available strategies for accessing pixel locations outside the image bounds.
014 *
015 * @author WB
016 * @see GridIndexer2D
017 */
018public enum OutOfBoundsStrategy {
019        /** Replace out-of-bounds pixels by some default value. */
020        DefaultValue,
021        /** Replace out-of-bounds pixels by the nearest border pixel. */
022        NearestBorder,
023        /** Treat the image as being infinitely mirrored at its borders. */
024        MirrorImage,
025        /** Treat the image as repeating ininitely in x/y directions. */
026        PeriodicImage,
027        /** Throw an exception when out-of-boundary coordinates are accessed. */
028        ThrowException;
029}