Click or drag to resize
SoSFImage Class

Field containing a 2D image.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.Inventor.FieldsSoField
      OIV.Inventor.FieldsSoSField
        OIV.Inventor.FieldsSoSFImage

Namespace: OIV.Inventor.Fields
Assembly: OIV.Inventor (in OIV.Inventor.dll) Version: 2024.2.2.0 (10.16.2.0)
Syntax
public class SoSFImage : SoSField

The SoSFImage type exposes the following members.

Constructors
  NameDescription
Public methodSoSFImage

Default constructor.

Top
Methods
  NameDescription
Public methodAppendConnection(SoEngineOutput)

Appends this field to the list of connections from another engineOutput.

(Inherited from SoField.)
Public methodAppendConnection(SoField)

Appends this field to the list of connections from another field.

(Inherited from SoField.)
Public methodConnectFrom(SoEngineOutput)

Connects this field from an engine output.

(Inherited from SoField.)
Public methodConnectFrom(SoField)

Connects this field to another field.

(Inherited from SoField.)
Public methodCopyFrom

Copy from another field of same type.

Public methodDisconnect

Disconnect the field from whatever it was connected to.

(Inherited from SoField.)
Public methodDisconnect(SoEngineOutput)

Disconnect the field from the requested engineOutput.

(Inherited from SoField.)
Public methodDisconnect(SoField)

Disconnect the field from the requested field.

(Inherited from SoField.)
Public methodEnableConnection

Field connections may be enabled and disabled.

(Inherited from SoField.)
Public methodEquals
Public methodFinishEditing

This method (along with OIV.Inventor.Fields.SoSFImage.StartEditing(OIV.Inventor.SbVec2s@, System.Int32@, OIV.Inventor.Fields.SoSFImage.DataTypes@))can be used to efficiently edit the values in an image field.

Public methodGet

Returns the value of the field in the Open Inventor file format, even if the field has its default value.

(Inherited from SoField.)
Public methodGetConnectedEngine

Returns true if this field is being written into by an engine, and returns the engine output it is connected to in engineOutput.

(Inherited from SoField.)
Public methodGetConnectedField

Returns true if this field is being written into by another field, and returns the field it is connected to in writingField.

(Inherited from SoField.)
Public methodGetConnections

Returns a list of the connections to this field.

(Inherited from SoField.)
Public methodGetContainer

Returns the object that contains this field.

(Inherited from SoField.)
Public methodGetForwardConnections

Adds references to all of the fields that this field is writing into (either fields in nodes, global fields or engine inputs) to the given field list, and returns the number of forward connections.

(Inherited from SoField.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetNumComponents

Returns image's number of components.

Public methodGetNumConnections

Returns the number of connections to this field.

(Inherited from SoField.)
Public methodGetSubTexture(Int32, SbVec2i32, SbVec2i32)

Public methodGetSubTexture(Int32, SbVec2s, SbVec2s)

Same as above.

Public methodGetSubTexture(Int32, SbVec2i32, SbVec2i32, SoSFImageDataTypes)

Public methodGetSubTexture(Int32, SbVec2s, SbVec2s, SoSFImageDataTypes)

Returns a buffer of a given subTexture set by (), () or a OIV.Inventor.Fields.SoSFImage.StartEditing(OIV.Inventor.SbVec2s@, System.Int32@, OIV.Inventor.Fields.SoSFImage.DataTypes@)/finishEditing() pair.

Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue(SbVec2i32, Int32)

Public methodGetValue(SbVec2s, Int32)

Same as above.

Public methodGetValue(SbVec2i32, Int32, SoSFImageDataTypes)

Public methodGetValue(SbVec2s, Int32, SoSFImageDataTypes)

Returns the pixels in the image as an array of values of type <dataType>.

Public methodGetValueSize

Gets the size of the value.

(Inherited from SoField.)
Public methodHasSubTextures

Returns true if subTextures have been defined or false if none have been defined.

Public methodHasTransparency

Returns true if the image contains any transparent pixels.

Public methodIsConnected

Returns true if the field is connected to anything.

(Inherited from SoField.)
Public methodIsConnectedFromEngine

Returns true if the field is connected to an engine's output.

(Inherited from SoField.)
Public methodIsConnectedFromField

Returns true if the field is connected to another field.

(Inherited from SoField.)
Public methodIsConnectedFromVRMLInterp

Returns true if the field is connected to a VRML interpOutput.

(Inherited from SoField.)
Public methodIsConnectionEnabled

Returns false if connections to this field are disabled.

(Inherited from SoField.)
Public methodIsDefault

Gets the state of default flag of the field.

(Inherited from SoField.)
Public methodIsIgnored

Gets the ignore flag for this field.

(Inherited from SoField.)
Public methodIsNeverWrite

Queries the "neverWrite" flag.

Public methodSet

Sets the field to the given value, which is an ASCII string in the Open Inventor file format.

(Inherited from SoField.)
Public methodSetIgnored

Sets the ignore flag for this field.

(Inherited from SoField.)
Public methodSetNeverWrite

Sets the "neverWrite" flag.

Public methodSetSubValue(SbVec2i32, SbVec2i32, Int16)
Public methodSetSubValue(SbVec2i32, SbVec2i32, Int32)
Public methodSetSubValue(SbVec2i32, SbVec2i32, SByte)
Public methodSetSubValue(SbVec2i32, SbVec2i32, Single)
Public methodSetSubValue(SbVec2i32, SbVec2i32, UInt16)
Public methodSetSubValue(SbVec2i32, SbVec2i32, UInt32)
Public methodSetSubValue(SbVec2s, SbVec2s, Byte)
Public methodSetSubValue(SbVec2s, SbVec2s, Int16)
Public methodSetSubValue(SbVec2s, SbVec2s, Int32)
Public methodSetSubValue(SbVec2s, SbVec2s, SByte)
Public methodSetSubValue(SbVec2s, SbVec2s, Single)
Public methodSetSubValue(SbVec2s, SbVec2s, UInt16)
Public methodSetSubValue(SbVec2s, SbVec2s, UInt32)
Public methodSetSubValues(SbVec2i32, SbVec2i32, Byte)
Public methodSetSubValues(SbVec2i32, SbVec2i32, Int16)
Public methodSetSubValues(SbVec2i32, SbVec2i32, Int32)
Public methodSetSubValues(SbVec2i32, SbVec2i32, SByte)
Public methodSetSubValues(SbVec2i32, SbVec2i32, Single)
Public methodSetSubValues(SbVec2i32, SbVec2i32, UInt16)
Public methodSetSubValues(SbVec2i32, SbVec2i32, UInt32)
Public methodSetSubValues(SbVec2s, SbVec2s, Byte)
Public methodSetSubValues(SbVec2s, SbVec2s, Int16)
Public methodSetSubValues(SbVec2s, SbVec2s, Int32)
Public methodSetSubValues(SbVec2s, SbVec2s, SByte)
Public methodSetSubValues(SbVec2s, SbVec2s, Single)
Public methodSetSubValues(SbVec2s, SbVec2s, UInt16)
Public methodSetSubValues(SbVec2s, SbVec2s, UInt32)
Public methodSetValue(SbVec2i32, Int32, Byte)
Calls SetValue(size, nc, bytes, OIV.Inventor.Fields.SoSFImage.CopyPolicies( .SoSFImage.COPY )).
Public methodSetValue(SbVec2s, Int32, Byte)
Calls SetValue(size, nc, bytes, OIV.Inventor.Fields.SoSFImage.CopyPolicies( .SoSFImage.COPY )).
Public methodSetValue(SbVec2i32, Int32, SoSFImageDataTypes, SoBufferObject)
Calls SetValue(size, nc, dataType, bufferObject, OIV.Inventor.Fields.SoSFImage.CopyPolicies( .SoSFImage.COPY )).
Public methodSetValue(SbVec2i32, Int32, Byte, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2i32, Int32, Int16, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2i32, Int32, Int32, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2i32, Int32, SByte, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2i32, Int32, Single, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2i32, Int32, UInt16, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2i32, Int32, UInt32, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2s, Int32, SoSFImageDataTypes, SoBufferObject)
Calls SetValue(size, nc, dataType, bufferObject, OIV.Inventor.Fields.SoSFImage.CopyPolicies( .SoSFImage.COPY )).
Public methodSetValue(SbVec2s, Int32, Byte, SoSFImageCopyPolicies)

Same as above.

Public methodSetValue(SbVec2s, Int32, Int16, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2s, Int32, Int32, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2s, Int32, SByte, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2s, Int32, Single, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2s, Int32, UInt16, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2s, Int32, UInt32, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2i32, Int32, SoSFImageDataTypes, SoBufferObject, SoSFImageCopyPolicies)
Public methodSetValue(SbVec2s, Int32, SoSFImageDataTypes, SoBufferObject, SoSFImageCopyPolicies)
Public methodStartEditing(SbVec2i32, Int32, SoSFImageDataTypes)

Public methodStartEditing(SbVec2s, Int32, SoSFImageDataTypes)

This method (along with OIV.Inventor.Fields.SoSFImage.FinishEditing()) can be used to efficiently edit the values in an image field.

Public methodToRasterImage
Calls ToRasterImage(true).
Public methodToRasterImage(Boolean)

Returns an instance of OIV.Inventor.Image.SbRasterImage filled with the content of this field.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTouch

Simulates a change to the field, causing attached sensors to fire, connected fields and engines to be marked as needing evaluation, and so forth.

(Inherited from SoField.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Public operatorStatic memberInequality
Top
Remarks

A field containing a two-dimensional image. Images can be grayscale (intensity), grayscale with transparency information, RGB, or RGB with transparency. Each component of the image (intensity, red, green, blue or transparency (alpha)) can have an unsigned one-byte value from 0 to 255.

Values are returned as arrays of unsigned chars. The image is stored in this array starting at the bottom left corner of the image with the intensity or red component of that pixel, followed by either the alpha, the green and blue, or the green, blue and alpha components (depending on the number of components in the image). The next value is the first component of the next pixel to the right.

SoSFImages are written to file as three integers representing the width, height and number of components in the image, followed by width*height hexadecimal values representing the pixels in the image, separated by whitespace. A one-component image will have one-byte hexadecimal values representing the intensity of the image. For example, 0xFF is full intensity, 0x00 is no intensity. A two-component image puts the intensity in the first (high) byte and the transparency in the second (low) byte. Pixels in a three-component image have the red component in the first (high) byte, followed by the green and blue components (so 0xFF0000 is red). Four-component images put the transparency byte after red/green/blue (so 0x0000FF80 is semi-transparent blue). Note: each pixel is actually read as a single unsigned number, so a 3-component pixel with value "0x0000FF" can also be written as "0xFF" or "255" (decimal).

For example,

   1 2 1 0xFF 0x00
is a 1 pixel wide by 2 pixel high grayscale image, with the bottom pixel white and the top pixel black. And:

   2 4 3 0xFF0000 0xFF00 0 0 0 0 0xFFFFFF 0xFFFF00
is a 2 pixel wide by 4 pixel high RGB image, with the bottom left pixel red, the bottom right pixel green, the two middle rows of pixels black, the top left pixel white, and the top right pixel yellow.

See Also