SoSFImage3(3)
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) constvirtual void copyFrom (const SoField &field)const SoSFImage3 & operator= (const SoSFImage3 &field)virtual SbBool isSame (const SoField &field) constconst unsigned char * getValue (SbVec3s &size, int &nc) constvoid setValue (const SbVec3s &size, const int nc, const unsigned char *bytes)int operator== (const SoSFImage3 &field) constint operator!= (const SoSFImage3 &field) constunsigned 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) constvoid setDefault (SbBool defaultVal)SbBool isDefault (void) constSbBool isOfType (const SoType type) constvoid enableConnection (SbBool flag)SbBool isConnectionEnabled (void) constSbBool connectFrom (SoEngineOutput *master, SbBool notnotify=FALSE, SbBool append=FALSE)SbBool appendConnection (SoEngineOutput *master, SbBool notnotify=FALSE)void disconnect (SoEngineOutput *engineoutput)SbBool isConnectedFromEngine (void) constSbBool getConnectedEngine (SoEngineOutput *&master) constSbBool connectFrom (SoField *master, SbBool notnotify=FALSE, SbBool append=FALSE)SbBool appendConnection (SoField *master, SbBool notnotify=FALSE)void disconnect (SoField *field)SbBool isConnectedFromField (void) constSbBool getConnectedField (SoField *&master) constint getNumConnections (void) constint getForwardConnections (SoFieldList &slavelist) constint getConnections (SoFieldList &masterlist) constvoid disconnect (void)SbBool isConnected (void) constvoid setContainer (SoFieldContainer *cont)SoFieldContainer * getContainer (void) constSbBool set (const char *valuestring)void get (SbString &valuestring)SbBool shouldWrite (void) constvirtual void touch (void)virtual void startNotify (void)virtual void notify (SoNotList *nlist)SbBool enableNotify (SbBool on)SbBool isNotifyEnabled (void) constvoid addAuditor (void *f, SoNotRec::Type type)void removeAuditor (void *f, SoNotRec::Type type)int operator== (const SoField &f) constint operator!= (const SoField &f) constvirtual void connectionStatusChanged (int numconnections)SbBool isReadOnly (void) constvirtual void fixCopy (SbBool copyconnections)virtual SbBool referencesCopy (void) constvoid copyConnection (const SoField *fromfield)virtual SbBool read (SoInput *input, const SbName &name)virtual void write (SoOutput *out, const SbName &name) constvirtual void countWriteRefs (SoOutput *out) constvoid setFieldType (int type)int getFieldType (void) constSbBool getDirty (void) constvoid 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) constvirtual SbBool readConnection (SoInput *in)virtual void writeConnection (SoOutput *out) constSbBool isDestructing (void) constvirtual 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 imagemap2โ grayscale + opacity (i.e. alpha value)3โ RGB (1 byte each for red, green and blue)4components โ 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,YandZare the image dimensions along the given axes.Cis the number of components in the image.- The number of
0xRRGGBBAApixel color specifications needs to equal the exact number of pixels, which isX*Y*Z. - Each part of the pixel color value is in the range
0x00to0xff(hexadecimal,0to255decimal).
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 asXXis ignored and can be left out. - For 2-component images, the pixel-format is
0xXXXXGGAA, where the bytes in the pixel color values marked asXXare ignored and can be left out.GGis the part which gives a grayscale value andAAis for opacity. - For 1-component images, the pixel-format is
0xXXXXXXGG, where the bytes in the pixel color values marked asXXare 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
- fedora 43: Coin4-devel 4.0.10-1.fc43 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 43: Coin4-devel 4.0.10-1.fc43 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 ยท BSD-3-Clause AND GPL-3.0-or-later
- fedora 44: Coin4-devel 4.0.10-1.fc44 ยท BSD-3-Clause AND GPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms