01: /*
02: * @(#) $Header: /cvs/jai-operators/src/main/ca/forklabs/media/jai/SpectralFilter2D.java,v 1.1 2007/07/05 00:06:25 forklabs Exp $
03: *
04: * Copyright (C) 2007 Forklabs Daniel Léonard
05: *
06: * This program is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU General Public License
08: * as published by the Free Software Foundation; either version 2
09: * of the License, or (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19: */
20:
21: package ca.forklabs.media.jai;
22:
23: import java.awt.RenderingHints;
24: import java.awt.image.RenderedImage;
25:
26: /**
27: * Interface {@code SpectralFilter2D} is used by operation
28: * <em>spectralhomomorphicfilter</em> in <em>rendered</em> and
29: * <em>renderable</em> mode.
30: * <p>
31: * The lifecycle of this interface is simple. First are called
32: * {@link #setWidth(int)} and {@link #setHeight(int)} to set the bounds of
33: * the image. Then {@link #getFilterImage(int, RenderingHints)} is called to get
34: * the filter image.
35: * <p>
36: * The filter image must be complex (have an even number of band, twice that of
37: * the desired number of elements) and centered.
38: *
39: * @author <a href="mailto:forklabs at dev.java.net?subject=ca.forklabs.media.jai.SpectralFilter2D">Daniel Léonard</a>
40: * @version $Revision: 1.1 $
41: */
42: public interface SpectralFilter2D {
43:
44: /**
45: * Sets the width of the filter image.
46: * @param width the desired width.
47: */
48: public void setWidth(int width);
49:
50: /**
51: * Sets the height of the filter image.
52: * @param height the desired height.
53: */
54: public void setHeight(int height);
55:
56: /**
57: * Creates the complex filter image. The filter must be centered.
58: * @param elements the desired number of elements.
59: * @param hints inherited rendering hints.
60: * @return the filter image.
61: */
62: public RenderedImage getFilterImage(int elements,
63: RenderingHints hints);
64:
65: }
66:
67: /*
68: * $Log: SpectralFilter2D.java,v $
69: * Revision 1.1 2007/07/05 00:06:25 forklabs
70: * The filter types for operator spectralhomomorphic.
71: *
72: */
|