Dark Object Subtraction - Command Line Description |

### Command Line Description

Since the Dark Object Subtraction processor makes use of the SNAP graph processing framework, it can be used also as a command line tool. The graph processing is invoked by the command

- ${OPTTBX-INSTALL-DIR}/bin/gpt

To obtain general help on the graph processing, use the command

- ${OPTTBX-INSTALL-DIR}/bin/gpt -h

Specific help on the Dark Object Subtraction processor can be obtained with

- ${OPTTBX-INSTALL-DIR}/bin/gpt -h DarkObjectSubtraction

In this case, information on the usage and a list of all available parameters are given. The Dark Object Subtraction processor parameters can also be specified via a graph xml file. A possible graph xml file could look like the following. (Note that in principle it is not necessary to explicitly set parameters if default values shall be used).

    <graph id="DarkObjectSubtractionGraph">
    <version>1.0</version>
        <node id="someNodeId">
            <operator>DarkObjectSubtraction</operator>
                <sources>
                    <sourceProduct>${sourceProduct}</sourceProduct>
                </sources>
                <parameters>
                    <sourceBandNames>string,string,string,...</sourceBandNames>
                    <maskExpression>string</maskExpression>
                    <histogramMinimumPercentile>int</histogramMinimumPercentile>
            </parameters>
        </node>
    </graph>

This graph can be invoked by the following call on the command line:

      gpt <graph-file.xml> -SsourceProduct=<path-to-source-file>