

package net.imagej.threshold;

import java.util.List;
import java.util.Map;

import net.imagej.ImageJService;
import net.imagej.display.ImageDisplay;
import net.imagej.overlay.ThresholdOverlay;

import org.scijava.plugin.SingletonService;

/**
 * Interface for service that works with thresholds.
 * 
 * @author Barry DeZonia
 * @see ThresholdOverlay
 * @see ThresholdMethod
 * @deprecated Use {@link net.imagej.ops.threshold} instead.
 */
@Deprecated
public interface ThresholdService extends SingletonService<ThresholdMethod>,
	ImageJService
{

	/**
	 * Returns true if a {@link ThresholdOverlay} is defined for a given display.
	 */
	boolean hasThreshold(ImageDisplay display);

	/**
	 * Gets the {@link ThresholdOverlay} associated with a display. If one does
	 * not yet exist it is created.
	 */
	ThresholdOverlay getThreshold(ImageDisplay display);

	/** Removes the {@link ThresholdOverlay} associated with a display. */
	void removeThreshold(ImageDisplay display);

	/** Returns a map of available {@link ThresholdMethod}s, indexed by name. */
	Map<String, ThresholdMethod> getThresholdMethods();

	/**
	 * Returns the names of all available {@link ThresholdMethod}s, ordered by
	 * priority.
	 */
	List<String> getThresholdMethodNames();

	/**
	 * Returns the {@link ThresholdMethod} associated with the given name.
	 */
	ThresholdMethod getThresholdMethod(String name);

}
