class
ChunkedImageData
ChunkedImageData holds chunks for ImageData objects. ImageData objects can be referenced, and swapped in/out of memory, to secondary storage. This is useful for very large images that cannot be stored in-memory. ImageData objects can be indexed in 1-,2- or 3D, and each ImageData chunk is cloned from a source ImageData object, at setup. Fields added to ImageData chunks after setup will only be added into that chunk, and is not recommended.
Properties
Property | Description |
Name | The name of the ChunkedImageData object. (Inherited from Object) |
Methods
Method | Description |
AddObserver | Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object) |
DeepCopy | Deep copies (with template) the data from another image. The source image must be fully unlocked before copying. |
GetClass | Get the name of the ChunkedImageData class. (Inherited from Object) |
GetTemplateXSize | The X dimension size of the template image used to create the chunks. |
GetTemplateYSize | The Y dimension size of the template image used to create the chunks. |
GetTemplateZSize | The Z dimension size of the template image used to create the chunks. |
GetTotalXSize | The total X dimension size of the full image. |
GetTotalYSize | The total Y dimension size of the full image. |
GetTotalZSize | The total Z dimension size of the full image. |
GetXSize | The number of image chunks in the X dimension. |
GetYSize | The number of image chunks in the Y dimension. |
GetZSize | The number of image chunks in the Z dimension. |
IsA | Returns true if ChunkedImageData is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
IsChunkLocked1D | Returns true if a chunk is locked. The method is thread-safe. |
IsChunkLocked2D | Returns true if a chunk is locked. The method is thread-safe. |
IsChunkLocked3D | Returns true if a chunk is locked. The method is thread-safe. |
IsNull | Returns true if the ChunkedImageData object is invalid. (Inherited from Object) |
IsSameObjectAs | Returns true if the ChunkedImageData object is valid. (Inherited from Object) |
LockChunk1D | Locks a chunk for editing, and returns an image object to the caller. Only one lock is allowed per chunk. Use IsChunkLocked to check if a chunk is locked before trying to lock it. If the Lock failed, because the chunk is already locked, null is returned. The method is thread-safe. |
LockChunk2D | Locks a chunk for editing, and returns an image object to the caller. Only one lock is allowed per chunk. Use IsChunkLocked to check if a chunk is locked before trying to lock it. If the Lock failed, because the chunk is already locked, null is returned. The method is thread-safe. |
LockChunk3D | Locks a chunk for editing, and returns an image object to the caller. Only one lock is allowed per chunk. Use IsChunkLocked to check if a chunk is locked before trying to lock it. If the Lock failed, because the chunk is already locked, null is returned. The method is thread-safe. |
NewCopy | Makes a new copy of the chunked image data This image must be fully unlocked before copying. |
NonNull | Returns true if the ChunkedImageData object is valid. (Inherited from Object) |
PrintInfo | Prints the content/info of the ChunkedImageData object to the log. (Inherited from Object) |
RemoveObserver | Removes a previously added observer object. (Inherited from Object) |
Reset | Clears all data from the image, and removes all data fields. The template image is kept, but can be replaced using SetTemplateImage before calling one of the SetXDSize methods. Any lock that was hold in the image is automatically released. |
Set1DSize | The number of image chunks in the X dimension. |
Set2DSize | The number of image chunks in the X and Y dimensions. |
Set3DSize | The number of image chunks in the X, Y and Z dimensions. |
SetTemplateImage | The template image to use as template for creating new chunks. The template image is cloned, it can be released after the setup. Note that SetTemplateImage must be called before allocating image chunks. |
UnlockChunk1D | Unlocks a previously referenced chunk. All references to the object should be released. The method is thread-safe. |
UnlockChunk2D | Unlocks a previously referenced chunk. All references to the object should be released. The method is thread-safe. |
UnlockChunk3D | Unlocks a previously referenced chunk. All references to the object should be released. The method is thread-safe. |
Static methods
Method | Description |
IsClassA | Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
SafeCast | SafeCast makes sure the input object is of a class that can be cast into spChunkedImageData, and if this is the case, returns the object cast into spChunkedImageData. (Inherited from Object) |
Properties details
Name
The name of the ChunkedImageData object. (Inherited from Object)
Syntax
SetName parameters
Type | Name | Min | Max | Description |
const char * | name | | | New name of the object. |
GetName return value
Type: spString
Syntax
SetName parameters
Type | Name | Min | Max | Description |
string | name | | | New name of the object. |
GetName return value
Type: string
Syntax
SetName parameters
Name | Type | Min | Max | Description |
name | str | | | New name of the object. |
GetName return value
Type: str
Methods details
AddObserver
Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
Observer | observer | | | Observer is the object that will receive events. |
Return value
Type: rid
Syntax
Parameters
Type | Name | Min | Max | Description |
Observer | observer | | | Observer is the object that will receive events. |
Return value
Type: int
Syntax
Parameters
Name | Type | Min | Max | Description |
observer | Observer | | | Observer is the object that will receive events. |
Return value
Type: int
DeepCopy
Deep copies (with template) the data from another image. The source image must be fully unlocked before copying.
Syntax
Parameters
Type | Name | Min | Max | Description |
ChunkedImageData | source | | | Source object. |
bool | copy_data | | | If set, duplicate the data kept in the source image data object. |
Syntax
Parameters
Type | Name | Min | Max | Description |
ChunkedImageData | source | | | Source object. |
bool | copy_data | | | If set, duplicate the data kept in the source image data object. |
Syntax
Parameters
Name | Type | Min | Max | Description |
source | ChunkedImageData | | | Source object. |
copy_data | bool | | | If set, duplicate the data kept in the source image data object. |
GetClass
Get the name of the ChunkedImageData class. (Inherited from Object)
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: spString
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: string
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: str
GetTemplateXSize
The X dimension size of the template image used to create the chunks.
Syntax
Parameters
GetTemplateXSize takes no parameters.
Return value
Type: unsigned int
Syntax
Parameters
GetTemplateXSize takes no parameters.
Return value
Type: uint
Syntax
Parameters
GetTemplateXSize takes no parameters.
Return value
Type: int
GetTemplateYSize
The Y dimension size of the template image used to create the chunks.
Syntax
Parameters
GetTemplateYSize takes no parameters.
Return value
Type: unsigned int
Syntax
Parameters
GetTemplateYSize takes no parameters.
Return value
Type: uint
Syntax
Parameters
GetTemplateYSize takes no parameters.
Return value
Type: int
GetTemplateZSize
The Z dimension size of the template image used to create the chunks.
Syntax
Parameters
GetTemplateZSize takes no parameters.
Return value
Type: unsigned int
Syntax
Parameters
GetTemplateZSize takes no parameters.
Return value
Type: uint
Syntax
Parameters
GetTemplateZSize takes no parameters.
Return value
Type: int
GetTotalXSize
The total X dimension size of the full image.
Syntax
Parameters
GetTotalXSize takes no parameters.
Return value
Type: unsigned int
Syntax
Parameters
GetTotalXSize takes no parameters.
Return value
Type: uint
Syntax
Parameters
GetTotalXSize takes no parameters.
Return value
Type: int
GetTotalYSize
The total Y dimension size of the full image.
Syntax
Parameters
GetTotalYSize takes no parameters.
Return value
Type: unsigned int
Syntax
Parameters
GetTotalYSize takes no parameters.
Return value
Type: uint
Syntax
Parameters
GetTotalYSize takes no parameters.
Return value
Type: int
GetTotalZSize
The total Z dimension size of the full image.
Syntax
Parameters
GetTotalZSize takes no parameters.
Return value
Type: unsigned int
Syntax
Parameters
GetTotalZSize takes no parameters.
Return value
Type: uint
Syntax
Parameters
GetTotalZSize takes no parameters.
Return value
Type: int
GetXSize
The number of image chunks in the X dimension.
Syntax
Parameters
GetXSize takes no parameters.
Return value
Type: unsigned int
Syntax
Parameters
GetXSize takes no parameters.
Return value
Type: uint
Syntax
Parameters
GetXSize takes no parameters.
Return value
Type: int
GetYSize
The number of image chunks in the Y dimension.
Syntax
Parameters
GetYSize takes no parameters.
Return value
Type: unsigned int
Syntax
Parameters
GetYSize takes no parameters.
Return value
Type: uint
Syntax
Parameters
GetYSize takes no parameters.
Return value
Type: int
GetZSize
The number of image chunks in the Z dimension.
Syntax
Parameters
GetZSize takes no parameters.
Return value
Type: unsigned int
Syntax
Parameters
GetZSize takes no parameters.
Return value
Type: uint
Syntax
Parameters
GetZSize takes no parameters.
Return value
Type: int
IsA
Returns true if ChunkedImageData is a or is a descendant of the class named as the type parameter. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
const char * | type | | | Name of the class to check if ChunkedImageData is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
string | type | | | Name of the class to check if ChunkedImageData is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
type | str | | | Name of the class to check if ChunkedImageData is, or is a descendant of. |
Return value
Type: bool
IsChunkLocked1D
Returns true if a chunk is locked. The method is thread-safe.
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | x | | | X coordinate of the chunk. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
int | x | | | X coordinate of the chunk. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
x | int | | | X coordinate of the chunk. |
Return value
Type: bool
IsChunkLocked2D
Returns true if a chunk is locked. The method is thread-safe.
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | x | | | X coordinate of the chunk. |
rid | y | | | Y coordinate of the chunk. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
int | x | | | X coordinate of the chunk. |
int | y | | | Y coordinate of the chunk. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
x | int | | | X coordinate of the chunk. |
y | int | | | Y coordinate of the chunk. |
Return value
Type: bool
IsChunkLocked3D
Returns true if a chunk is locked. The method is thread-safe.
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | x | | | X coordinate of the chunk. |
rid | y | | | Y coordinate of the chunk. |
rid | z | | | Z coordinate of the chunk. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
int | x | | | X coordinate of the chunk. |
int | y | | | Y coordinate of the chunk. |
int | z | | | Z coordinate of the chunk. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
x | int | | | X coordinate of the chunk. |
y | int | | | Y coordinate of the chunk. |
z | int | | | Z coordinate of the chunk. |
Return value
Type: bool
IsNull
Returns true if the ChunkedImageData object is invalid. (Inherited from Object)
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
IsSameObjectAs
Returns true if the ChunkedImageData object is valid. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to compare with. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to compare with. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
object | Object | | | Object to compare with. |
Return value
Type: bool
LockChunk1D
Locks a chunk for editing, and returns an image object to the caller. Only one lock is allowed per chunk. Use IsChunkLocked to check if a chunk is locked before trying to lock it. If the Lock failed, because the chunk is already locked, null is returned. The method is thread-safe.
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | x | | | X coordinate of the chunk. |
Return value
Type: ImageData
Syntax
Parameters
Type | Name | Min | Max | Description |
int | x | | | X coordinate of the chunk. |
Return value
Type: ImageData
Syntax
Parameters
Name | Type | Min | Max | Description |
x | int | | | X coordinate of the chunk. |
Return value
Type: ImageData
LockChunk2D
Locks a chunk for editing, and returns an image object to the caller. Only one lock is allowed per chunk. Use IsChunkLocked to check if a chunk is locked before trying to lock it. If the Lock failed, because the chunk is already locked, null is returned. The method is thread-safe.
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | x | | | X coordinate of the chunk. |
rid | y | | | Y coordinate of the chunk. |
Return value
Type: ImageData
Syntax
Parameters
Type | Name | Min | Max | Description |
int | x | | | X coordinate of the chunk. |
int | y | | | Y coordinate of the chunk. |
Return value
Type: ImageData
Syntax
Parameters
Name | Type | Min | Max | Description |
x | int | | | X coordinate of the chunk. |
y | int | | | Y coordinate of the chunk. |
Return value
Type: ImageData
LockChunk3D
Locks a chunk for editing, and returns an image object to the caller. Only one lock is allowed per chunk. Use IsChunkLocked to check if a chunk is locked before trying to lock it. If the Lock failed, because the chunk is already locked, null is returned. The method is thread-safe.
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | x | | | X coordinate of the chunk. |
rid | y | | | Y coordinate of the chunk. |
rid | z | | | Z coordinate of the chunk. |
Return value
Type: ImageData
Syntax
Parameters
Type | Name | Min | Max | Description |
int | x | | | X coordinate of the chunk. |
int | y | | | Y coordinate of the chunk. |
int | z | | | Z coordinate of the chunk. |
Return value
Type: ImageData
Syntax
Parameters
Name | Type | Min | Max | Description |
x | int | | | X coordinate of the chunk. |
y | int | | | Y coordinate of the chunk. |
z | int | | | Z coordinate of the chunk. |
Return value
Type: ImageData
NewCopy
Makes a new copy of the chunked image data This image must be fully unlocked before copying.
Syntax
Parameters
Type | Name | Min | Max | Description |
bool | copy_data | | | If set, duplicate the data kept in the image data object. |
Return value
Type: ChunkedImageData
Syntax
Parameters
Type | Name | Min | Max | Description |
bool | copy_data | | | If set, duplicate the data kept in the image data object. |
Return value
Type: ChunkedImageData
Syntax
Parameters
Name | Type | Min | Max | Description |
copy_data | bool | | | If set, duplicate the data kept in the image data object. |
Return value
Type: ChunkedImageData
NonNull
Returns true if the ChunkedImageData object is valid. (Inherited from Object)
Syntax
Parameters
NonNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
NonNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
NonNull takes no parameters.
Return value
Type: bool
PrintInfo
Prints the content/info of the ChunkedImageData object to the log. (Inherited from Object)
Syntax
Parameters
PrintInfo takes no parameters.
Syntax
Parameters
PrintInfo takes no parameters.
Syntax
Parameters
PrintInfo takes no parameters.
RemoveObserver
Removes a previously added observer object. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | observerId | | | ObserverId is the id returned by AddObserver when the observer was added. |
Syntax
Parameters
Type | Name | Min | Max | Description |
int | observerId | | | ObserverId is the id returned by AddObserver when the observer was added. |
Syntax
Parameters
Name | Type | Min | Max | Description |
observerId | int | | | ObserverId is the id returned by AddObserver when the observer was added. |
Reset
Clears all data from the image, and removes all data fields. The template image is kept, but can be replaced using SetTemplateImage before calling one of the SetXDSize methods. Any lock that was hold in the image is automatically released.
Syntax
Parameters
Reset takes no parameters.
Syntax
Parameters
Reset takes no parameters.
Syntax
Parameters
Reset takes no parameters.
Set1DSize
The number of image chunks in the X dimension.
Syntax
Parameters
Type | Name | Min | Max | Description |
unsigned int | _xs | | | The desired number of chunks in the X dimension. |
Syntax
Parameters
Type | Name | Min | Max | Description |
uint | _xs | | | The desired number of chunks in the X dimension. |
Syntax
Parameters
Name | Type | Min | Max | Description |
_xs | int | | | The desired number of chunks in the X dimension. |
Set2DSize
The number of image chunks in the X and Y dimensions.
Syntax
Parameters
Type | Name | Min | Max | Description |
unsigned int | _xs | | | The desired number of chunks in the X dimension. |
unsigned int | _ys | | | The desired number of chunks in the X dimension. |
Syntax
Parameters
Type | Name | Min | Max | Description |
uint | _xs | | | The desired number of chunks in the X dimension. |
uint | _ys | | | The desired number of chunks in the X dimension. |
Syntax
Parameters
Name | Type | Min | Max | Description |
_xs | int | | | The desired number of chunks in the X dimension. |
_ys | int | | | The desired number of chunks in the X dimension. |
Set3DSize
The number of image chunks in the X, Y and Z dimensions.
Syntax
Parameters
Type | Name | Min | Max | Description |
unsigned int | _xs | | | The desired number of chunks in the X dimension. |
unsigned int | _ys | | | The desired number of chunks in the X dimension. |
unsigned int | _zs | | | The desired number of chunks in the X dimension. |
Syntax
Parameters
Type | Name | Min | Max | Description |
uint | _xs | | | The desired number of chunks in the X dimension. |
uint | _ys | | | The desired number of chunks in the X dimension. |
uint | _zs | | | The desired number of chunks in the X dimension. |
Syntax
Parameters
Name | Type | Min | Max | Description |
_xs | int | | | The desired number of chunks in the X dimension. |
_ys | int | | | The desired number of chunks in the X dimension. |
_zs | int | | | The desired number of chunks in the X dimension. |
SetTemplateImage
The template image to use as template for creating new chunks. The template image is cloned, it can be released after the setup. Note that SetTemplateImage must be called before allocating image chunks.
Syntax
Parameters
Type | Name | Min | Max | Description |
ImageData | _template | | | The template image object. |
Syntax
Parameters
Type | Name | Min | Max | Description |
ImageData | _template | | | The template image object. |
Syntax
Parameters
Name | Type | Min | Max | Description |
_template | ImageData | | | The template image object. |
UnlockChunk1D
Unlocks a previously referenced chunk. All references to the object should be released. The method is thread-safe.
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | x | | | X coordinate of the chunk. |
Syntax
Parameters
Type | Name | Min | Max | Description |
int | x | | | X coordinate of the chunk. |
Syntax
Parameters
Name | Type | Min | Max | Description |
x | int | | | X coordinate of the chunk. |
UnlockChunk2D
Unlocks a previously referenced chunk. All references to the object should be released. The method is thread-safe.
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | x | | | X coordinate of the chunk. |
rid | y | | | Y coordinate of the chunk. |
Syntax
Parameters
Type | Name | Min | Max | Description |
int | x | | | X coordinate of the chunk. |
int | y | | | Y coordinate of the chunk. |
Syntax
Parameters
Name | Type | Min | Max | Description |
x | int | | | X coordinate of the chunk. |
y | int | | | Y coordinate of the chunk. |
UnlockChunk3D
Unlocks a previously referenced chunk. All references to the object should be released. The method is thread-safe.
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | x | | | X coordinate of the chunk. |
rid | y | | | Y coordinate of the chunk. |
rid | z | | | Z coordinate of the chunk. |
Syntax
Parameters
Type | Name | Min | Max | Description |
int | x | | | X coordinate of the chunk. |
int | y | | | Y coordinate of the chunk. |
int | z | | | Z coordinate of the chunk. |
Syntax
Parameters
Name | Type | Min | Max | Description |
x | int | | | X coordinate of the chunk. |
y | int | | | Y coordinate of the chunk. |
z | int | | | Z coordinate of the chunk. |
Static methods details
IsClassA
Returns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
const char * | type | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
string | type | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
type | str | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
SafeCast
SafeCast makes sure the input object is of a class that can be cast into spChunkedImageData, and if this is the case, returns the object cast into spChunkedImageData. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to cast. |
Return value
Type: ChunkedImageData
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to cast. |
Return value
Type: ChunkedImageData
Syntax
Parameters
Name | Type | Min | Max | Description |
object | Object | | | Object to cast. |
Return value
Type: ChunkedImageData