VistaIOImage(3)

๐Ÿ’– NAME ๐Ÿ’–

VistaIOImage โ€” the image representation, bestie. That's the whole assignment โœจ


๐Ÿฆ‹ SYNOPSIS ๐Ÿฆ‹

#include <vistaio.h>

VistaIOImage image;

๐ŸŒธ DESCRIPTION ๐ŸŒธ

๐Ÿ‘‘ Introduction ๐Ÿ‘‘

ok so picture this: Vista stores an image as one or more two-dimensional arrays of pixel values. Each one of those 2-D arrays is called a band, and every band in a given image has the same size โ€” same number of rows, same number of columns, no exceptions ๐Ÿ’…

Why would you want multiple bands? so many reasons, literally:

  • multiple color components ๐ŸŽจ
  • multiple frames of a motion sequence ๐ŸŽฌ
  • the real and imaginary components of a complex image ๐Ÿง 
  • or honestly some combination of all of the above ๐Ÿ‘‘

And it's not just pixels โ€” an image can also carry an arbitrary list of attributes hanging off it. Extra info, no cap.

When an image is chilling in memory, you point at it with the C pointer type VistaIOImage. In data files, it goes by the type name image, and in memory it's identified by the VistaIORepnKind code VistaIOImageRepn. Because it's a standard object type with built-in support in the Vista library, images can be:

it's giving full citizenship in the object ecosystem fr fr ๐ŸŒˆ


๐ŸŽ€ Creating and Destroying Images ๐ŸŽ€

These are the routines that bring images into existence and then let them go. very main character energy ๐Ÿซถ

  • VistaIOImage VistaIOCreateImage (int nbands, int nrows, int ncolumns, VistaIOPixelRepn pixel_repn)

VistaIOCreateImage allocates memory for a brand new image with the numbers of bands, rows, and columns you specify. Heads up though:

its pixel values are not initialized ๐Ÿ˜ญ and it's handed an empty attribute list.

The pixel_repn argument gets explained down below under ``Pixel Representation''. (Peep VistaIOCreateImage(3) for the full details.)

  • void VistaIODestroyImage (VistaIOImage image)

VistaIODestroyImage releases the memory that image is occupying โ€” and yes, that includes the memory used by its pixel data and its attribute list. clean sweep ๐Ÿงน


๐Ÿ“ Image Size ๐Ÿ“

An image's numbers of bands, rows, and columns get abbreviated as nbands, nrows, and ncolumns. These macros are how you get at those numbers:

  • int VistaIOImageNBands (VistaIOImage image)
  • int VistaIOImageNRows (VistaIOImage image)
  • int VistaIOImageNColumns (VistaIOImage image)

VistaIOImageNBands, VistaIOImageNRows, and VistaIOImageNColumns return the number of bands, rows, and columns that image has. one each, no overlap ๐Ÿ’–

  • int VistaIOImageNPixels (VistaIOImage image)

VistaIOImageNPixels returns the total number of pixel values image has altogether โ€” like, the whole entire count. That's the product nbands * nrows * ncolumns. math ate ๐Ÿ’…


๐ŸŽจ Pixel Representation ๐ŸŽจ

An image's pixel values can be any one of these types:

VistaIOBit, VistaIOUByte, VistaIOSByte, VistaIOShort, VistaIOLong, VistaIOFloat, or VistaIODouble

And listen โ€” variables that are meant to hold pixel values, or pointers to pixel values, should be defined using these same types rather than built-in C types such as short and long. That's the portability move, bestie. don't skip it ๐Ÿซถ

These macros hand you the tea about an image's pixel representation:

  • VistaIORepnKind VistaIOPixelRepn (VistaIOImage image)

VistaIOPixelRepn returns a code indicating image's pixel representation. If image has VistaIOBit pixels, for example, it returns VistaIOBitRepn.

  • size_t VistaIOPixelSize (VistaIOImage image)

VistaIOPixelSize returns the size, in bytes, used for storing a single pixel of image โ€” meaning one pixel within a single band, row, and column. This value depends on machine architecture, so don't go assuming ๐Ÿ‘€

  • int VistaIOPixelPrecision (VistaIOImage image)

VistaIOPixelPrecision returns the minimum size, in bits, needed to represent a single pixel of image. This one does not depend on machine architecture โ€” it only depends on the kind of pixel value representation image uses. If image has VistaIOBit pixels, for example, this macro returns 1. โœจ

  • VistaIOStringConst VistaIOPixelRepnName (VistaIOImage image)

VistaIOPixelRepnName returns a string describing the type of pixel value representation used by image. For example, if image has VistaIOBit pixels, the string ``bit'' is returned.

  • VistaIODouble VistaIOPixelMaxValue (VistaIOImage image)

VistaIOPixelMaxValue returns the maximum value a pixel of image may have. For example, if image has VistaIOSByte pixels, it returns 127.0.

  • VistaIODouble VistaIOPixelMinValue (VistaIOImage image)

VistaIOPixelMinValue returns the minimum value a pixel of image may have. For example, if image has VistaIOSByte pixels, it returns -128.0.

  • size_t VistaIOImageSize (VistaIOImage image)

VistaIOImageSize returns the size, in bytes, of image's block of pixel data โ€” the whole thing, holding the values of every pixel in every band. This value depends on machine architecture. ๐Ÿ“


๐Ÿฆ‹ Pixel VistaIOalues ๐Ÿฆ‹

A particular pixel value gets indexed by a band number, a row number, and a column number. Bands, rows, and columns are all numbered consecutively from zero. Rows number down and columns number to the right, which means row 0, column 0 sits at the upper-left corner of the image. ๐Ÿ—บ๏ธ

  • type VistaIOPixel (VistaIOImage image, int band, int row, int column, type)

VistaIOPixel accesses the pixel at a specified band, row and column in an image whose pixels are of a specified type. That pixel type, type, has to be one of VistaIOBit, VistaIOUByte, VistaIOSByte, VistaIOShort, VistaIOLong, VistaIOFloat, or VistaIODouble. The macro can be used either as an rvalue (to fetch the pixel's value) or as an lvalue (to modify it or obtain its address). The ``EXAMPLES'' section, further down, shows it off as an rvalue. ๐Ÿ’…

  • VistaIOPointer VistaIOPixelPtr (VistaIOImage image, int band, int row, int column)

VistaIOPixelPtr returns the address of a pixel specified by its band, row, and column coordinates. You can fetch or modify the pixel at that address by first coercing the pointer to the appropriate type for the pixel. Like so:

pixel = VistaIOPixelPtr (image, band, row, column);
if (VistaIOPixelRepn (image) == VistaIOBitRepn)
       * (VistaIOBit *) pixel = new_value;
else ...
  • type ** VistaIOPixelArray (VistaIOImage image, type)

VistaIOPixelArray returns a pointer you can use to access any image pixel by indexing it first with the pixel's band number, then its row number, and then its column number. Example time:

VistaIOUByte **pixels = VistaIOPixelArray (image, VistaIOUByte);
pixels[band][row][column] = new_value;
  • VistaIOPointer VistaIOImageData (VistaIOImage image)

VistaIOImageData returns a pointer to image's block of pixel data. That block has the size VistaIOImageSize (image) bytes. ๐Ÿงš


๐Ÿ’œ Other Image Attributes ๐Ÿ’œ

On top of its pixel values, an image may have any number of other attributes, and they're represented as an attribute list.

  • VistaIOAttrList VistaIOImageAttrList (VistaIOImage image)

VistaIOImageAttrList is a macro for accessing the attribute list associated with an image. You can use it as an rvalue to reach attributes inside the list:

VistaIOGetAttr (VistaIOImageAttrList (image), VistaIONameAttr, ...)

or as an lvalue to mess with the entire list:

VistaIODestroyAttrList (VistaIOImageAttrList (image));
VistaIOImageAttrList (image) = VistaIOCopyAttrList (other_list);

๐ŸŒˆ Band Interpretation ๐ŸŒˆ

The bands of a multi-band image might represent the successive frames of a motion sequence, the left and right halves of a stereo pair, or the red, green, and blue channels of a color image. They might even represent a combination of such dimensions โ€” for example, a stereo pair of color images. iconic honestly ๐ŸŽฌ

Because there are so many different ways people might want to use the bands, every image carries information describing how its bands should be interpreted. This info assigns each band an interpretation in terms of four dimensions:

  • frame โ€” covers the various frames of a motion sequence
  • viewpoint โ€” covers, for example, the left and right channels of a stereo pair
  • color โ€” covers, for example, the red, green, and blue channels of a color image
  • component โ€” covers, for example, the real and imaginary components of a complex image

Now, these four dimensions do not account for every conceivable way you might want to use the bands of a multi-band image โ€” let's be real โ€” but they do cover most cases. And the scheme can usually be adapted to cover cases it doesn't explicitly handle. For example, a collection of images obtained under various lighting conditions could be represented by using the frame dimension to index the lighting condition. see? adaptable ๐Ÿ’ก

Each image specifies the sizes of its four band interpretation dimensions. For a stereo pair of color images, for example, the size of the viewpoint dimension is two, the size of the color dimension is three, and the remaining dimensions have sizes of one. Those dimension sizes are often abbreviated as nframes, nviewpoints, ncolors, and ncomponents. Their product should always equal the number of bands in the image. no cap. ๐Ÿ”ฅ

These macros exist for accessing the sizes:

  • int VistaIOImageNFrames (VistaIOImage image)
  • int VistaIOImageNViewpoints (VistaIOImage image)
  • int VistaIOImageNColors (VistaIOImage image)
  • int VistaIOImageNComponents (VistaIOImage image)

Each macro may be used as an rvalue to obtain the size of a dimension, or as an lvalue to set it. ๐Ÿ’…

The four dimensions get mapped onto the single dimension, band, according to a particular ordering: component varies most rapidly, then color, then viewpoint, and finally frame. There's a macro for computing this mapping:

  • int VistaIOBandIndex (VistaIOImage image, int frame, int viewpoint, int color, int component)

VistaIOBandIndex returns the index of the band that corresponds to a particular combination of frame, viewpoint, channel, and component indices. ๐ŸŽฏ

An image's attribute list may include attributes indicating how the image employs the four band interpretation dimensions. One attribute for each dimension provides the first level of description. Its value is an integer code, with some standard codes defined for common uses. Below is a list of the four attributes and their standard values. Shown in are both the symbolic constants that can be used C programs to refer to the integer values, and (in parentheses) the keywords used to represent the values externally, in Vista data files.

  • frame_interp, which currently has no standard values defined for it
  • VistaIOBandInterpStereoPair (stereo_pair) โ€” the two viewpoints are, respectively, the left and right images of a stereo pair. Stereo vision, we love to see it. ๐Ÿซถ

And color_interp? It's got these standard values:

  • VistaIOBandInterpRGB (rgb) โ€” the three colors are (respectively) the red, green, and blue color channels. The classic. ๐Ÿ’…

Then component_interp, with these standard values:

  • VistaIOBandInterpComplex (complex) โ€” the two components are (respectively) the real and imaginary components of a complex image. โœจ
  • VistaIOBandInterpGradient (gradient) โ€” either there's a single component representing gradient magnitude, or two components representing (respectively) the x (rightward) and y (upward) components of the gradient, or three representing the x, y, and z (forward in band sequence) components of the gradient. Pick your fighter. ๐ŸŒˆ
  • VistaIOBandInterpIntensity (intensity) โ€” a single component representing image intensity. For integer pixel representations, pixel values normally span the range between zero and the maximum representable pixel values (e.g., [0,127] for VistaIOSByte pixels). For floating point pixel representations, pixel values normally span the range [-1,+1]. ๐Ÿ“
  • VistaIOBandInterpOrientation (orientation) โ€” a single component representing orientation. Pixel values express orientation in radians, counterclockwise from the direction of increasing column number (rightward). ๐Ÿงญ

Okay so to stop yourself from accidentally misspelling these attribute names (it happens to the best of us ๐Ÿ˜ญ), use these symbolic constants:

#define VistaIOFrameInterpAttr "frame_interp"
#define VistaIOViewpointInterpAttr "viewpoint_interp"
#define VistaIOColorInterpAttr "color_interp"
#define VistaIOComponentInterpAttr "component_interp"

And there's a dictionary, VistaIOBandInterpDict, that defines the mapping between the band interpretation codes (like VistaIOBandInterpComplex) and their keywords (like complex):

VistaIODictEntry VistaIOBandInterpDict[];

For each of those four band interpretation dimensions, there's a routine you can use to simultaneously check both the dimension's size and, if present, its interpretation attribute. The VistaIOBandInterp(3) man page walks you through all four routines. ๐Ÿ‘‘


๐Ÿฆ‹ Pixel Aspect Ratio ๐Ÿฆ‹

Pixel aspect ratio is defined as the ratio of pixel width to pixel height. An image can have, on its attribute list, an attribute specifying that ratio as a floating point value. The attribute's name is pixel_aspect_ratio, and there's a symbolic constant for referring to it:

#define VistaIOPixelAspectRatioAttr "pixel_aspect_ratio"

When that attribute isn't there, a pixel aspect ratio of 1.0 is assumed. ๐Ÿ’–

๐ŸŒธ Calling Conventions ๐ŸŒธ

A Vista library routine that processes one image to produce another usually takes three or more arguments, like this:

VistaIOImage VistaIOProcessImage (VistaIOImage src,
          VistaIOImage dest, VistaIOBand band)

The first argument is the source image to be processed. The second is the destination image, which is gonna hold the result. You generally have three choices for how that destination image gets provided:

  1. you can have the routine create a destination image. If you pass NULL for dest, the routine creates and returns a destination image that's appropriate for the source image and for the type of operation being performed on it:
dest = VistaIOProcessImage (src, NULL, band);
  1. you can supply a destination image yourself, as long as it has the correct properties (usually an appropriate size and pixel representation):
dest = VistaIOCreateImageLike (src);
VistaIOProcessImage (src, dest, band);
  1. you can specify the same image as both source and destination, in which case the source pixel values get replaced by destination pixel values. This choice is only available for operations where the source and destination images have the same size and pixel representation.
VistaIOProcessImage (src, src, band);

In all cases, the routine returns the destination image if it's successful, and NULL otherwise. And if NULL is returned, the routine has already called VistaIOWarning(3) to issue a warning message describing the problem. ๐Ÿ˜ญ

The third argument to most image processing routines, band, may specify a particular band of the source image to be processed; or it may be the constant VistaIOAllBands (defined as -1) to say that all bands of the source image are to be processed. When a particular band is specified, band must be at least 0 and less than the number of bands in the source image; the destination image will usually have a single band to contain the result. When VistaIOAllBands is specified, the destination image will usually have the same number of bands as the source image. โœจ

Normally a routine copies the source image's attribute list to the destination image, replacing any attributes the destination image already had. The sizes of the four band interpretation dimensions (nframes, nviewpoints, etc.) are copied too. When appropriate, though, a routine may delete or modify the attributes and dimensional sizes as it copies them from source to destination. For example, a routine that converts an RGB color image to a grey-scale one (VistaIORGBImageToGray(3)) expects a source image with the properties ncolors: 3 and color_interp: rgb; the destination image it produces has ncolors: 1 and no color_interp attribute. ๐Ÿ’…

๐Ÿ‘‘ Image Representation in Memory ๐Ÿ‘‘

typedef struct {
       int nbands;              /* number of bands */
       int nrows;               /* number of rows */
       int ncolumns;            /* number of columns */
       VistaIORepnKind pixel_repn;/* representation of pixel values */
       unsigned long flags;     /* various flags */
       VistaIOAttrList attributes;/* list of other image attributes */
       VistaIOPointer data;     /* array of image pixel values */
       VistaIOPointer *row_index;/* ptr to first pixel of each row */
       VistaIOPointer *band_index;/* ptr to first row of each band */
       int nframes;             /* number of motion frames */
       int nviewpoints;         /* number of camera viewpoints */
       int ncolors;             /* number of color channels */
       int ncomponents;         /* number of vector components */
} VistaIOImageRec, *VistaIOImage;

An image is represented in memory by a value of type VistaIOImage, which points to a VistaIOImageRec structure. If you're programming with images you usually won't need to access this structure's fields directly, because there are Vista library routines and macros available for basically every purpose. But when you're debugging, you might occasionally need to examine a VistaIOImageRec structure's fields directly. The next few paragraphs describe those fields. ๐Ÿ”

The nbands, nrows, and ncolumns fields of the structure describe how many bands, rows, and columns the image has. Its pixel_repn field specifies how the image's pixel values are represented; it contains one of the constants VistaIOBitRepn, VistaIOUByteRepn, VistaIOSByteRepn, VistaIOShortRepn, VistaIOLongRepn, VistaIOFloatRepn, or VistaIODoubleRepn. Its attributes field contains the list of attributes associated with the image. ๐Ÿ“‹

An image's pixel values are stored in a contiguous block of memory where they're arranged like this: within each band, pixel values are ordered beginning with the pixel at row 0, column 0, proceeding to row 0, column 1, etc., and ending with the highest numbered row and column. Each band's array of pixel values occupies a separate block of memory, and these blocks are arranged contiguously. All of band 0's pixel values come first, followed by all of band 1's, etc. So in summary, pixel values are ordered by band, then by row within each band, and then by column. The pixel values themselves are of type VistaIOBit, VistaIOUByte, ..., or VistaIODouble. ๐ŸŒˆ

The data field of a VistaIOImageRec points to the block of memory containing pixel values. The row_index field points to a vector of pointers to the first pixel value of each row within each band; that vector is of length (nbands * nrows) and it's indexed by an expression of the form (band * nrows + row). The band_index field points to a vector of pointers to the first row_index entry of each band; this vector is of length nbands and it's indexed by band number. ๐Ÿงš

Individual bits of a VistaIOImageRec's flags field are used to denote various things. One bit is currently defined:

  • VistaIOImageSingleAlloc โ€” this bit, if nonzero, indicates that the VistaIOImageRec, the block of pixel values, the row index, and the band index were all obtained with a single call to VistaIOMalloc(3). If the bit is zero, these things were allocated separately and therefore they must be released separately. ๐Ÿ‘€

The nframes, nviewpoints, ncolors, and ncomponents fields describe the number of motion frames, camera positions, color channels, and vector components that the image's various bands represent. Together they should account for all bands of the image โ€” i.e., their product should equal nbands. The image's bands are ordered according to these fields, with the component index incrementing most rapidly and the frame index incrementing least rapidly. โญ

๐ŸŽ€ Image Representation in a File ๐ŸŽ€

attribute-name: image {
       nbands: nbands
       nrows: nrows
       ncolumns: ncolumns
       repn: pixel-representation
       nframes: nframes
       nviewpoints: nviewpoints
       ncolors: ncolors
       ncomponents: ncomponents
       data: data-offset
       length: data-length
       other attributes
}
pixel-representation ::=
       bit | ubyte | sbyte | short | long | float | double

An image is represented in a Vista data file as an attribute. The attribute's value is an object of type image containing the following attributes, in any order:

  • nbands โ€” an integer-valued attribute specifying the number of bands in the image.
  • nrows โ€” an integer-valued attribute specifying the number of rows in the image.
  • ncolumns โ€” an integer-valued attribute specifying the number of columns in the image.
  • repn โ€” a string-valued attribute, and it's the one that spills the tea on your image's pixel value representation. It's gotta be one of these keywords: bit, ubyte, sbyte, short, long, float, or double. โœจ
  • nframes โ€” integer-valued, telling you how many motion frames the image's bands are representing. cinematic vibes fr ๐ŸŽฌ
  • nviewpoints โ€” integer-valued, the number of camera viewpoints the image's bands represent. main character angles only ๐Ÿ’…
  • ncolors โ€” integer-valued, how many color channels the image's bands represent. ๐ŸŒˆ
  • ncomponents โ€” integer-valued, the number of vector components the image's bands represent.
  • data โ€” integer-valued, giving you the offset of the image's pixel data within the binary data section of the file. it's literally just "where do the pixels start" ๐Ÿซถ
  • length โ€” integer-valued, the size, in bytes, of the image's pixel data. the pixel data's whole entire size, no cap.

An nbands, nframes, nviewpoints, ncolors, or ncomponents attribute may be omitted if its value is 1 โ€” so if it's just one, you can ghost it entirely, bestie. ๐Ÿ˜Œ

Moreover, the image object's attribute list may contain any other attributes associated with the image. See, for example, the data file listed under EXAMPLES, below. ๐Ÿ‘€


๐Ÿฆ‹ Pixel Representation in a File ๐Ÿฆ‹

Image pixel values are represented in binary form in the binary data section of a file. They occupy a contiguous block in which pixel values are ordered by band, row, and column โ€” same order as in memory. so organized. so slay. ๐Ÿ’–

Single-bit pixel values are packed eight to a byte, beginning with the most-significant bit of each byte. Pixel values of more than 8 bits are packed into multiple bytes, beginning with the most-significant byte of the pixel value. Consecutive pixel values are packed together, without intervening bits for padding or alignment. If necessary, however, the entire block of pixel values is padded so that its length is a multiple of 8 bits. no gaps, no awkward pauses, just pixels stacked together like a group photo. ๐Ÿ“ธ

Each kind of pixel is represented as follows in the Vista data file:

  • VistaIOBit โ€” as a 1-bit unsigned integer
  • VistaIOUByte โ€” as an 8-bit unsigned integer
  • VistaIOSByte โ€” as an 8-bit two's-complement integer
  • VistaIOShort โ€” as a 16-bit two's-complement integer
  • VistaIOLong โ€” as a 32-bit two's-complement integer
  • VistaIOFloat โ€” as a 32-bit IEEE floating-point number
  • VistaIODouble โ€” as a 64-bit IEEE floating point number
Note that a pixel's representation in a Vista data file is independent of the form it takes when stored in memory on any particular machine. Thus a VistaIOBit pixel may occupy 8 bits in the main memory of a Sun SPARCstation 32 bits on a Cray machine, but it always occupies a single bit in a Vista data file. ๐Ÿ’€

like... your machine's memory is a whole different situation and that's fine, that's her business. but in the file, one bit is one bit. periodt. ๐Ÿ‘‘


๐ŸŒธ EXAMPLES ๐ŸŒธ

This code fragment sets all pixels with 1 in a one-band image of single-bit pixels:

for (i = 0; i < VistaIOImageNRows (image); i++)
       for (j = 0; j < VistaIOImageNColumns (image); j++)
              VistaIOPixel (image, 0, i, j, VistaIOBit) = 1;

The previous example may be made more efficient by avoiding the repeated computation of pixel addresses โ€” glow-up edition, literally just caching the pointer once:

VistaIOBit *p = & VistaIOPixel (image, 0, 0, 0, VistaIOBit);

for (i = 0; i < VistaIOImageNPixels (image); i++)
       *p++ = 1;

This code fragment creates an image of complex pixel values. it's giving imaginary numbers, and we're obsessed:

image = VistaIOCreateImage (2, 256, 256, VistaIOFloatRepn);

VistaIOImageNFrames (image) = VistaIOImageNViewpoints (image) =
          VistaIOImageNColors (image) = 1;

VistaIOImageNComponents (image) = 2;

VistaIOSetAttr (VistaIOImageAttrList (image),
          VistaIOComponentInterpAttr, NULL, VistaIOLongRepn,
          (VistaIOLong) VistaIOBandInterpComplex);

Here is an example of a Vista data file containing two images:

V-data 2 {
       one: image {
              nbands: 2
              nrows: 256
              ncolumns: 256
              ncomponents: 2
              component_interp: complex
              repn: float
              data: offset of first image's pixel values
              length: 524288
              name: "UFO sighted over VistaIOancouver"
              pixel_aspect_ratio: 1.25
       }
       two: image {
              nrows: 32
              ncolumns: 32
              repn: ubyte
              data: offset of second image's pixel values
              length: 128
              name: "UFO icon"
       }
}
^L
first image's pixel values
second image's pixel values

๐ŸŽ€ SEE ALSO ๐ŸŽ€

VistaIOattribute(3)


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

Art Pope <pope@cs.ubc.ca>

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

โœจ LIST OF ROUTINES โœจ

Okay bestie, gather round ๐Ÿ’–. This is the master list of every Vista library routine that operates on images. The original calls it a table โ€” we're doing cute bullets, same energy. Many of these routines are documented elsewhere, by a section 3 man page named for the routine. So if you want the full deep dive, go find that page. This is the group chat recap. ๐Ÿซถ


๐ŸŽ€ For creating and destroying images in memory ๐ŸŽ€

  • VistaIOCreateImage โ€” creates an image. โœจ
  • VistaIOCreateImageLike โ€” creates one image just like another. twin energy ๐Ÿ‘ฏ
  • VistaIODestroyImage โ€” releases the memory an image was occupying. bye bye ๐Ÿ’…

๐ŸŽ€ For fetching and storing pixel values ๐ŸŽ€

  • VistaIOGetPixel โ€” fetches a pixel value with any pixel representation. ๐Ÿ‘‘
  • VistaIOSetPixel โ€” stores a pixel value with any pixel representation. ๐Ÿ’พ
  • VistaIOSelectBand โ€” selects bands of image pixels for processing. ๐ŸŽš๏ธ
  • VistaIOSelectDestIamge โ€” selects a destination for an image processing operation. ๐ŸŽฏ

๐ŸŽ€ For getting band interpretation information ๐ŸŽ€

  • VistaIOImageFrameInterp โ€” reports the meaning of the frame dimension. ๐Ÿ–ผ๏ธ
  • VistaIOImageColorInterp โ€” reports the meaning of the color dimension. ๐ŸŒˆ
  • VistaIOImageComponentInterp โ€” reports the meaning of the component dimension. ๐Ÿงฉ
  • VistaIOImageViewpointInterp โ€” reports the meaning of the viewpoint dimension. ๐Ÿ‘๏ธ

๐ŸŽ€ For reading and writing images ๐ŸŽ€

  • VistaIOReadImages โ€” reads a set of images from a data file. ๐Ÿ“‚
  • VistaIOReadPlain โ€” reads an image in Vista plain file format. ๐Ÿ“„
  • VistaIOReadPnm โ€” reads an image in Portable Anymap (PNM) format. ๐Ÿ–ผ๏ธ
  • VistaIOReadUbcIff โ€” reads an image in UBC image file format. ๐ŸŽž๏ธ
  • VistaIOWriteImages โ€” writes a set of images to a data file. ๐Ÿ’ฝ
  • VistaIOWriteUbcIff โ€” writes an image in UBC image file format. โœ๏ธ

๐ŸŽ€ For comparing images ๐ŸŽ€

  • VistaIOSameImageRange โ€” tests whether two images have the same size and pixel representation. ๐Ÿ”
  • VistaIOSameImageSize โ€” tests whether two images have the same size. ๐Ÿ“

๐ŸŽ€ For copying images ๐ŸŽ€

  • VistaIOCombineBands โ€” copies selected bands of pixel values from various source images to a single destination image. ๐Ÿงฌ
  • VistaIOCopyBand โ€” copies one or all bands of pixel values from one image to another. ๐ŸŽต
  • VistaIOCopyImage โ€” copies one image to another. ๐Ÿ“‹
  • VistaIOCopyImageAttrs โ€” copies one image's attributes to another. ๐Ÿท๏ธ
  • VistaIOCopyImagePixels โ€” copies one image's pixel values to another. ๐Ÿ”ข

๐ŸŽ€ For converting an image's pixel representation ๐ŸŽ€

  • VistaIOConvertImageCopy โ€” converts an image's pixel representation while simply copying pixel values. ๐Ÿ”„
  • VistaIOConvertImageLinear โ€” converts an image's pixel representation using some linear mapping of pixel values. ๐Ÿ“ˆ
  • VistaIOConvertImageOpt โ€” converts an image's pixel representation while mapping the actual range of source pixel values to the full range of possible destination pixel values. ๐ŸŽฏ
  • VistaIOConvertImageRange โ€” converts an image's pixel representation while mapping the full range of possible source pixel values to the full range of possible destination pixel values. ๐ŸŒ

๐ŸŽ€ For rotating or transposing an image ๐ŸŽ€

  • VistaIOFlipImage โ€” flips an image horizontally or vertically. ๐Ÿ”„
  • VistaIORotateImage โ€” rotates an image by any angle. ๐ŸŒ€
  • VistaIOTransposeImage โ€” transposes the rows and columns of an image. ๐Ÿ”€

๐ŸŽ€ For changing the size of an image ๐ŸŽ€

  • VistaIOCropImage โ€” extracts a rectangular region from an image. โœ‚๏ธ
  • VistaIOExpandImage โ€” increases the size of an image by an integer factor. ๐Ÿ”
  • VistaIOReduceImage โ€” decreases the size of an image by an integer factor. ๐Ÿ”Ž
  • VistaIOScaleImage โ€” scales the size of an image, up or down, by any factor. ๐Ÿ“

๐ŸŽ€ For filtering and transforming images ๐ŸŽ€

  • VistaIOAdjustImage โ€” adjusts image brightness and/or contrast. โ˜€๏ธ
  • VistaIOCanny โ€” detects edges in an image using a Canny operator. ๐Ÿ•ต๏ธ
  • VistaIOConvolveImage โ€” convolves an image with a mask. ๐ŸŽญ
  • VistaIOGaussianConvolveImage โ€” convolves an image with a Gaussian filter or its derivative. ๐ŸŒซ๏ธ
  • VistaIOImageFFT โ€” computes a forward or inverse Fourier transform. ๐ŸŒŠ
  • VistaIOImageGradient โ€” computes the horizontal and vertical components of image gradient. ๐Ÿ“
  • VistaIOImageOp โ€” performs an arithmetic or logical operation on an image's pixel values. โž•
  • VistaIOInvertImage โ€” inverts an image's pixel values, swapping black and white. โšซโšช
  • VistaIOLinkImage โ€” creates an edge set by linking connected, non-zero image pixels. ๐Ÿ”—
  • VistaIONegateImage โ€” negates an image's pixel values. โž–
  • VistaIOZeroCrossings โ€” marks the zero crossings in an image. 0๏ธโƒฃ

๐ŸŽ€ For computing image statistics ๐ŸŽ€

  • VistaIOImageStats โ€” computes the minimum, maximum, mean, and variance of an image's pixel values. ๐Ÿ“Š

๐ŸŽ€ For working with complex images ๐ŸŽ€

  • VistaIOBuildComplexImage โ€” builds a complex image from separate images of real and imaginary components. ๐Ÿง 
  • VistaIOImageMagnitude โ€” computes the magnitude of a complex image. ๐Ÿ“
  • VistaIOImagePhase โ€” computes the phase of a complex image, or the gradient direction of a two-component gradient image. ๐ŸŒˆ

๐ŸŽ€ For displaying or rendering images ๐ŸŽ€

  • VistaIOImageBandToPS โ€” renders an image band using PostScript. ๐Ÿ–จ๏ธ
  • VistaIORGBImageToPS โ€” renders an RGB color image using PostScript. ๐ŸŒˆ
  • VistaIOImageView โ€” an X Toolkit widget for displaying an image. ๐ŸชŸ
  • VistaIOImageWindowSize โ€” computes appropriate window dimensions for displaying an image. ๐Ÿ“

๐ŸŽ€ For filling images with patterns ๐ŸŽ€

  • VistaIOFillImage โ€” fills an image with a constant pixel value. ๐Ÿชฃ
  • VistaIORampImage โ€” fills an image with an intensity ramp. ๐Ÿ“ˆ
  • VistaIOSineGratingImage โ€” fills an image with a sine grating. ๐ŸŒŠ
  • VistaIOZonePlateImage โ€” fills an image with a zone plate pattern. ๐ŸŽฏ
  • VistaIOBilinearNoiseImage โ€” fills an image with a random mixture of two pixel values. ๐ŸŽฒ
  • VistaIONormalNoiseImage โ€” fills an image with pixel values drawn from a normal distribution. ๐Ÿ””
  • VistaIOUniformNoiseImage โ€” fills an image with pixel values drawn from a uniform distribution. ๐ŸŽฒ

๐Ÿฆ‹ Miscellaneous ๐Ÿฆ‹

  • VistaIOOptFlowWLS โ€” compute optical flow by weighted least squares. ๐Ÿงฎ

That's the whole lineup, bestie! This page is from VistaIO Version 1.2.14, dated 12 April 1994, and it's the VistaIOImage(3) man page. Now go make those pixels behave. ๐Ÿ’…๐Ÿฆ‹