OpenCMISS-Zinc C++ API Documentation
|
An image-based field giving the pixel colour/intensity values. More...
#include <fieldimage.hpp>
Public Types | |
enum | CombineMode { COMBINE_MODE_INVALID = CMZN_FIELD_IMAGE_COMBINE_MODE_INVALID, COMBINE_MODE_BLEND = CMZN_FIELD_IMAGE_COMBINE_MODE_BLEND, COMBINE_MODE_DECAL = CMZN_FIELD_IMAGE_COMBINE_MODE_DECAL, COMBINE_MODE_MODULATE = CMZN_FIELD_IMAGE_COMBINE_MODE_MODULATE, COMBINE_MODE_ADD = CMZN_FIELD_IMAGE_COMBINE_MODE_ADD, COMBINE_MODE_ADD_SIGNED = CMZN_FIELD_IMAGE_COMBINE_MODE_ADD_SIGNED, COMBINE_MODE_MODULATE_SCALE_4 = CMZN_FIELD_IMAGE_COMBINE_MODE_MODULATE_SCALE_4, COMBINE_MODE_BLEND_SCALE_4 = CMZN_FIELD_IMAGE_COMBINE_MODE_BLEND_SCALE_4, COMBINE_MODE_SUBTRACT = CMZN_FIELD_IMAGE_COMBINE_MODE_SUBTRACT, COMBINE_MODE_ADD_SCALE_4 = CMZN_FIELD_IMAGE_COMBINE_MODE_ADD_SCALE_4, COMBINE_MODE_SUBTRACT_SCALE_4 = CMZN_FIELD_IMAGE_COMBINE_MODE_SUBTRACT_SCALE_4, COMBINE_MODE_INVERT_ADD_SCALE_4 = CMZN_FIELD_IMAGE_COMBINE_MODE_INVERT_ADD_SCALE_4, COMBINE_MODE_INVERT_SUBTRACT_SCALE_4 = CMZN_FIELD_IMAGE_COMBINE_MODE_INVERT_SUBTRACT_SCALE_4 } |
enum | FilterMode { FILTER_MODE_INVALID = CMZN_FIELD_IMAGE_FILTER_MODE_INVALID, FILTER_MODE_NEAREST = CMZN_FIELD_IMAGE_FILTER_MODE_NEAREST, FILTER_MODE_LINEAR = CMZN_FIELD_IMAGE_FILTER_MODE_LINEAR, FILTER_MODE_NEAREST_MIPMAP_NEAREST = CMZN_FIELD_IMAGE_FILTER_MODE_NEAREST_MIPMAP_NEAREST, FILTER_MODE_LINEAR_MIPMAP_NEAREST = CMZN_FIELD_IMAGE_FILTER_MODE_LINEAR_MIPMAP_NEAREST, FILTER_MODE_LINEAR_MIPMAP_LINEAR = CMZN_FIELD_IMAGE_FILTER_MODE_LINEAR_MIPMAP_LINEAR } |
enum | HardwareCompressionMode { HARDWARE_COMPRESSION_MODE_INVALID = CMZN_FIELD_IMAGE_HARDWARE_COMPRESSION_MODE_INVALID, HARDWARE_COMPRESSION_MODE_UNCOMPRESSED = CMZN_FIELD_IMAGE_HARDWARE_COMPRESSION_MODE_UNCOMPRESSED, HARDWARE_COMPRESSION_MODE_AUTOMATIC = CMZN_FIELD_IMAGE_HARDWARE_COMPRESSION_MODE_AUTOMATIC } |
enum | WrapMode { WRAP_MODE_INVALID = CMZN_FIELD_IMAGE_WRAP_MODE_INVALID, WRAP_MODE_CLAMP = CMZN_FIELD_IMAGE_WRAP_MODE_CLAMP, WRAP_MODE_REPEAT = CMZN_FIELD_IMAGE_WRAP_MODE_REPEAT, WRAP_MODE_EDGE_CLAMP = CMZN_FIELD_IMAGE_WRAP_MODE_EDGE_CLAMP, WRAP_MODE_BORDER_CLAMP = CMZN_FIELD_IMAGE_WRAP_MODE_BORDER_CLAMP, WRAP_MODE_MIRROR_REPEAT = CMZN_FIELD_IMAGE_WRAP_MODE_MIRROR_REPEAT } |
![]() | |
enum | ChangeFlag { CHANGE_FLAG_NONE = CMZN_FIELD_CHANGE_FLAG_NONE, CHANGE_FLAG_ADD = CMZN_FIELD_CHANGE_FLAG_ADD, CHANGE_FLAG_REMOVE = CMZN_FIELD_CHANGE_FLAG_REMOVE, CHANGE_FLAG_IDENTIFIER = CMZN_FIELD_CHANGE_FLAG_IDENTIFIER, CHANGE_FLAG_DEFINITION = CMZN_FIELD_CHANGE_FLAG_DEFINITION, CHANGE_FLAG_FULL_RESULT = CMZN_FIELD_CHANGE_FLAG_FULL_RESULT, CHANGE_FLAG_PARTIAL_RESULT = CMZN_FIELD_CHANGE_FLAG_PARTIAL_RESULT, CHANGE_FLAG_RESULT = CMZN_FIELD_CHANGE_FLAG_RESULT, CHANGE_FLAG_FINAL = CMZN_FIELD_CHANGE_FLAG_FINAL } |
enum | CoordinateSystemType { COORDINATE_SYSTEM_TYPE_INVALID = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_INVALID, COORDINATE_SYSTEM_TYPE_RECTANGULAR_CARTESIAN = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_RECTANGULAR_CARTESIAN, COORDINATE_SYSTEM_TYPE_CYLINDRICAL_POLAR = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_CYLINDRICAL_POLAR, COORDINATE_SYSTEM_TYPE_SPHERICAL_POLAR = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_SPHERICAL_POLAR, COORDINATE_SYSTEM_TYPE_PROLATE_SPHEROIDAL = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_PROLATE_SPHEROIDAL, COORDINATE_SYSTEM_TYPE_OBLATE_SPHEROIDAL = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_OBLATE_SPHEROIDAL, COORDINATE_SYSTEM_TYPE_FIBRE = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_FIBRE } |
enum | DomainType { DOMAIN_TYPE_INVALID = CMZN_FIELD_DOMAIN_TYPE_INVALID, DOMAIN_TYPE_POINT = CMZN_FIELD_DOMAIN_TYPE_POINT, DOMAIN_TYPE_NODES = CMZN_FIELD_DOMAIN_TYPE_NODES, DOMAIN_TYPE_DATAPOINTS = CMZN_FIELD_DOMAIN_TYPE_DATAPOINTS, DOMAIN_TYPE_MESH1D = CMZN_FIELD_DOMAIN_TYPE_MESH1D, DOMAIN_TYPE_MESH2D = CMZN_FIELD_DOMAIN_TYPE_MESH2D, DOMAIN_TYPE_MESH3D = CMZN_FIELD_DOMAIN_TYPE_MESH3D, DOMAIN_TYPE_MESH_HIGHEST_DIMENSION = CMZN_FIELD_DOMAIN_TYPE_MESH_HIGHEST_DIMENSION } |
enum | ValueType { VALUE_TYPE_INVALID = CMZN_FIELD_VALUE_TYPE_INVALID, VALUE_TYPE_REAL = CMZN_FIELD_VALUE_TYPE_REAL, VALUE_TYPE_STRING = CMZN_FIELD_VALUE_TYPE_STRING, VALUE_TYPE_MESH_LOCATION = CMZN_FIELD_VALUE_TYPE_MESH_LOCATION } |
typedef int | ChangeFlags |
typedef int | DomainTypes |
Additional Inherited Members | |
![]() | |
cmzn_field_id | id |
An image-based field giving the pixel colour/intensity values.
An image-based field giving the pixel colour/intensity values as a function of its domain texture coordinates, interpolated between pixels according to the filter mode. 2-D and 3-D images are supported. Graphics materials can have image fields attached to perform texturing.
Describes the blending of the texture with the texture constant colour and the underlying material/fragment colour.
Ct = texture colour, Cf = material colour, Cv = colour produced At = texture alpha, Af = material alpha, alpha = colour produced
Enumerator | |
---|---|
COMBINE_MODE_INVALID |
Unspecified combine mode |
COMBINE_MODE_BLEND |
Blending the material and texture colour Cv = (1 - Ct) * Cf Av = At * Af |
COMBINE_MODE_DECAL |
Default combine mode, uses the image's alpha value to determine how the material colour is to combine with the texture colour. Material alpha value will be used as the resulting alpha. Cv = (1 - At) *Ct + At * C Av = Af |
COMBINE_MODE_MODULATE |
Colour will be the product of texture and material colour. Alpha will be the product of texture and material alph. Cv = Ct * Cf Av = At * Af |
COMBINE_MODE_ADD |
Colour will be the sum of texture and material colour. Alpha will be the sum of texture and material alph. Cv = Ct + Cf Av = At + Af |
COMBINE_MODE_ADD_SIGNED |
Add the value and subtract 0.5 so the texture value effectively ranges from -0.5 to 0.5 Cv = Ct + Cf - 0.5 Av = At + Af - 0.5 |
COMBINE_MODE_MODULATE_SCALE_4 |
Multiply and then scale by 4, so that we can scale down or up. Cv = (Ct * Cf) * 4 Av = At * Af |
COMBINE_MODE_BLEND_SCALE_4 |
Same as blend with a 4 * scaling Cv = ( (1 - Ct) * Cf ) * 4 Av = At * Af |
COMBINE_MODE_SUBTRACT |
Colour will be the difference of texture and material colour. Alpha will be the difference of texture and material alph. Cv = Ct - Cf Av = At - Af |
COMBINE_MODE_ADD_SCALE_4 |
Same as ADD with a 4 * scaling Cv = (Ct + Cf) * 4 Av = At + Af |
COMBINE_MODE_SUBTRACT_SCALE_4 |
Same as SUBTRACT with a 4 * scaling Cv = (Ct - Cf) * 4 Av = At - Af |
COMBINE_MODE_INVERT_ADD_SCALE_4 |
Texture colour will be added to 1 - material colour and then multiplied by 4. Cv = ((1 - Cf) + Ct) * 4 Av = Af + At |
COMBINE_MODE_INVERT_SUBTRACT_SCALE_4 |
Texture colour will be subtracted frim 1 - material colour then multiplied by 4. Cv = ((1 - Cf) - Ct) * 4 Av = Af - At |
Specifies how the graphics hardware rasterises the texture onto the screen, mainly its interpolation mode.
Whether the image is compressed when used for texturing.
Could add hardware/driver specific compression formats.
Describes how the image is to be wrapped when texture coordinate is assigned outside the range [0,1], you can choose to have them clamp or repeat.
|
inline |
Creates a stream information object for specifying files/resources and options for reading and writing image data to/from an image field.
|
inline |
Returns how the image is combined with the material: blend, decal or modulate.
|
inline |
Get the depth of the image.
|
inline |
Gets the domain field on which texture coordinates must be specified to evaluate the image.
|
inline |
Returns how the image is rasterised onto the screen.
|
inline |
Returns how the image is stored in graphics memory.
|
inline |
Get the height of the image.
|
inline |
Gets the property named in the given property string from the given field image. The returned string must be deallocated by the receiver.
image | The image field. |
property | The property to retrieve. |
|
inline |
Get the image size/resolution in pixels.
valuesCount | The size of the valuesOut array to fill, from 1 to 3. Values for dimensions beyond this size have the value of 1. |
valuesOut | Array to receive pixel sizes. |
|
inline |
Get the physical depth of the image.
|
inline |
Get the physical height of the image.
|
inline |
Gets the texture coordinate size to be used for this image field.
valuesCount | The size of the sizes array to fill. Up to 3 values can be requested corresponding to width, height, depth. |
valuesOut | Array to receive texture coordinate sizes. |
|
inline |
Get the physical width of the image.
|
inline |
Get the width of the image.
|
inline |
Returns the mode describing how the image is wrapped outside the range [0,1].
|
inline |
Reads image data into the field. The streaminformation may specify a filename, series of filenames or a memory block reference to read from. If the format specified in the streaminformation is a "raw" format (such as rgb or gray) which does not embed information about the pixel storage then the data size is expected to be supplied in the streaminformation parameter.
streaminformationImage | Derived information about the supplied formatted image data. At a minimum it should specify either a filename or a memory resource. |
|
inline |
Convenient function to read a file with the provided name into a field image directly.
fileName | name of the file to read from. |
|
inline |
Sets how the image is combined with the material: blend, decal or modulate.
combineMode | Enumerator describing how the image is combined with the material. |
|
inline |
Sets the domain field on which texture coordinates must be specified to evaluate the image.
domainField | The new domain field. Must be real-valued with at least as many components as the image dimension. |
|
inline |
Indicate to the graphics hardware how you would like the image rasterised onto the screen.
filterMode | Enumerator describing how the graphics hardware rasterises the texture onto the screen. |
|
inline |
Indicate to the graphics hardware how you would like the texture stored in graphics memory.
hardwareCompressionMode | Enumerator describing how the image is combined with the material. |
|
inline |
Set the image size/resolution in pixels. Images from source are recomputed when next used. Otherwise the contents of the buffer are unchanged if the new size matches the previous size, or undefined if different. For images from source: after successful call to this function the image field maintains an independent resolution from any source image; up until then it maintains the same resolution as the source image.
valuesCount | The size of the sizes array, giving the dimension of the image, from 1 to 3. |
valuesIn | The resolution to set for each dimension, all >= 1. |
|
inline |
Set the texture coordinate depth of the image.
depth | Positive physical depth to be set for the image. |
|
inline |
Set the texture coordinate height of the image.
height | Positive physical height to be set for the image. |
|
inline |
Sets the texture coordinate size to be used for this image field.
valuesCount | The size of the sizes array to fill. Up to 3 values can be set corresponding to width, height, depth. |
valuesIn | Array containing texture coordinate sizes. |
|
inline |
Set the texture coordinate width of the image.
width | Positive physical width to be set for the image. |
|
inline |
Set the mode describing how the image is wrapped outside the range [0,1].
wrapMode | Enumerator describing how image is wrapped outside the range [0,1]. |
|
inline |
Writes a formatted representation of the image data. The streaminformation is used to control the formatted output. If a memory block reference has been specified to the io_stream then this will be allocated and set and the corresponding memory block length set. Otherwise the routine will try to write to the filename set on the storage information. The routine should fail if the values specified in the streaminformation cannot be respected. If one or two of the size parameters are set on the streaminformation then other dimensions will be adjusted to maintain aspect ratio and then the image is resized just for this output.
streaminformationImage | Information specifying the required format for the returned formatted image data. |