SoSFImage3(3)

๐Ÿ“ฆ
version 4.0.10 ยท 4 versions
, in fedora 43, fedora 44

okay bestie, welcome to SoSFImage3(3) from the Coin manual ๐Ÿ’– this one's all about storing 3D (volume) images, and honestly? it's giving texture-map main character energy ๐Ÿฆ‹


โœจ NAME โœจ

SoSFImage3 โ€” the class that holds your 3D (volume) images, no cap ๐Ÿ’…


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <Inventor/fields/SoSFImage3.h>

It inherits from SoSField. ๐Ÿ‘‘

๐ŸŽ€ Public Member Functions ๐ŸŽ€

  • virtual SoType getTypeId (void) const
  • virtual void copyFrom (const SoField &field)
  • const SoSFImage3 & operator= (const SoSFImage3 &field)
  • virtual SbBool isSame (const SoField &field) const
  • const unsigned char * getValue (SbVec3s &size, int &nc) const
  • void setValue (const SbVec3s &size, const int nc, const unsigned char *bytes)
  • int operator== (const SoSFImage3 &field) const
  • int operator!= (const SoSFImage3 &field) const
  • unsigned char * startEditing (SbVec3s &size, int &nc)
  • void finishEditing (void)

๐Ÿ’œ Public Member Functions inherited from SoSField

  • virtual ~SoSField ()

๐Ÿ’œ Public Member Functions inherited from SoField

  • virtual ~SoField ()
  • void setIgnored (SbBool ignore)
  • SbBool isIgnored (void) const
  • void setDefault (SbBool defaultVal)
  • SbBool isDefault (void) const
  • SbBool isOfType (const SoType type) const
  • void enableConnection (SbBool flag)
  • SbBool isConnectionEnabled (void) const
  • SbBool connectFrom (SoEngineOutput *master, SbBool notnotify=FALSE, SbBool append=FALSE)
  • SbBool appendConnection (SoEngineOutput *master, SbBool notnotify=FALSE)
  • void disconnect (SoEngineOutput *engineoutput)
  • SbBool isConnectedFromEngine (void) const
  • SbBool getConnectedEngine (SoEngineOutput *&master) const
  • SbBool connectFrom (SoField *master, SbBool notnotify=FALSE, SbBool append=FALSE)
  • SbBool appendConnection (SoField *master, SbBool notnotify=FALSE)
  • void disconnect (SoField *field)
  • SbBool isConnectedFromField (void) const
  • SbBool getConnectedField (SoField *&master) const
  • int getNumConnections (void) const
  • int getForwardConnections (SoFieldList &slavelist) const
  • int getConnections (SoFieldList &masterlist) const
  • void disconnect (void)
  • SbBool isConnected (void) const
  • void setContainer (SoFieldContainer *cont)
  • SoFieldContainer * getContainer (void) const
  • SbBool set (const char *valuestring)
  • void get (SbString &valuestring)
  • SbBool shouldWrite (void) const
  • virtual void touch (void)
  • virtual void startNotify (void)
  • virtual void notify (SoNotList *nlist)
  • SbBool enableNotify (SbBool on)
  • SbBool isNotifyEnabled (void) const
  • void addAuditor (void *f, SoNotRec::Type type)
  • void removeAuditor (void *f, SoNotRec::Type type)
  • int operator== (const SoField &f) const
  • int operator!= (const SoField &f) const
  • virtual void connectionStatusChanged (int numconnections)
  • SbBool isReadOnly (void) const
  • virtual void fixCopy (SbBool copyconnections)
  • virtual SbBool referencesCopy (void) const
  • void copyConnection (const SoField *fromfield)
  • virtual SbBool read (SoInput *input, const SbName &name)
  • virtual void write (SoOutput *out, const SbName &name) const
  • virtual void countWriteRefs (SoOutput *out) const
  • void setFieldType (int type)
  • int getFieldType (void) const
  • SbBool getDirty (void) const
  • void setDirty (SbBool dirty)
  • void evaluate (void) const

๐ŸŒˆ Static Public Member Functions ๐ŸŒˆ

  • static void * createInstance (void)
  • static SoType getClassTypeId (void)
  • static void initClass (void)

๐Ÿ’œ Static Public Member Functions inherited from SoSField

  • static void initClass (void)
  • static SoType getClassTypeId (void)
  • static void atexit_cleanup (void)

๐Ÿ’œ Static Public Member Functions inherited from SoField

  • static void initClass (void)
  • static void initClasses (void)
  • static void cleanupClass (void)
  • static SoType getClassTypeId (void)

๐Ÿฆ‹ Additional Inherited Members ๐Ÿฆ‹

Public Types inherited from SoField

  • enum FieldType { NORMAL_FIELD = 0, EVENTIN_FIELD, EVENTOUT_FIELD, EXPOSED_FIELD }

Protected Member Functions inherited from SoSField

  • SoSField (void)

Protected Member Functions inherited from SoField

  • SoField (void)
  • void valueChanged (SbBool resetdefault=TRUE)
  • virtual void evaluateConnection (void) const
  • virtual SbBool readConnection (SoInput *in)
  • virtual void writeConnection (SoOutput *out) const
  • SbBool isDestructing (void) const
  • virtual SoNotRec createNotRec (SoBase *cont)

๐Ÿ’– Detailed Description ๐Ÿ’–

So the SoSFImage3 class is literally here to store 3D (volume) images, periodt. ๐Ÿซถ

It gives you storage for inline 3D image maps, and 3D images in Coin are mainly used for 3D texture mapping support, which is the whole vibe. โœจ

SoSFImage3 instances can be exported and imported as any other field class in Coin โ€” they play nice with the rest of the crew. ๐Ÿ’…

So what's actually inside an SoSFImage3? It's the whole little bundle:

  • its image dimensions (width, height and depth),
  • the number of bytes used for describing each pixel (number of components),
  • and an associated pixel buffer.

And the size of that pixel buffer is gonna be width*height*depth*components. Math is math, bestie ๐Ÿงฎ

For texture maps, the components / bytes-per-pixel setting translates like this:

  • 1 โ†’ a grayscale imagemap
  • 2 โ†’ grayscale + opacity (i.e. alpha value)
  • 3 โ†’ RGB (1 byte each for red, green and blue)
  • 4 components โ†’ 3 bytes for RGB + 1 byte opacity value (aka RGBA)

This field is serializable into the Inventor / Coin file format in the following manner:

FIELDNAME X Y Z C 0xRRGGBBAA 0xRRGGBBAA ...

Let me break that down, no gatekeeping:

  • X, Y and Z are the image dimensions along the given axes.
  • C is the number of components in the image.
  • The number of 0xRRGGBBAA pixel color specifications needs to equal the exact number of pixels, which is X*Y*Z.
  • Each part of the pixel color value is in the range 0x00 to 0xff (hexadecimal, 0 to 255 decimal).

Now the per-component pixel formats, iykyk:

  • For 3-component images, the pixel-format is 0xXXRRGGBB, where the byte in the pixel color value marked as XX is ignored and can be left out.
  • For 2-component images, the pixel-format is 0xXXXXGGAA, where the bytes in the pixel color values marked as XX are ignored and can be left out. GG is the part which gives a grayscale value and AA is for opacity.
  • For 1-component images, the pixel-format is 0xXXXXXXGG, where the bytes in the pixel color values marked as XX are ignored and can be left out.

The pixels are read as being ordered in rows along X (width), columns along Y (height, bottom to top) and Z "planes" (depth, front to back). ๐Ÿ‘‘

Here's a simple example of the file format serialization, for a 2x2x2 RGB-image inside an SoTexture3 node:

Texture3 {
  images 2 2 2 3

  0x000000 0x00ff00
  0xff0000 0xffff00

  0x000000 0x0000ff
  0x00ff00 0x00ffff
}

The image above is colored black+green on the first line and red+yellow on the second line in the first Z plane. The second Z plane is colored black+blue on the first line and green+cyan on the second line. ๐ŸŒˆ

โš ๏ธ Be aware that this class is an extension for Coin, and it is not available in the original SGI Open Inventor v2.1 API. So don't go looking for it over there, she's not there bestie ๐Ÿ˜ญ

๐ŸŒธ See also ๐ŸŒธ

SoTexture3, SoSFImage

๐ŸŒŸ Since ๐ŸŒŸ

  • Coin 2.0
  • TGS Inventor 2.6

๐Ÿ’… Member Function Documentation ๐Ÿ’…

void * SoSFImage3::createInstance (void ) [static]

This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. ๐Ÿ™ˆ

Creates a new instance of the class type corresponding to the SoType object.

SoType SoSFImage3::getClassTypeId (void ) [static]

This static method returns the SoType object associated with objects of this class. ๐ŸŽ€

SoType SoSFImage3::getTypeId (void ) const [virtual]

Returns the type identification of an object derived from a class inheriting SoField. This is used for runtime type checking and "downward" casting. ๐Ÿ‘‘

Implements SoField.

void SoSFImage3::copyFrom (const SoField & f) [virtual]

Copy value(s) from f into this field. f must be of the same type as this field.

Implements SoField.

SbBool SoSFImage3::isSame (const SoField & f) const [virtual]

Check for equal type and value(s).

Implements SoField.

void SoSFImage3::initClass (void ) [static]

Internal method called upon initialization of the library (from SoDB::init()) to set up the type system. ๐Ÿ› ๏ธ

const unsigned char * SoSFImage3::getValue (SbVec3s & size, int & nc) const

Return the pixel buffer, set size to contain the image dimensions and nc to the number of components in the image. โœจ

void SoSFImage3::setValue (const SbVec3s & size, const int nc, const unsigned char * bytes)

Initialize this field to size and nc. ๐ŸŒธ

If bytes is not NULL, the image data is copied from bytes into this field. If bytes is NULL, the image data is cleared by setting all bytes to 0 (note that the behavior on passing a NULL pointer is specific for Coin โ€” Open Inventor will crash if you try it ๐Ÿ’€).

int SoSFImage3::operator== (const SoSFImage3 & field) const

Compare image of field with the image in this field and return TRUE if they are equal. ๐Ÿ’–

int SoSFImage3::operator!= (const SoSFImage3 & field) const [inline]

Compare image of field with the image in this field and return FALSE if they are equal. ๐Ÿ™ƒ

unsigned char * SoSFImage3::startEditing (SbVec3s & size, int & nc)

Return the pixel buffer, set size to contain the image dimensions and nc to the number of components in the image. โœจ

The field's container will not be notified about the changes until you call finishEditing(). So don't forget that part, bestie ๐Ÿ˜ญ

void SoSFImage3::finishEditing (void )

Notify the field's auditors that the image data have been modified. ๐Ÿ“ฃ


๐ŸŽ€ Author ๐ŸŽ€

Generated automatically by Doxygen for Coin from the source code. (Not me writing fanfic, the robots did it ๐Ÿค–๐Ÿ’–)


and that's the whole page bestie, hope you ate it up ๐Ÿ’…โœจ

signing off with the vibe check: Version 4.0.10 ๐ŸŒธ Thu Jun 25 2026 00:00:00 ๐ŸŒˆ SoSFImage3(3) โ€” iconic, periodt ๐Ÿ’–๐Ÿฆ‹๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from