summaryrefslogtreecommitdiff
path: root/src/bjc/imgchain/pipeline/Pipeline.java
blob: faba6d56214d39a88ef41e1cf6b636a10ce15ae1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package bjc.imgchain.pipeline;

import java.awt.Image;
import java.util.List;

/**
 * Represents a pipeline for processing images.
 * 
 * @author acm
 *
 */
public interface Pipeline {
	/**
	 * Process an image using the stages.
	 * 
	 * @param input
	 *                The input image, or null if no image is input.
	 * @return The output image, or null if no image is output.
	 */
	Image process(Image input);

	/**
	 * Get the stages of the pipeline.
	 * 
	 * @return The stages of the pipeline.
	 */
	List<PipelineStage> stages();

	/**
	 * Get the name of the pipeline.
	 * 
	 * @return The name of the pipeline.
	 */
	default String name() {
		return "Unnamed Pipeline";
	}
}