Simplygon C++ API  8.3.35800.0
SimplygonSDK::IImageDataImporter Class Referenceabstract

#include <SimplygonSDK.h>

Inheritance diagram for SimplygonSDK::IImageDataImporter:
SimplygonSDK::IObject

Public Member Functions

virtual void Clear ()=0
 
virtual unsigned int GetBitsPerPixel ()=0
 
virtual bool GetCapToPowerOfTwo ()=0
 
virtual const char * GetClass ()
 
virtual rstring GetExtensionOverride ()=0
 
virtual CountedPointer< IImageDataGetImage ()=0
 
virtual rid GetImageType ()=0
 
virtual rstring GetImportFilePath ()=0
 
virtual bool GetImportOnlyHeader ()=0
 
virtual unsigned int GetMaxHeight ()=0
 
virtual unsigned int GetMaxWidth ()=0
 
virtual unsigned int GetNumberOfChannels ()=0
 
virtual bool IsA (const char *type) const
 
virtual bool RunImport ()=0
 
virtual void SetCapToPowerOfTwo (bool value)=0
 
virtual void SetExtensionOverride (const char *value)=0
 
virtual void SetImportFilePath (const char *value)=0
 
virtual void SetImportOnlyHeader (bool value)=0
 
virtual void SetMaxHeight (unsigned int value)=0
 
virtual void SetMaxWidth (unsigned int value)=0
 
- Public Member Functions inherited from SimplygonSDK::IObject
virtual rid AddObserver (robserver *Observer, rid EventId)=0
 
virtual void AddRef ()=0
 
virtual rstring GetName ()=0
 
virtual void * GetUserComponentArea (rid userid)=0
 
virtual void PrintInfo ()=0
 
virtual void Release ()=0
 
virtual void RemoveObserver (rid ObserverId)=0
 
virtual void SetName (const char *Name)=0
 

Static Public Member Functions

static bool IsClassA (const char *type)
 
static IImageDataImporterSafeCast (IObject *ptr)
 
- Static Public Member Functions inherited from SimplygonSDK::IObject
static bool IsClassA (const char *type)
 
static IObjectSafeCast (IObject *ptr)
 

Detailed Description

Class for loading image data from different file formats.

Definition at line 15677 of file SimplygonSDK.h.

Member Function Documentation

◆ Clear()

virtual void SimplygonSDK::IImageDataImporter::Clear ( )
pure virtual

Close any open file or stream, release any allocated data.

◆ GetBitsPerPixel()

virtual unsigned int SimplygonSDK::IImageDataImporter::GetBitsPerPixel ( )
pure virtual

After RunImport(), returns the BitsPerPixel (8bpp-64bpp). If divided by NumberOfChannels, will give the number of bits per channel.

Returns
the current BitsPerPixel

◆ GetCapToPowerOfTwo()

virtual bool SimplygonSDK::IImageDataImporter::GetCapToPowerOfTwo ( )
pure virtual

Get CapToPowerOfTwo. If set, the width and height of the loaded image will be capped to the closest power of two below the size of the image.

Returns
the current CapToPowerOfTwo flag

◆ GetClass()

virtual const char* SimplygonSDK::IImageDataImporter::GetClass ( )
virtual

GetClass returns the name of the class of the object.

Returns
the name of the actual class of the object, as a const char string

Reimplemented from SimplygonSDK::IObject.

◆ GetExtensionOverride()

virtual rstring SimplygonSDK::IImageDataImporter::GetExtensionOverride ( )
pure virtual

Get the override file extension. This is specified including the dot, eg ".tga".

Returns
the current override file extension

◆ GetImage()

virtual CountedPointer<IImageData> SimplygonSDK::IImageDataImporter::GetImage ( )
pure virtual

Get the imported image data.

Returns
the imported image data

◆ GetImageType()

virtual rid SimplygonSDK::IImageDataImporter::GetImageType ( )
pure virtual

Get ImageType. Return the type of the image used. The supported formats are enumerated in the ImageFileType enumeration.

Returns
the current ImageType

◆ GetImportFilePath()

virtual rstring SimplygonSDK::IImageDataImporter::GetImportFilePath ( )
pure virtual

Get the main import file path. This must always be set.

Returns
the main import file path

◆ GetImportOnlyHeader()

virtual bool SimplygonSDK::IImageDataImporter::GetImportOnlyHeader ( )
pure virtual

Get ImportOnlyHeader. If set to true the call to RunImport() only gets header information from the image, and does not load the actual file into memory. MaxHeight, MaxWidth, BitsPerPixel, NumberOfChannels and ImageType will be set by call to RunImport().

Returns
the current ImportOnlyHeader value

◆ GetMaxHeight()

virtual unsigned int SimplygonSDK::IImageDataImporter::GetMaxHeight ( )
pure virtual

Get MaxHeight. If set to a value above 0, the image that is higher will be rescaled to MaxHeight.

Returns
the current MaxHeight

◆ GetMaxWidth()

virtual unsigned int SimplygonSDK::IImageDataImporter::GetMaxWidth ( )
pure virtual

Get MaxWidth. If set to a value above 0, the image that is wider will be rescaled to MaxWidth.

Returns
the current MaxWidth

◆ GetNumberOfChannels()

virtual unsigned int SimplygonSDK::IImageDataImporter::GetNumberOfChannels ( )
pure virtual

After RunImport(), returns the NumberOfChannels (1, 3, 4) in the source image.

Returns
the current NumberOfChannels

◆ IsA()

virtual bool SimplygonSDK::IImageDataImporter::IsA ( const char *  type) const
virtual

The IsA function returns true if the object is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the object is, or is a descendant of
Returns
true if the object is of the specified class, false if not

Reimplemented from SimplygonSDK::IObject.

◆ IsClassA()

static bool SimplygonSDK::IImageDataImporter::IsClassA ( const char *  type)
inlinestatic

The IsClassA function returns true if IImageDataImporter is a or is a descendant of the class named as the type parameter

Parameters
typeis the name of the class to check if the class is, or is a descendant of
Returns
true if the class is of the specified class, false if not

Definition at line 15698 of file SimplygonSDK.h.

◆ RunImport()

virtual bool SimplygonSDK::IImageDataImporter::RunImport ( )
pure virtual

Runs the import. Note that all parameters must be setup before importing.

◆ SafeCast()

static IImageDataImporter* SimplygonSDK::IImageDataImporter::SafeCast ( IObject ptr)
inlinestatic

SafeCast makes sure the pointer is of a class that can be cast into a IImageDataImporter pointer, and if this is possible, returns the cast pointer.

Parameters
ptris the pointer to be cast into a IImageDataImporter pointer
Returns
a pointer to the IImageDataImporter object, if the cast can be made, and a NULL pointer otherwise

Definition at line 15711 of file SimplygonSDK.h.

◆ SetCapToPowerOfTwo()

virtual void SimplygonSDK::IImageDataImporter::SetCapToPowerOfTwo ( bool  value)
pure virtual

Set CapToPowerOfTwo. If set, the width and height of the loaded image will be capped to the closest power of two below the size of the image.

Parameters
valuethe desired CapToPowerOfTwo flag

◆ SetExtensionOverride()

virtual void SimplygonSDK::IImageDataImporter::SetExtensionOverride ( const char *  value)
pure virtual

Set the override file extension. This is specified including the dot, eg ".tga"

Parameters
valuethe desired override file extension

◆ SetImportFilePath()

virtual void SimplygonSDK::IImageDataImporter::SetImportFilePath ( const char *  value)
pure virtual

Set the main import file path. This must always be set.

Parameters
valuethe desired main import file path

◆ SetImportOnlyHeader()

virtual void SimplygonSDK::IImageDataImporter::SetImportOnlyHeader ( bool  value)
pure virtual

Set ImportOnlyHeader. If set to true only gets header information from the image, and does not load the actual file into memory.

Parameters
valuethe desired ImportOnlyHeader value

◆ SetMaxHeight()

virtual void SimplygonSDK::IImageDataImporter::SetMaxHeight ( unsigned int  value)
pure virtual

Set MaxHeight. If set to a value above 0, the image that is higher will be rescaled to MaxHeight.

Parameters
valuethe desired MaxHeight

◆ SetMaxWidth()

virtual void SimplygonSDK::IImageDataImporter::SetMaxWidth ( unsigned int  value)
pure virtual

Set/Get MaxWidth. If set to a value above 0, the image that is wider will be rescaled to MaxWidth.

Parameters
valuethe desired MaxWidth

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