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-2023 Wilhelm Burger, Mark J. Burge. All rights reserved.
007 * Visit https://imagingbook.com for additional details.
008 ******************************************************************************/
009package imagingbook.common.regions;
010
011import java.util.List;
012
013
014/**
015 * This interface defines the functionality of region segmentations that perform contour extraction.
016 *
017 * @author WB
018 * @version 2020/04/01
019 */
020public interface ContourTracer {
021        
022        /**
023         * Retrieves all inner contours of the associated region labeling.
024         * @return the list of inner contours.
025         */
026        public List<Contour.Inner> getInnerContours();
027        
028        /**
029         * Retrieves all inner contours of the associated region labeling.
030         * @param sort set true to sort contours by (descending) length.
031         * @return the list of inner contours.
032         */
033        public List<Contour.Inner> getInnerContours(boolean sort);
034        
035        /**
036         * Retrieves all outer contours of the associated region labeling.
037         * @return the list of outer contours.
038         */
039        public List<Contour.Outer> getOuterContours();
040        
041        /**
042         * Retrieves all outer contours of the associated region labeling.
043         * @param sort set true to sort contours by (descending) length.
044         * @return the list of outer contours.
045         */
046        public List<Contour.Outer> getOuterContours(boolean sort);
047        
048}