Raytrix Light Field SDK  v3.0
Logo
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Events Groups Pages
Rx::Net::Image Class Reference

Detailed Description

Image class.

This .NET image class is a container for holding a pointer pointing to image byte data. This class implements System::Xml::Serialization::IXmlSerializable interface and is therewith serializable to XML.

Inherits Rx::InteropNet::Runtime28::IImage, and IXmlSerializable.

Public Member Functions

 Image ()
 Default constructor. More...
 
 Image (System::Int32 iWidth, System::Int32 iHeight, InteropNet::Runtime28::EPixelType ePixelType, InteropNet::Runtime28::EDataType eDataType)
 Constructor. More...
 
 !Image ()
 Finalizer. More...
 
 ~Image ()
 Destructor. More...
 
ImageConvertType (InteropNet::Runtime28::EPixelType ePixelType, InteropNet::Runtime28::EDataType eDataType)
 
bool Create (int iWidth, int iHeight, EPixelType ePixelType, EDataType eDataType)
 Prepares memory. More...
 
virtual bool Create (System::Int32 iWidth, System::Int32 iHeight, Rx::InteropNet::Runtime28::EPixelType ePixelType, Rx::InteropNet::Runtime28::EDataType eDataType)
 Creates a new image and allocates memory necessary for given parameters. More...
 
virtual bool Create (Rx::Net::ImageFormat^ xFormat)
 Creates a new image and allocates memory necessary for given parameters. More...
 
virtual bool Destroy ()
 Destroys this image and frees all memory used. More...
 
virtual System::Int32 GetByteCount ()
 Get the number of bytes of the whole image. More...
 
virtual System::Int32 GetBytesPerPixel ()
 Gets the bytes per pixel. More...
 
virtual void * GetDataPtr ()
 Gets the data pointer. More...
 
virtual CRxImageGetNativeImage ()
 Gets the native CRxImage pointer More...
 
virtual System::Int32 GetPixelCount ()
 Get the number of pixels. More...
 
virtual
System::Xml::Schema::XmlSchema^ 
GetSchema ()
 Gets the schema. More...
 
virtual void GetSize (System::Int32^ %iWidth, System::Int32^ %iHeight)
 Get width and height of image. More...
 
virtual void GetType (Rx::InteropNet::Runtime28::EPixelType% ePixelType, Rx::InteropNet::Runtime28::EDataType% eDataType)
 Get pixel and data type of image. More...
 
bool IsOfType (Rx::InteropNet::Runtime28::EPixelType ePixelType, Rx::InteropNet::Runtime28::EDataType eDataType)
 Test whether image is of a particular pixel and data type. More...
 
bool Normalize ()
 Find minimal and maximal value of image and normalize image to range [0,1]. More...
 
virtual System::Void ReadXml (System::Xml::XmlReader^ xmlReader)
 Generates an image from its XML representation. More...
 
void SetZero ()
 
virtual System::Void WriteXml (System::Xml::XmlWriter^ xmlWriter)
 Converts this image into its XML representation. More...
 

Properties

Rx::InteropNet::Runtime28::EDataType DataType [get]
 Gets the type of the data. More...
 
Rx::Net::ImageFormat^  Format [get]
 Gets the format of this image. More...
 
System::Int32 Height [get]
 Gets the height of this image in pixels. More...
 
System::Boolean IsValid [get]
 Flags whether this image is valid or not. More...
 
Rx::InteropNet::Runtime28::EPixelType PixelType [get]
 Gets the type of the pixel. More...
 
System::Int32 Width [get]
 Gets the width of this image in pixels. More...
 

Constructor & Destructor Documentation

Rx::Net::Image::Image ( )

Default constructor.

Rx::Net::Image::Image ( System::Int32  iWidth,
System::Int32  iHeight,
InteropNet::Runtime28::EPixelType  ePixelType,
InteropNet::Runtime28::EDataType  eDataType 
)

Constructor.

Parameters
iWidthZero-based index of the width.
iHeightZero-based index of the height.
ePixelTypeType of the pixel.
eDataTypeType of the data.
Rx::Net::Image::~Image ( )

Destructor.

Rx::Net::Image::!Image ( )

Finalizer.

Member Function Documentation

Image ^ Rx::Net::Image::ConvertType ( InteropNet::Runtime28::EPixelType  ePixelType,
InteropNet::Runtime28::EDataType  eDataType 
)
bool Rx::InteropNet::Runtime28::IImage::Create ( int  iWidth,
int  iHeight,
EPixelType  ePixelType,
EDataType  eDataType 
)
inherited

Prepares memory.

Parameters
iWidthThe width.
iHeightThe height.
ePixelTypeIdentifier for the image type.
eDataTypeIdentifier for the data type.
Returns
True if it succeeds, false if it fails.
virtual bool Rx::Net::Image::Create ( System::Int32  iWidth,
System::Int32  iHeight,
Rx::InteropNet::Runtime28::EPixelType  ePixelType,
Rx::InteropNet::Runtime28::EDataType  eDataType 
)
virtual

Creates a new image and allocates memory necessary for given parameters.

If an image has been created before, the old image and all used memory is freed before creating the new image.

Parameters
iWidthZero-based index of the width.
iHeightZero-based index of the height.
ePixelTypeType of the image.
eDataTypeType of the data.
Returns
True if it succeeds, false if it fails.
virtual bool Rx::Net::Image::Create ( Rx::Net::ImageFormat xFormat)
virtual

Creates a new image and allocates memory necessary for given parameters.

If an image has been created before, the old image and all used memory is freed before creating the new image.

Parameters
xFormat[in,out] If non-null, describes the format to use.
Returns
True if it succeeds, false if it fails.
virtual bool Rx::Net::Image::Destroy ( )
virtual

Destroys this image and frees all memory used.

Returns
True if it succeeds, false if it fails.

Implements Rx::InteropNet::Runtime28::IImage.

virtual System::Int32 Rx::Net::Image::GetByteCount ( )
inlinevirtual

Get the number of bytes of the whole image.

virtual System::Int32 Rx::Net::Image::GetBytesPerPixel ( )
virtual

Gets the bytes per pixel.

Returns
The bytes per pixel.

Implements Rx::InteropNet::Runtime28::IImage.

virtual void* Rx::Net::Image::GetDataPtr ( )
virtual

Gets the data pointer.

Returns
null if it fails, else the data pointer.

Implements Rx::InteropNet::Runtime28::IImage.

virtual CRxImage* Rx::Net::Image::GetNativeImage ( )
virtual

Gets the native CRxImage pointer

Returns
null if it fails, else the data pointer.
virtual System::Int32 Rx::Net::Image::GetPixelCount ( )
inlinevirtual

Get the number of pixels.

virtual System::Xml::Schema::XmlSchema ^ Rx::Net::Image::GetSchema ( )
virtual

Gets the schema.

This method is reserved and should not be used. When implementing the IXmlSerializable interface, you should return null (Nothing in Visual Basic) from this method, and instead, if specifying a custom schema is required, apply the XmlSchemaProviderAttribute to the class.

Returns
nullptr.
virtual void Rx::Net::Image::GetSize ( System::Int32^ %  iWidth,
System::Int32^ %  iHeight 
)
inlinevirtual

Get width and height of image.

virtual void Rx::Net::Image::GetType ( Rx::InteropNet::Runtime28::EPixelType ePixelType,
Rx::InteropNet::Runtime28::EDataType eDataType 
)
inlinevirtual

Get pixel and data type of image.

bool Rx::Net::Image::IsOfType ( Rx::InteropNet::Runtime28::EPixelType  ePixelType,
Rx::InteropNet::Runtime28::EDataType  eDataType 
)
inline

Test whether image is of a particular pixel and data type.

bool Rx::Net::Image::Normalize ( )
inline

Find minimal and maximal value of image and normalize image to range [0,1].

Attention
Is currently only implemented for pixel type TPixel_L_f.
virtual System::Void Rx::Net::Image::ReadXml ( System::Xml::XmlReader^  xmlReader)
virtual

Generates an image from its XML representation.

Parameters
xmlReader[in,out] If non-null, the XML reader.
void Rx::Net::Image::SetZero ( )
inline
virtual System::Void Rx::Net::Image::WriteXml ( System::Xml::XmlWriter^  xmlWriter)
virtual

Converts this image into its XML representation.

Parameters
xmlWriter[in] The writer.

Property Documentation

Rx:: InteropNet:: Runtime28:: EDataType Rx::Net::Image::DataType
get

Gets the type of the data.

Rx:: Net:: ImageFormat^ Rx::Net::Image::Format
get

Gets the format of this image.

System:: Int32 Rx::Net::Image::Height
get

Gets the height of this image in pixels.

System:: Boolean Rx::Net::Image::IsValid
get

Flags whether this image is valid or not.

An image is valid if memory has been allocated.

Rx:: InteropNet:: Runtime28:: EPixelType Rx::Net::Image::PixelType
get

Gets the type of the pixel.

System:: Int32 Rx::Net::Image::Width
get

Gets the width of this image in pixels.