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.
Methods
Method | Description |
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. |
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. |
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. |
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. |
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. |
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. |
Methods details
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.
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.
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 |
rid | 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 |
rid | x | | | X coordinate of the chunk. |
rid | 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 |
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
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.
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
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 |
rid | 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 |
rid | x | | | X coordinate of the chunk. |
rid | 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 |
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
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
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 |
rid | 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 |
rid | x | | | X coordinate of the chunk. |
rid | 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 |
rid | x | | | X coordinate of the chunk. |
rid | y | | | Y coordinate of the chunk. |
rid | 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.
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.
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