---
name: "VistaIOSelectBand"
section: "3"
platform: "linux"
package: "libvistaio-dev"
version: "1.2.19-3+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/VistaIOSelectBand"
---

# VistaIOSelectBand(3)

select bands of image pixels

## NAME

VistaIOSelectBand - select bands of image pixels

## SYNOPSIS

```
#include <vistaio.h>
```

**VistaIOBoolean VistaIOSelectBand (***routine***,** *image***,** *band***,** *npixels***,** *first\_pixel***)**

**VistaIOStringConst** *routine***;** **VistaIOImage** *image***;** **VistaIOBand** *band***;** **int \****npixels***;** **VistaIOPointer \****first\_pixel***;**

## ARGUMENTS

- *routine*

  **Names the routine that is using VistaIOSelectBand to check its arguments.**  **This name is included in any error messages produced by VistaIOSelectBand.**

- *image*

  **Specifies the image whose pixels are to be selected.**

- *band*

  **May specify a particular band of the image to be selected,** **or may be VistaIOAllBands to indicate that all bands of the image** **should be selected.**

- *npixels*

  **Returns the number of pixels selected, or may be** **NULL**

- *first\_pixel*

  **Returns the address of the first pixel selected, or may be** **NULL**

## DESCRIPTION

**VistaIOSelectBand selects one or all bands of an image for processing.**

**The** *image* **argument specifies the image, and** *band* **specifies**  **either a single band or all bands of that image. VistaIOSelectBand checks**  **the validity of those two arguments, then returns via** *npixels* **and**  *first\_pixel* **the number and location of the selected pixels. (The**  **pixels will be occupying a contiguous block of memory.) Either** *npixels* **or** *first\_pixel* **may be** **NULL** **if the corresponding return value is wanted.**

## RETURN VALUES

**VistaIOSelectBand returns**  **TRUE** **if its** *image* **and** *band* **arguments are consistent, and** **FALSE** **otherwise.**

## SEE ALSO

[**VistaIOImage**(3)](/VistaIOImage/3.md),

## DIAGNOSTICS

- \`\`*Routine*: Band *band* referenced in image of *nbands* band(s).''

  **The** *band* **argument is invalid given the number of bands in**  *image***.** *Routine* **will be the name supplied by the** *routine*  **argument.**

## AUTHOR

**Art Pope \<pope@cs.ubc.ca\>**

**Adaption to vistaio: Gert Wollny \<gw.fossdev@gmail.com\>**
