dialog.SelectBands[edit source]

Function
table dialog.SelectBands()
Description
Prompt for segment selection, get a list of band indices.
V1 Function Name
New to V2

dialog.SelectBands prompts the user to select bands, and returns a list containing the indices of the selected bands. It's the equivalent of a user pick for the bands ingredient in a GUI recipe.

dialog.SelectSegments is part of the dialog namespace, but it's separate from the other functions. It does not require or work with dialog.CreateDialog or dialog.Show.

Example[edit | edit source]

The Lua code:

bands = dialog.SelectBands ()
print ( #bands .. " bands selected" )
bndlst = ""
for ii = 1, #bands do
    bndlst = bndlst .. bands [ ii ]
    if ii < #bands then 
        bndlst = bndlst .. ","
    end
end
print ( "bands = \"" .. bndlst .. "\"" )

might produce the output:

5 bands selected
bands = "1,21,22,27,29"
Community content is available under CC-BY-SA unless otherwise noted.