summaryrefslogtreecommitdiff
path: root/src/bjc/imgchain/pipeline/PipelineStage.java
blob: cbb8ccf820a7a2599752ca266b02282ce8789e1d (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package bjc.imgchain.pipeline;

import java.awt.Image;

import javax.swing.JComponent;

/**
 * A stage in an image processing pipeline.
 * 
 * @author acm
 *
 */
public interface PipelineStage {
	/**
	 * Get the input/output type of this stage.
	 * 
	 * @return The type of the stage.
	 * 
	 */
	StageType getType();

	/**
	 * Pass an image through the stage.
	 * 
	 * @param inp
	 *                The input image, if one is needed
	 * @return The output image, if one is provided.
	 */
	Image process(Image inp);

	/**
	 * Get the name of this stage.
	 * 
	 * @return The name of this stage.
	 */
	String name();

	/**
	 * Get a brief description of what this stage does.
	 * 
	 * @return A brief description of what the stage does.
	 */
	String description();

	/**
	 * Get an editor for this stage.
	 * 
	 * @return The editor for the stage
	 */
	JComponent getEditor();
}