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