01: /*
02: * GeoTools - OpenSource mapping toolkit
03: * http://geotools.org
04: * (C) 2003-2006, Geotools Project Managment Committee (PMC)
05: * (C) 2003, 2ie Technologie
06: *
07: * This library is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU Lesser General Public
09: * License as published by the Free Software Foundation; either
10: * version 2.1 of the License, or (at your option) any later version.
11: *
12: * This library is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15: * Lesser General Public License for more details.
16: */
17: package org.geotools.image.jai;
18:
19: // JAI dependencies
20: import javax.media.jai.OperationDescriptorImpl;
21: import javax.media.jai.registry.RenderedRegistryMode;
22: import javax.media.jai.util.Range;
23:
24: /**
25: * The descriptor for the {@link NodataFilter} operation.
26: *
27: * @since 2.1
28: * @source $URL: http://svn.geotools.org/geotools/tags/2.4.1/modules/library/coverage/src/main/java/org/geotools/image/jai/NodataFilterDescriptor.java $
29: * @version $Id: NodataFilterDescriptor.java 20970 2006-08-11 07:53:22Z jgarnett $
30: * @author Lionel Flahaut
31: */
32: public class NodataFilterDescriptor extends OperationDescriptorImpl {
33: /**
34: * The operation name, which is {@value}.
35: */
36: public static final String OPERATION_NAME = "org.geotools.NodataFilter";
37:
38: /**
39: * The range of valid parameter values.
40: */
41: private static final Range ARGUMENT_RANGE = new Range(
42: Integer.class, new Integer(0), null);
43:
44: /**
45: * Constructs the descriptor.
46: */
47: public NodataFilterDescriptor() {
48: super (
49: new String[][] {
50: { "GlobalName", OPERATION_NAME },
51: { "LocalName", OPERATION_NAME },
52: { "Vendor", "org.geotools" },
53: { "Description",
54: "Replace NaN values by a weighted average of neighbor values." },
55: { "DocURL", "http://www.geotools.org/" }, // TODO: provides more accurate URL
56: { "Version", "1.0" },
57: {
58: "arg0Desc",
59: "The number of pixel above, below, to the left and "
60: + "to the right of central NaN pixel." },
61: {
62: "arg1Desc",
63: "The minimal number of valid neighbors required "
64: + "in order to consider the average as valid." } },
65: new String[] { RenderedRegistryMode.MODE_NAME }, 1,
66: new String[] { "padding", "validityThreshold" }, // Argument names
67: new Class[] { Integer.class, Integer.class }, // Argument classes
68: new Object[] { new Integer(1), new Integer(4) }, // Default values for parameters
69: new Range[] { ARGUMENT_RANGE, ARGUMENT_RANGE } // Valid range for parameters
70: );
71: }
72: }
|