OpenCMISS-Zinc C++ API Documentation
Public Types | Public Member Functions | List of all members
OpenCMISS::Zinc::StreaminformationImage Class Reference

An image-specific stream information object. More...

#include <streamimage.hpp>

Inheritance diagram for OpenCMISS::Zinc::StreaminformationImage:
OpenCMISS::Zinc::Streaminformation

Public Types

enum  Attribute { ATTRIBUTE_RAW_WIDTH_PIXELS = CMZN_STREAMINFORMATION_IMAGE_ATTRIBUTE_RAW_WIDTH_PIXELS, ATTRIBUTE_RAW_HEIGHT_PIXELS = CMZN_STREAMINFORMATION_IMAGE_ATTRIBUTE_RAW_HEIGHT_PIXELS, ATTRIBUTE_BITS_PER_COMPONENT = CMZN_STREAMINFORMATION_IMAGE_ATTRIBUTE_BITS_PER_COMPONENT, ATTRIBUTE_COMPRESSION_QUALITY = CMZN_STREAMINFORMATION_IMAGE_ATTRIBUTE_COMPRESSION_QUALITY }
 
enum  FileFormat {
  FILE_FORMAT_INVALID = CMZN_STREAMINFORMATION_IMAGE_FILE_FORMAT_INVALID, FILE_FORMAT_BMP = CMZN_STREAMINFORMATION_IMAGE_FILE_FORMAT_BMP, FILE_FORMAT_DICOM = CMZN_STREAMINFORMATION_IMAGE_FILE_FORMAT_DICOM, FILE_FORMAT_JPG = CMZN_STREAMINFORMATION_IMAGE_FILE_FORMAT_JPG,
  FILE_FORMAT_GIF = CMZN_STREAMINFORMATION_IMAGE_FILE_FORMAT_GIF, FILE_FORMAT_PNG = CMZN_STREAMINFORMATION_IMAGE_FILE_FORMAT_PNG, FILE_FORMAT_SGI = CMZN_STREAMINFORMATION_IMAGE_FILE_FORMAT_SGI, FILE_FORMAT_TIFF = CMZN_STREAMINFORMATION_IMAGE_FILE_FORMAT_TIFF,
  FILE_FORMAT_ANALYZE = CMZN_STREAMINFORMATION_IMAGE_FILE_FORMAT_ANALYZE, FILE_FORMAT_ANALYZE_OBJECT_MAP = CMZN_STREAMINFORMATION_IMAGE_FILE_FORMAT_ANALYZE_OBJECT_MAP
}
 
enum  PixelFormat {
  PIXEL_FORMAT_INVALID = CMZN_STREAMINFORMATION_IMAGE_PIXEL_FORMAT_INVALID, PIXEL_FORMAT_LUMINANCE = CMZN_STREAMINFORMATION_IMAGE_PIXEL_FORMAT_LUMINANCE, PIXEL_FORMAT_LUMINANCE_ALPHA = CMZN_STREAMINFORMATION_IMAGE_PIXEL_FORMAT_LUMINANCE_ALPHA, PIXEL_FORMAT_RGB = CMZN_STREAMINFORMATION_IMAGE_PIXEL_FORMAT_RGB,
  PIXEL_FORMAT_RGBA = CMZN_STREAMINFORMATION_IMAGE_PIXEL_FORMAT_RGBA, PIXEL_FORMAT_ABGR = CMZN_STREAMINFORMATION_IMAGE_PIXEL_FORMAT_ABGR, PIXEL_FORMAT_BGR = CMZN_STREAMINFORMATION_IMAGE_PIXEL_FORMAT_BGR
}
 
- Public Types inherited from OpenCMISS::Zinc::Streaminformation
enum  DataCompressionType {
  DATA_COMPRESSION_TYPE_INVALID = CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_INVALID, DATA_COMPRESSION_TYPE_DEFAULT = CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_DEFAULT, DATA_COMPRESSION_TYPE_NONE = CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_NONE, DATA_COMPRESSION_TYPE_GZIP = CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_GZIP,
  DATA_COMPRESSION_TYPE_BZ2 = CMZN_STREAMINFORMATION_DATA_COMPRESSION_TYPE_BZIP2
}
 

Public Member Functions

 StreaminformationImage (cmzn_streaminformation_image_id streaminformation_image_id)
 
bool isValid () const
 
cmzn_streaminformation_image_id getDerivedId () const
 
int setAttributeInteger (Attribute attribute, int value)
 
int setAttributeReal (Attribute attribute, double value)
 
int setFileFormat (FileFormat imageFileFormat)
 
int setPixelFormat (PixelFormat imagePixelFormat)
 
- Public Member Functions inherited from OpenCMISS::Zinc::Streaminformation
 Streaminformation (cmzn_streaminformation_id in_streaminformation_id)
 
 Streaminformation (const Streaminformation &streamInformation)
 
Streaminformationoperator= (const Streaminformation &streamInformation)
 
bool isValid () const
 
cmzn_streaminformation_id getId () const
 
StreamresourceFile createStreamresourceFile (const char *file_name)
 
StreamresourceMemory createStreamresourceMemory ()
 
StreamresourceMemory createStreamresourceMemoryBuffer (const void *buffer, unsigned int buffer_length)
 
StreamresourceMemory createStreamresourceMemoryBufferCopy (const void *buffer, unsigned int buffer_length)
 
enum DataCompressionType getResourceDataCompressionType (const Streamresource &resource)
 
int setResourceDataCompressionType (const Streamresource &resource, DataCompressionType dataCompressionType)
 
enum DataCompressionType getDataCompressionType ()
 
int setDataCompressionType (DataCompressionType dataCompressionType)
 
StreaminformationImage castImage ()
 
StreaminformationRegion castRegion ()
 
StreaminformationScene castScene ()
 

Additional Inherited Members

- Protected Attributes inherited from OpenCMISS::Zinc::Streaminformation
cmzn_streaminformation_id id
 

Detailed Description

An image-specific stream information object.

An image-specific stream information object, used to specify one or more image files/resources for an image field to read from or write to, with any attributes specified for them such as format, size etc.

See also
FieldImage::createStreaminformationImage

Member Enumeration Documentation

Enumeration of attributes that can be set by generic stream information image methods.

Enumerator
ATTRIBUTE_RAW_WIDTH_PIXELS 

Integer specifies the pixel width for binary data reading in using this stream information.

ATTRIBUTE_RAW_HEIGHT_PIXELS 

Integer specifies the pixel height for binary data reading in using this stream information.

ATTRIBUTE_BITS_PER_COMPONENT 

Integer specifies the number of bytes per component for binary data using this stream information. Only 8 and 16 bits are supported at the moment.

ATTRIBUTE_COMPRESSION_QUALITY 

Real number specifies the quality for binary data using this stream information. This parameter controls compression for compressed lossy formats, where a quality of 1.0 specifies the least lossy output for a given format and a quality of 0.0 specifies the most compression.

Describes the format for image storage.

See also
StreaminformationImage::setFileFormat
Enumerator
FILE_FORMAT_INVALID 

Unspecified image file format.

FILE_FORMAT_BMP 

Specify the file to be reading in or writing to as bitmap image.

FILE_FORMAT_DICOM 

Specify the file to be reading in or writing to as dicom image.

FILE_FORMAT_JPG 

Specify the file to be reading in or writing to as jpeg image.

FILE_FORMAT_GIF 

Specify the file to be reading in or writing to as gif image.

FILE_FORMAT_PNG 

Specify the file to be reading in or writing to as png image.

FILE_FORMAT_SGI 

Specify the file to be reading in or writing to as sgi image.

FILE_FORMAT_TIFF 

Specify the file to be reading in or writing to as tiff image.

FILE_FORMAT_ANALYZE 

Specify the file to be reading in or writing to as Analyze image.

FILE_FORMAT_ANALYZE_OBJECT_MAP 

Specify the file to be reading in or writing to as Analyze object map.

Optional information used to describe the binary data supplied to the images.

Enumerator
PIXEL_FORMAT_INVALID 

Unspecified image pixel format.

PIXEL_FORMAT_LUMINANCE 

Specify the binary data of image to be single component grey scale.

PIXEL_FORMAT_LUMINANCE_ALPHA 

Specify the binary data of image to be two components: grey scale and alpha.

PIXEL_FORMAT_RGB 

Specify the binary data of image to be three components: red, green and blue.

PIXEL_FORMAT_RGBA 

Specify the binary data of image to be four components: red, green, blue and alpha.

PIXEL_FORMAT_ABGR 

Specify the binary data of image to be four components: alpha, blue, green and red.

PIXEL_FORMAT_BGR 

Specify the binary data of image to be three components: blue, green and red.

Member Function Documentation

cmzn_streaminformation_image_id OpenCMISS::Zinc::StreaminformationImage::getDerivedId ( ) const
inline

Return the C handle of the derived StreaminformationImage object.

Returns
C handle of the derived StreaminformationImage if this objects is valid, 0 otherwise.
bool OpenCMISS::Zinc::StreaminformationImage::isValid ( ) const
inline

Check if this is a valid StreaminformationImage object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::StreaminformationImage::setAttributeInteger ( Attribute  attribute,
int  value 
)
inline

Set an integer or Boolean attribute of the streaminformation_image.

Parameters
attributeThe identifier of the integer attribute to set.
valueThe new value for the attribute. For Boolean values use 1 for true.
Returns
Status OpenCMISS::Zinc::OK if attribute successfully set, any other value if failed or attribute not valid or unable to be set for this streaminformation_image.
int OpenCMISS::Zinc::StreaminformationImage::setAttributeReal ( Attribute  attribute,
double  value 
)
inline

Set an double attribute of the streaminformation_image.

Parameters
attributeThe identifier of the double attribute to set.
valueThe new value for the attribute.
Returns
Status OpenCMISS::Zinc::OK if attribute successfully set, any other value if failed or attribute not valid or unable to be set for this streaminformation_image.
int OpenCMISS::Zinc::StreaminformationImage::setFileFormat ( FileFormat  imageFileFormat)
inline

Specifies the format for binary data to be read/written using this streaminformation.

Parameters
imageFileFormatThe image file format.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::StreaminformationImage::setPixelFormat ( PixelFormat  imagePixelFormat)
inline

Specifies the pixel format for binary data of the images to be read/written using this streaminformation.

Parameters
imagePixelFormatThe pixel_format of the formatted data.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.

The documentation for this class was generated from the following file: