SoSFImage Class |
Field containing a 2D image.
Namespace: OIV.Inventor.Fields
The SoSFImage type exposes the following members.
Name | Description | |
---|---|---|
AppendConnection(SoEngineOutput) | Appends this field to the list of connections from another engineOutput. | |
AppendConnection(SoField) | Appends this field to the list of connections from another field. | |
ConnectFrom(SoEngineOutput) | Connects this field from an engine output. | |
ConnectFrom(SoField) | Connects this field to another field. | |
CopyFrom | Copy from another field of same type. | |
Disconnect | Disconnect the field from whatever it was connected to. | |
Disconnect(SoEngineOutput) | Disconnect the field from the requested engineOutput. | |
Disconnect(SoField) | Disconnect the field from the requested field. | |
EnableConnection | Field connections may be enabled and disabled. | |
Equals | (Overrides SoFieldEquals(Object).) | |
FinishEditing | 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. | |
Get | Returns the value of the field in the Open Inventor file format, even if the field has its default value. | |
GetConnectedEngine | Returns true if this field is being written into by an engine, and returns the engine output it is connected to in engineOutput. | |
GetConnectedField | Returns true if this field is being written into by another field, and returns the field it is connected to in writingField. | |
GetConnections | Returns a list of the connections to this field. | |
GetContainer | Returns the object that contains this field. | |
GetForwardConnections | 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. | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetNumComponents | Returns image's number of components. | |
GetNumConnections | Returns the number of connections to this field. | |
GetSubTexture(Int32, SbVec2i32, SbVec2i32) | ||
GetSubTexture(Int32, SbVec2s, SbVec2s) | Same as above. | |
GetSubTexture(Int32, SbVec2i32, SbVec2i32, SoSFImageDataTypes) | ||
GetSubTexture(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. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetValue(SbVec2i32, Int32) | ||
GetValue(SbVec2s, Int32) | Same as above. | |
GetValue(SbVec2i32, Int32, SoSFImageDataTypes) | ||
GetValue(SbVec2s, Int32, SoSFImageDataTypes) | Returns the pixels in the image as an array of values of type <dataType>. | |
GetValueSize | Gets the size of the value. | |
HasSubTextures | Returns true if subTextures have been defined or false if none have been defined. | |
HasTransparency | Returns true if the image contains any transparent pixels. | |
IsConnected | Returns true if the field is connected to anything. | |
IsConnectedFromEngine | Returns true if the field is connected to an engine's output. | |
IsConnectedFromField | Returns true if the field is connected to another field. | |
IsConnectedFromVRMLInterp | Returns true if the field is connected to a VRML interpOutput. | |
IsConnectionEnabled | Returns false if connections to this field are disabled. | |
IsDefault | Gets the state of default flag of the field. | |
IsIgnored | Gets the ignore flag for this field. | |
IsNeverWrite | Queries the "neverWrite" flag. | |
Set | Sets the field to the given value, which is an ASCII string in the Open Inventor file format. | |
SetIgnored | Sets the ignore flag for this field. | |
SetNeverWrite | Sets the "neverWrite" flag. | |
SetSubValue(SbVec2i32, SbVec2i32, Int16) | ||
SetSubValue(SbVec2i32, SbVec2i32, Int32) | ||
SetSubValue(SbVec2i32, SbVec2i32, SByte) | ||
SetSubValue(SbVec2i32, SbVec2i32, Single) | ||
SetSubValue(SbVec2i32, SbVec2i32, UInt16) | ||
SetSubValue(SbVec2i32, SbVec2i32, UInt32) | ||
SetSubValue(SbVec2s, SbVec2s, Byte) | ||
SetSubValue(SbVec2s, SbVec2s, Int16) | ||
SetSubValue(SbVec2s, SbVec2s, Int32) | ||
SetSubValue(SbVec2s, SbVec2s, SByte) | ||
SetSubValue(SbVec2s, SbVec2s, Single) | ||
SetSubValue(SbVec2s, SbVec2s, UInt16) | ||
SetSubValue(SbVec2s, SbVec2s, UInt32) | ||
SetSubValues(SbVec2i32, SbVec2i32, Byte) | ||
SetSubValues(SbVec2i32, SbVec2i32, Int16) | ||
SetSubValues(SbVec2i32, SbVec2i32, Int32) | ||
SetSubValues(SbVec2i32, SbVec2i32, SByte) | ||
SetSubValues(SbVec2i32, SbVec2i32, Single) | ||
SetSubValues(SbVec2i32, SbVec2i32, UInt16) | ||
SetSubValues(SbVec2i32, SbVec2i32, UInt32) | ||
SetSubValues(SbVec2s, SbVec2s, Byte) | ||
SetSubValues(SbVec2s, SbVec2s, Int16) | ||
SetSubValues(SbVec2s, SbVec2s, Int32) | ||
SetSubValues(SbVec2s, SbVec2s, SByte) | ||
SetSubValues(SbVec2s, SbVec2s, Single) | ||
SetSubValues(SbVec2s, SbVec2s, UInt16) | ||
SetSubValues(SbVec2s, SbVec2s, UInt32) | ||
SetValue(SbVec2i32, Int32, Byte) | Calls SetValue(size, nc, bytes, OIV.Inventor.Fields.SoSFImage.CopyPolicies( .SoSFImage.COPY )). | |
SetValue(SbVec2s, Int32, Byte) | Calls SetValue(size, nc, bytes, OIV.Inventor.Fields.SoSFImage.CopyPolicies( .SoSFImage.COPY )). | |
SetValue(SbVec2i32, Int32, SoSFImageDataTypes, SoBufferObject) | Calls SetValue(size, nc, dataType, bufferObject, OIV.Inventor.Fields.SoSFImage.CopyPolicies( .SoSFImage.COPY )). | |
SetValue(SbVec2i32, Int32, Byte, SoSFImageCopyPolicies) | ||
SetValue(SbVec2i32, Int32, Int16, SoSFImageCopyPolicies) | ||
SetValue(SbVec2i32, Int32, Int32, SoSFImageCopyPolicies) | ||
SetValue(SbVec2i32, Int32, SByte, SoSFImageCopyPolicies) | ||
SetValue(SbVec2i32, Int32, Single, SoSFImageCopyPolicies) | ||
SetValue(SbVec2i32, Int32, UInt16, SoSFImageCopyPolicies) | ||
SetValue(SbVec2i32, Int32, UInt32, SoSFImageCopyPolicies) | ||
SetValue(SbVec2s, Int32, SoSFImageDataTypes, SoBufferObject) | Calls SetValue(size, nc, dataType, bufferObject, OIV.Inventor.Fields.SoSFImage.CopyPolicies( .SoSFImage.COPY )). | |
SetValue(SbVec2s, Int32, Byte, SoSFImageCopyPolicies) | Same as above. | |
SetValue(SbVec2s, Int32, Int16, SoSFImageCopyPolicies) | ||
SetValue(SbVec2s, Int32, Int32, SoSFImageCopyPolicies) | ||
SetValue(SbVec2s, Int32, SByte, SoSFImageCopyPolicies) | ||
SetValue(SbVec2s, Int32, Single, SoSFImageCopyPolicies) | ||
SetValue(SbVec2s, Int32, UInt16, SoSFImageCopyPolicies) | ||
SetValue(SbVec2s, Int32, UInt32, SoSFImageCopyPolicies) | ||
SetValue(SbVec2i32, Int32, SoSFImageDataTypes, SoBufferObject, SoSFImageCopyPolicies) | ||
SetValue(SbVec2s, Int32, SoSFImageDataTypes, SoBufferObject, SoSFImageCopyPolicies) | ||
StartEditing(SbVec2i32, Int32, SoSFImageDataTypes) | ||
StartEditing(SbVec2s, Int32, SoSFImageDataTypes) | This method (along with OIV.Inventor.Fields.SoSFImage.FinishEditing()) can be used to efficiently edit the values in an image field. | |
ToRasterImage | Calls ToRasterImage(true). | |
ToRasterImage(Boolean) | Returns an instance of OIV.Inventor.Image.SbRasterImage filled with the content of this field. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Touch | Simulates a change to the field, causing attached sensors to fire, connected fields and engines to be marked as needing evaluation, and so forth. |
Name | Description | |
---|---|---|
Equality | ||
Inequality |
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 0x00is 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 0xFFFF00is 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.