01: /*
02: * $RCSfile: BandMergeCRIF.java,v $
03: *
04: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
05: *
06: * Use is subject to license terms.
07: *
08: * $Revision: 1.1 $
09: * $Date: 2005/02/11 04:56:15 $
10: * $State: Exp $
11: */
12: package com.sun.media.jai.opimage;
13:
14: import java.util.Vector;
15: import java.awt.RenderingHints;
16: import java.awt.geom.Rectangle2D;
17: import java.awt.image.RenderedImage;
18: import java.awt.image.renderable.RenderContext;
19: import java.awt.image.renderable.ParameterBlock;
20: import java.awt.image.renderable.RenderableImage;
21: import javax.media.jai.CRIFImpl;
22: import javax.media.jai.ImageLayout;
23: import java.util.Map;
24:
25: /**
26: * A <code>CRIF</code> supporting the "BandMerge" operation in the
27: * rendered and renderable image layers.
28: *
29: * @see javax.media.jai.operator.BandMergeDescriptor
30: * @see BandMergeOpImage
31: *
32: */
33: public class BandMergeCRIF extends CRIFImpl {
34:
35: /** Constructor. */
36: public BandMergeCRIF() {
37: super ("bandmerge");
38: }
39:
40: /**
41: * Creates a new instance of <code>BandMergeOpImage</code> in the
42: * rendered layer. This method satisifies the implementation of RIF.
43: *
44: * @param paramBlock The two or more source images to be "BandMerged"
45: * together, and their corresponding float array vector.
46: * @param renderHints Optionally contains destination image layout.
47: */
48: public RenderedImage create(ParameterBlock paramBlock,
49: RenderingHints renderHints) {
50: // Get ImageLayout from renderHints if any.
51: ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
52:
53: // get vector of RenderedImage sources and parameters
54: Vector sources = paramBlock.getSources();
55: //Vector params = paramBlock.getParameters();
56:
57: return new BandMergeOpImage(sources, renderHints, layout);
58:
59: }
60: }
|