VistaIOBandInterp(3)

✨ VistaIOBandInterp ✨ (section 3, library functions manual, bestie)

okay so this is VistaIOBandInterp from the VistaIO library manual, and it's literally the girlies who tell you how to read an image's bands πŸ’… no cap, it's giving "who are these bands and what do they MEAN".


🌸 NAME 🌸

VistaIOImageFrameInterp, VistaIOImageViewpointInterp, VistaIOImageColorInterp, VistaIOImageComponentInterp β€” image band interpretation πŸŽ€


✨ SYNOPSIS ✨

#include <vistaio.h>

VistaIOBandInterp VistaIOImageFrameInterp (VistaIOImage image)

VistaIOBandInterp VistaIOImageViewpointInterp (VistaIOImage image)

VistaIOBandInterp VistaIOImageColorInterp (VistaIOImage image)

VistaIOBandInterp VistaIOImageComponentInterp (VistaIOImage image)

typedef enum {
    VistaIOBandInterpNone,    /* no interpretation */
    VistaIOBandInterpOther,   /* unknown interpretation */
    VistaIOBandInterpStereoPair,/* describing camera viewpoints */
    VistaIOBandInterpRGB,     /* describing color channels */
    VistaIOBandInterpComplex, /* describing vector components */
    VistaIOBandInterpGradient,
    VistaIOBandInterpIntensity,
    VistaIOBandInterpOrientation
} VistaIOBandInterp;

like look at that enum, it's a whole mood board of possibilities πŸ’–


🫢 ARGUMENTS 🫢

  • image β€” the image you're asking about, queen. You pass in the image whose band interpretation info you want, and that's the whole assignment. πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

So there's these four routines and they all do basically the same cute thing: they tell you how an image's bands are supposed to be interpreted. No guessing, no vibes-only reading, just facts.

Each one reports on one of four band interpretation dimensions:

  1. motion sequence frame
  2. camera viewpoint
  3. color channel
  4. vector component

four routines, four dimensions, one iconic little squad πŸŽ€βœ¨


πŸ‘‘ RETURN VALUES πŸ‘‘

Each routine looks at the size of its dimension (like nframes, bestie) plus any band interpretation attribute for that dimension (like frame_interp) and hands you back a value based on those two things. Specifically, and this part is important so read it fr fr:

  • if the size of the dimension is 1 and there is no band interpretation attribute, it returns VistaIOBandInterpNone
  • VistaIOImageViewpointInterp returns VistaIOBandInterpStereoPair if image is a standard stereo pair (i.e., nviewpoints: 2 and viewpoint_interp: stereo_pair) 🫢
  • VistaIOImageColorInterp returns VistaIOBandInterpRGB if image is a standard RGB color image (i.e., ncolors: 3 and color_interp: rgb) 🌈
  • VistaIOImageComponentInterp returns VistaIOBandInterpComplex if image is a standard complex image (i.e., ncomponents: 2 and component_interp: complex) ✨
  • VistaIOImageComponentInterp returns VistaIOBandInterpGradient if image is a standard gradient image (i.e., ncomponents: 1 or 2, and component_interp: gradient) πŸ¦‹
  • VistaIOImageComponentInterp returns VistaIOBandInterpIntensity if image is a standard intensity image (i.e., ncomponents: 1 and component_interp: intensity) πŸ’‘
  • VistaIOImageComponentInterp returns VistaIOBandInterpOrientation if image is a standard orientation image (i.e., ncomponents: 1 and component_interp: orientation) 🧭
  • each routine returns VistaIOBandInterpOther otherwise πŸ’€

🌟 SEE ALSO 🌟

go read those too, iykyk πŸ“šβœ¨


🚨 DIAGNOSTICS 🚨

a warning gets issued and VistaIOBandInterpOther gets returned if a dimension's size (like ncolors) and the corresponding band interpretation attribute (like color_interp) are inconsistent. messy. inconsistent. not slaying.
a warning also gets issued if the product of the four dimension's sizes does not equal the total number of bands in the image. like the math is not mathing 😭

πŸ’– AUTHOR πŸ’–

  • Art Pope <pope@cs.ubc.ca>
  • Adaption to vistaio: Gert Wollny <gw.fossdev@gmail.com>

and that's the whole page bestie!! this was VistaIO Version 1.2.14, dated 24 April 1993 β€” yes she's an elder but she's still iconic, periodt πŸ’…βœ¨πŸŽ€