IOLink
IOL_v1.1.0_release
|
This factory is aimed at creating dataset views. More...
#include <iolink/view/ImageViewFactory.h>
Public Member Functions | |
ImageViewFactory (const ImageViewFactory &other)=delete | |
ImageViewFactory (ImageViewFactory &&other)=delete | |
ImageViewFactory & | operator= (const ImageViewFactory &other)=delete |
ImageViewFactory & | operator= (ImageViewFactory &&other)=delete |
Static Public Member Functions | |
static std::shared_ptr< ImageView > | allocate (const VectorXu64 &shape, DataType type, std::shared_ptr< ImageProperties > properties, std::shared_ptr< MetadataNode > metadata) |
Creates a memory image with the given shape and type. More... | |
static std::shared_ptr< ImageView > | allocate (const VectorXu64 &shape, DataType type) |
Creates a memory image with the given shape and type. More... | |
static std::shared_ptr< ImageView > | copyInMemory (std::shared_ptr< ImageView > image) |
Copy given image in memory. More... | |
static std::shared_ptr< ImageView > | createOnDisk (const std::string &dirPath, const VectorXu64 &shape, DataType type, std::shared_ptr< ImageProperties > properties, std::shared_ptr< MetadataNode > metadata) |
Create an image with the data stored into a temporary file (in given folder) on disk in raw. More... | |
static std::shared_ptr< ImageView > | createOnDisk (const std::string &dirPath, const VectorXu64 &shape, DataType type) |
Create an image with the data stored into a temporary file (in given folder) on disk in raw. More... | |
static std::shared_ptr< ImageView > | createOnDisk (const VectorXu64 &shape, DataType type, std::shared_ptr< ImageProperties > properties, std::shared_ptr< MetadataNode > metadata) |
Create an image with the data stored into a temporary file on disk in raw. More... | |
static std::shared_ptr< ImageView > | createOnDisk (const VectorXu64 &shape, DataType type) |
Create an image with the data stored into a temporary file on disk in raw. More... | |
static std::shared_ptr< ImageView > | copyOnDisk (std::shared_ptr< ImageView > image) |
Load an image data into a temporary raw file on disk. More... | |
static std::shared_ptr< ImageView > | copyOnDisk (std::shared_ptr< ImageView > image, const std::string &dirPath) |
Load an image data into a temporary raw file on disk. More... | |
static std::shared_ptr< ImageView > | fromBuffer (const VectorXu64 &shape, DataType type, void *buffer, size_t bufferSize, std::shared_ptr< ImageProperties > properties, const std::shared_ptr< MetadataNode > metadata) |
Creates an image from existing buffer. More... | |
static std::shared_ptr< ImageView > | fromBuffer (const VectorXu64 &shape, DataType type, void *buffer, size_t bufferSize) |
Creates an image from existing buffer. More... | |
static std::shared_ptr< ImageView > | fromRandomAccess (std::shared_ptr< RandomAccess > accessor, MemoryLayout layout, const VectorXu64 &shape, const DataType type, std::shared_ptr< ImageProperties > properties, const std::shared_ptr< const MetadataNode > metadata) |
Create an image from a RandomAccess. More... | |
static std::shared_ptr< ImageView > | fromRandomAccess (std::shared_ptr< RandomAccess > accessor, MemoryLayout layout, const VectorXu64 &shape, const DataType type) |
Create an image from a RandomAccess. More... | |
static std::shared_ptr< ImageView > | fromRandomAccess (std::shared_ptr< RandomAccess > accessor, const VectorXu64 &shape, const DataType type, std::shared_ptr< ImageProperties > properties, std::shared_ptr< const MetadataNode > metadata) |
Create an image from a given RandomAccess. More... | |
static std::shared_ptr< ImageView > | fromRandomAccess (std::shared_ptr< RandomAccess > accessor, const VectorXu64 &shape, const DataType type) |
Create an image from a given RandomAccess. More... | |
static std::shared_ptr< ImageView > | fromImageView (std::shared_ptr< ImageView > view, std::shared_ptr< const ImageProperties > properties, std::shared_ptr< const MetadataNode > metadata) |
Allows to apply specific properties and metadata to a ImageView without impact on originals. More... | |
static std::shared_ptr< ImageView > | uniform (const VectorXu64 &shape, DataType type, void *value, std::shared_ptr< ImageProperties > properties, std::shared_ptr< const MetadataNode > metadata) |
Create an image with uniform value. More... | |
static std::shared_ptr< ImageView > | uniform (const VectorXu64 &shape, DataType type, void *value) |
Create an image with uniform value. More... | |
static std::shared_ptr< ImageView > | adaptDynamicRange (std::shared_ptr< ImageView > view, DataType type, const Vector2d &inputRange, const Vector2d &outputRange) |
Creates an ImageView from another view with given type by mapping dynamic range. More... | |
static std::shared_ptr< ImageView > | adaptDataType (std::shared_ptr< ImageView > view, DataType type) |
Creates an ImageView from another view with given type. More... | |
static std::shared_ptr< ImageView > | extractChannel (std::shared_ptr< ImageView > view, size_t idxChannel) |
Returns an ImageView from another view containing only given channel Index (useful when channel is not clearly identified). More... | |
static std::shared_ptr< ImageView > | extractRegion (std::shared_ptr< ImageView > view, const RegionXu64 ®ion) |
Creates an ImageView of given region from given view. More... | |
static std::shared_ptr< ImageView > | extractAdjustedRegion (std::shared_ptr< ImageView > view, const RegionXu64 ®ion) |
Creates an ImageView of given region from given view, packing flat dimensions. More... | |
static std::shared_ptr< ImageView > | stack (std::shared_ptr< MultiImageView > view, ImageDimension newDimension) |
Creates an ImageView from a multiImageView by agglomerating frames into a new given dimension. More... | |
static std::shared_ptr< ImageView > | stack (std::shared_ptr< MultiImageView > view) |
Creates an ImageView from a multiImageView by agglomerating frames into a new unidentified dimension. More... | |
static std::shared_ptr< ImageView > | assembleChannels (std::shared_ptr< ImageView > image) |
Adapt a N dimensions scalar ImageView into a N-1 dimensions vectorial one. More... | |
static std::shared_ptr< ImageView > | disassembleChannels (std::shared_ptr< ImageView > image) |
Adapt a N dimensions vectorial ImageView into a N+1 dimensions scalar one. More... | |
static std::shared_ptr< ImageView > | interlace (std::shared_ptr< MultiImageView > multiView, ImageInterpretation newInterpretation, bool hasAlpha) |
Interlace frames of a MultiImageView into an ImageView. More... | |
static std::shared_ptr< ImageView > | interlace (std::shared_ptr< MultiImageView > multiView) |
Interlace frames of a MultiImageView into an ImageView. More... | |
static std::shared_ptr< ImageView > | reinterpret (std::shared_ptr< ImageView > image, ImageType newImageType) |
Reinterpret an ImageView with a new ImageTypeId. More... | |
static std::shared_ptr< ImageView > | reinterpretAxes (std::shared_ptr< ImageView > image, std::initializer_list< ImageDimension > dimensionsList) |
Reinterpret an ImageView by identifying each dimension (axis). More... | |
static std::shared_ptr< ImageView > | reinterpretAxes (std::shared_ptr< ImageView > image, const ImageDimension *dimensionsList, size_t count) |
Reinterpret an ImageView by identifying each dimension (axis). More... | |
static std::shared_ptr< ImageView > | subSample (std::shared_ptr< ImageView > image, size_t step) |
Create a sub-sampled imageView from original. More... | |
static std::shared_ptr< ImageView > | flip (std::shared_ptr< ImageView > image, ImageDimension dimension) |
Flip an ImageView following the given dimension. More... | |
static std::shared_ptr< ImageView > | flip (std::shared_ptr< ImageView > image, size_t dimensionIndex) |
Flip an ImageView following the given dimension. More... | |
static std::shared_ptr< ImageView > | makeThreadSafe (std::shared_ptr< ImageView > image) |
Make an ImageView threadsafe. More... | |
This factory is aimed at creating dataset views.
By default, ImageViews returned by this factory are not thread safe. Only makeThreadSafe method allows to apply threadsafety guarantee on an ImageView.
|
static |
Creates an ImageView from another view with given type.
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on original ImageView, and will be restricted to (see ImageCapability):
One or many adapters will be added if necessary to convert from input view type to output View type. Data will be mapped to full output type range. For example, if given view is 16 bits with valueRange [1000, 2000] and type is uint8, input range [1000, 2000] will be mapped to output range [0, 255].
Input data range are read from view properties. Output range is specified type standard range. It can be retrieved with DataType::standardRange(type).
view | The source image |
type | The target datatype |
InvalidArgument | If properties of input ImageView are not valid |
InvalidArgument | If type cardinality is different of original type |
InvalidArgument | If given type is not numeric |
Error | if Input view does not support READ or WRITE capability |
|
static |
Creates an ImageView from another view with given type by mapping dynamic range.
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on original ImageView, and will be restricted to (see ImageCapability):
This method will map [inputRange[0], inputRange[1]] -> [outputRange[0], outputRange[1]]
One or many adapters will be added if necessary to convert from input view type to output View type. Data will be mapped to full output type range. For example, if given view is 16 bits with valueRange [1000, 2000] and type is uint8 with input range [20, 50], input range [1000, 2000] will be mapped to output range [20, 50].
If input image contains value outside of given inputRange, these values will be linearly mapped outside of outputRange. For example, with [0, 1]->[0, 2], a value of -1 will be mapped to -2.
view | Input view |
type | Requested data type |
inputRange | Range of data in input view |
outputRange | Requested output range |
InvalidArgument | If properties of input ImageView are not valid |
InvalidArgument | If type cardinality is different of original type |
InvalidArgument | If given type is not numeric |
Error | if Input view does not support READ or WRITE capability |
|
static |
Creates a memory image with the given shape and type.
Memory is allocated by this operation.
Returned ImageView has following capabilities (see ImageCapability):
shape | The shape of the image (its dimension and sizes in all dimensions) |
type | The type of data contained in that view. |
|
static |
Creates a memory image with the given shape and type.
Memory is allocated by this operation.
Returned ImageView has following capabilities (see ImageCapability):
shape | The shape of the image (its dimension and sizes in all dimensions) |
type | The type of data contained in that view. |
properties | Properties to set to the allocated ImageView. If null, default properties are generated. |
metadata | Metadata to set to the allocated ImageView |
Error | If given properties are not compatible with given shape and type |
|
static |
Adapt a N dimensions scalar ImageView into a N-1 dimensions vectorial one.
No memory is allocated by this operation.
Capabilities of returned ImageView will be restricted to (see ImageCapability):
It packs the values of CHANNEL dimension (or the last dimension if does not exist) into one sample vector. The dimension of this vector will be the size of the last dimension of the source ImageView.
image | The source ImageView |
InvalidArgument | If properties of input ImageView are not valid |
Error | If original ImageView does not support READ capability |
|
static |
Copy given image in memory.
Memory is allocated by this operation. Data from original ImageView (if not in memory) are duplicated.
Returned ImageView has following capabilities (see ImageCapability):
If the input image already is in memory, return it (no copy are done).
image | Image to load |
InvalidArgument | If the source is null |
Error | If the input ImageView does not support READ capability |
InvalidArgument | If properties of input ImageView are not valid |
|
static |
Load an image data into a temporary raw file on disk.
The file is created in usual temporary directory and will be automatically deleted from disk when the instance of the returned ImageView is deleted.
Samples are copied chunk by chunk to optimize memory consumption. Maximum chunk size is 1MB.
No memory is allocated by this operation, only disk space is used.
Returned ImageView has following capabilities (see ImageCapability):
Original ImageView data are duplicated. Data from the returned ImageView are not linked to original ImageView.
If given image is already on disk, a copy will be created in spite of all.
image | ImageView to load on disk |
InvalidArgument | If properties of input ImageView are not valid |
|
static |
Load an image data into a temporary raw file on disk.
The file will be removed from disk when the instance of the returned ImageView is deleted.
Samples are copied chunk by chunk to optimize memory consumption. Maximum chunk size is 1MB.
No memory is allocated by this operation, only disk space is used.
Returned ImageView has following capabilities (see ImageCapability):
Original ImageView data are duplicated. Data from the returned ImageView are not linked to original ImageView.
If given image is already on disk, a copy will be created in spite of all.
image | ImageView to load on disk |
dirPath | path where temporary file is created (must exist) |
InvalidArgument | if given directory path does not exist |
InvalidArgument | If properties of input ImageView are not valid |
|
static |
Create an image with the data stored into a temporary file (in given folder) on disk in raw.
No memory is allocated by this operation, only disk space is used.
Returned ImageView has following capabilities (see ImageCapability):
The created file is automatically deleted when destroying the image.
dirPath | the path to the folder where the temporary file will be created |
shape | The shape of the image (its dimension and sizes in all dimensions) |
type | The type of data contained in that view. |
InvalidArgument | if given directory path does not exist |
|
static |
Create an image with the data stored into a temporary file (in given folder) on disk in raw.
No memory is allocated by this operation, only disk space is used.
Returned ImageView has following capabilities (see ImageCapability):
The created file is automatically deleted when destroying the image.
dirPath | the path to the folder where the temporary file will be created |
shape | The shape of the image (its dimension and sizes in all dimensions) |
type | The type of data contained in that view. |
properties | Properties to set to the allocated ImageView |
metadata | Metadata to set to the allocated ImageView |
Error | if given properties are not compatible with given shape and type |
InvalidArgument | if given directory path does not exist |
|
static |
Create an image with the data stored into a temporary file on disk in raw.
No memory is allocated by this operation, only disk space is used.
Returned ImageView has following capabilities (see ImageCapability):
The file is created in usual temporary directory and automatically deleted when destroying the image.
shape | The shape of the image (its dimension and sizes in all dimensions) |
type | The type of data contained in that view. |
|
static |
Create an image with the data stored into a temporary file on disk in raw.
No memory is allocated by this operation, only disk space is used.
Returned ImageView has following capabilities (see ImageCapability):
The file is created in usual temporary directory and automatically deleted when destroying the image.
shape | The shape of the image (its dimension and sizes in all dimensions) |
type | The type of data contained in that view. |
properties | Properties to set to the allocated ImageView |
metadata | Metadata to set to the allocated ImageView |
Error | if given properties are not compatible with given shape and type |
|
static |
Adapt a N dimensions vectorial ImageView into a N+1 dimensions scalar one.
No memory is allocated by this operation.
Capabilities of returned ImageView will be resctriced to (see ImageCapability):
It unpacks samples to generate a CHANNEL dimension for each component. This new dimension will have the size of the original sample size. (e.g. disassemble a RGBA 2D ImageView will result into a 3D ImageView with CHANNEL dimension size = 4)
image | The source ImageView |
InvalidArgument | If view already contains a CHANNEL dimension |
InvalidArgument | If properties of input ImageView are not valid |
Error | If original ImageView does not support READ capability |
|
static |
Creates an ImageView of given region from given view, packing flat dimensions.
Returned ImageView can potentially have a dimension count lesser than original one. It will depend on the required region. If one (or more) dimension of this region has its size equal to 1, this dimension will be skipped in returned ImageView.
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on original ImageView, and will be restricted to (see ImageCapability):
view | Original view on which we want to create a sub-region view |
region | Region of the original view that we want to isolate to create a new view |
Error | If input ImageView has nor READ or WRITE capability |
InvalidArgument | If properties of input ImageView are not valid |
InvalidArgument | If required region is empty |
|
static |
Returns an ImageView from another view containing only given channel Index (useful when channel is not clearly identified).
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on original ImageView, and will be restricted to (see ImageCapability):
view | Original view on which we want to isolate given channel |
idxChannel | Channel index between 0 and dataType dimension - 1 |
InvalidArgument | If requested channel index does not exist |
InvalidArgument | If properties of input ImageView are not valid |
Error | If input image does not support READ or WRITE capability |
|
static |
Creates an ImageView of given region from given view.
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on original ImageView, and will be restricted to (see ImageCapability):
view | Original view on which we want to create a sub-region view |
region | Region of the original view that we want to isolate to create a new view |
Error | If input ImageView has nor READ or WRITE capability |
InvalidArgument | If properties of input ImageView are not valid |
InvalidArgument | if required region is empty |
|
static |
Flip an ImageView following the given dimension.
No memory is allocated by this operation.
Capabilities of returned ImageView will be resctriced to (see ImageCapability):
image | ImageView to flip |
dimension | ImageDimension used for flipping |
Error | If input image does not support READ capability |
InvalidArgument | If image type is not known |
InvalidArgument | If properties of input ImageView are not valid |
InvalidArgument | If image does not contain given dimension |
|
static |
Flip an ImageView following the given dimension.
No memory is allocated by this operation.
Capabilities of returned ImageView will be resctriced to (see ImageCapability):
image | ImageView to flip |
dimensionIndex | Dimension index used for flipping |
Error | If input image does not support READ capability |
InvalidArgument | If properties of input ImageView are not valid |
InvalidArgument | if dimension count of given image is lesser than given dimension index |
|
static |
Creates an image from existing buffer.
No memory is allocated by this operation.
Returned ImageView has following capabilities (see ImageCapability):
shape | Shape of image |
type | Type of image |
buffer | User buffer. Should have at least a size of shape[0]*shape[1]*...*dataType.byteCount() buffer is not handled by this view and the user should carefully manage buffer and view lifetime. |
bufferSize | Size of the buffer in bytes. |
|
static |
Creates an image from existing buffer.
No memory is allocated by this operation.
Returned ImageView has following capabilities (see ImageCapability):
shape | Shape of image |
type | Type of image |
buffer | User buffer. Should have at least a size of shape[0]*shape[1]*...*dataType.byteCount() buffer is not handled by this view and the user should carefully manage buffer and view lifetime. |
bufferSize | Size of the buffer in bytes. |
properties | Properties of image. If null, image will build a default set of properties. |
metadata | Metadata of image. |
InvalidArgument | |
Error | If given properties are not compatible with given shape and type |
|
static |
Allows to apply specific properties and metadata to a ImageView without impact on originals.
No memory is allocated by this operation.
Returned ImageView has the same capabilities than original ImageView.
view | Input view |
properties | The new properties used by the returned image view. If null, the returned image view uses a clone of the input view properties. |
metadata | The new metadata used by the returned image view (can be null). |
Error | if given properties are not compatible with given shape and type |
|
static |
Create an image from a given RandomAccess.
No memory is allocated by this operation.
Returned ImageView has following capabilities (see ImageCapability):
Here the Memory layout is defaulted to Fortan.
accessor | The RandomAccess from which reading data |
shape | The shape of the image to create |
type | The data type of the image |
Error | if the storage cannot contain a raw image with given shape and datatype |
|
static |
Create an image from a given RandomAccess.
No memory is allocated by this operation.
Returned ImageView has following capabilities (see ImageCapability):
Here the Memory layout is defaulted to Fortan.
accessor | The RandomAccess from which reading data |
shape | The shape of the image to create |
type | The data type of the image |
properties | The properties to attach to the image. If null, default properties are generated. |
metadata | A set of metadata to attach to the image |
|
static |
Create an image from a RandomAccess.
No memory is allocated by this operation.
Returned ImageView has following capabilities (see ImageCapability):
accessor | The RandomAccess from which reading data |
layout | The memory layout to use |
shape | The shape of the image to create |
type | The data type of the image |
|
static |
Create an image from a RandomAccess.
No memory is allocated by this operation.
Returned ImageView has following capabilities (see ImageCapability):
accessor | The RandomAccess from which reading data |
layout | The memory layout to use |
shape | The shape of the image to create |
type | The data type of the image |
properties | The properties to attach to the image. If null, default properties are generated. |
metadata | A set of metadata to attach to the image |
Error | If given properties are not compatible with given shape and type |
|
static |
Interlace frames of a MultiImageView into an ImageView.
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on capabilities of ImageViews contained in the multiImageView, and be resctriced to (see ImageCapability):
Frames contained in MultiImageViews are assembled to create an ImageView whose samples are the concatenation of samples from original ImageViews. i.e. 3 grayscale ImageViews with UINT16 datatype contained in a multiImageView First ImageView contains ABCDEFG..... values Second ImageView contains abcdefg... values Third ImageView contains 123456.... values Interlace operation gives an ImageViews with VEC3UINT16 datatype whose content is: Aa1 Bb2 Cc3 Dd4 Ee5 Ff6 Gg7.....
Final interlaced ImageView will have Write access only if all original ImageViews (in multiImageView) have Write access
multiView | MultiImageView which contains ImageViews to interlace |
InvalidArgument | If multiImageView contains incompatible ImageViews (different shape or datatypes) |
InvalidArgument | If one frame from multiImageView contains a CHANNEL dimension |
InvalidArgument | If type of at least one frame is not scalar |
|
static |
Interlace frames of a MultiImageView into an ImageView.
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on capabilities of ImageViews contained in the multiImageView, and be resctriced to (see ImageCapability):
Frames contained in MultiImageViews are assembled to create an ImageView whose samples are the concatenation of samples from original ImageViews. i.e. 3 grayscale ImageViews with UINT16 datatype contained in a multiImageView First ImageView contains ABCDEFG..... values Second ImageView contains abcdefg... values Third ImageView contains 123456.... values Interlace operation gives an ImageViews with VEC3UINT16 datatype whose content is: Aa1 Bb2 Cc3 Dd4 Ee5 Ff6 Gg7.....
Final interlaced ImageView will have Write access only if all original ImageViews (in multiImageView) have Write access
multiView | MultiImageView which contains ImageViews to interlace |
newInterpretation | interpretation to set for the interlaced ImageView (default is UNKNOWN) |
hasAlpha | indicates if the interlaced ImageView contains an Alpha channel (default is FALSE) |
InvalidArgument | If multiImageView contains incompatible ImageViews (different shape or datatypes) |
InvalidArgument | If one frame from multiImageView contains a CHANNEL dimension |
InvalidArgument | If type of at least one frame is not scalar |
|
static |
Reinterpret an ImageView with a new ImageTypeId.
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on capabilities of input ImageView and be resctriced to (see ImageCapability):
It allows to modify the interpretation (VOLUME, IMAGE SEQUENCE, ...) of an any-dimension image. It does not change samples data reading, only image properties. When new interpretation is given, a quick check is done to verify compatibility with given ImageView. (number of dimensions should match with new interpretation)
Specific case: ImageType::UNKNOWN can be set for any given ImageView without error
image | ImageView whose interpretation must be changed |
newImageType | Image interpretation to apply to image |
InvalidArgument | If properties of input ImageView are not valid |
Error | If new imageType is not comparible with given ImageView |
|
static |
Reinterpret an ImageView by identifying each dimension (axis).
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on capabilities of input ImageView and be resctriced to (see ImageCapability):
image | ImageView to reinterpret |
dimensionsList | Ordered list of dimensions to affect to ImageView |
count | Number of elements in the given list |
Error | If dimensionsList size does not match with image dimension. |
InvalidArgument | If properties of input ImageView are not valid |
|
static |
Reinterpret an ImageView by identifying each dimension (axis).
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on capabilities of input ImageView and be resctriced to (see ImageCapability):
It allows to modify the interpretation (VOLUME, IMAGE SEQUENCE, ...) of an any-dimension image by directly affecting an interpretation to each dimension.
It can impact the way samples are read/written, because, according to given ImageDimension list, dimensions will be reordered to match IOLink canonical order (see ImageTypeId)
For example, an 3D ImageView with following list is given (ROW, SLICE, COLUMN). Dimensions will be relocated to match canonical order (COLUMN, ROW, SLICE).
If canonical order is already respected in given list, this will only affect the properties of the ImageView. A quick check is done to verify compatibility with given ImageView. (number of dimensions should match with the given list size). An exception is raised in case of incompatibility.
Warning: never insert a dimension more than once in given list, otherwise the behavior is unpredictable.
This method can be useful for ImageViews based on user memory data, with different dimensions order, and without original interpretation.
image | ImageView to reinterpret |
dimensionsList | ordered list of dimensions to affect to ImageView |
Error | If dimensionsList size does not match with image dimension. |
InvalidArgument | If properties of input ImageView are not valid |
|
static |
Creates an ImageView from a multiImageView by agglomerating frames into a new unidentified dimension.
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on original ImageViews contained in MultiImageView, and will be restricted to (see ImageCapability):
(i.e. a given multiImageView containing 2D ImageViews will give as result 3D ImageView - containing all the images) Concatenation of frames is possible only if their shapes and datatypes are equal. New dimension is always created in last position. e.g.: 3 frames with shapes (5, 6) will be stacked into an 3D Image with shape (5, 6, 3)
This method can be used with frames whose ImageType is not UNKNOWN, but as the new dimension is not given, the ImageType will be lost (UNKNOWN) in output ImageView.
view | MultiImage view which contains frames of same format and shape |
InvalidArgument | if all frames don't have same shape and datatype |
|
static |
Creates an ImageView from a multiImageView by agglomerating frames into a new given dimension.
No memory is allocated by this operation.
Capabilities of returned ImageView will depend on original ImageViews contained in MultiImageView, and will be restricted to (see ImageCapability):
(i.e. a given multiImageView containing 2D frames (with Imagetype = IMAGE) and a given dimension equal to SEQUENCE will give as result a IMAGE_SEQUENCE - video - containing all the images) Concatenation of frames is possible only if their shapes, datatypes and ImageTypes are equal.
A warning will be raised if given frames have an ImageType = UNKNOWN, because the given ImageDimension is ignored in this case, but the stack is still applied, and output ImageType will be UNKNOWN
view | MultiImage view which contains frames of same format and shape |
newDimension | interpretation of the new dimension to create |
InvalidArgument | if all frames don't have same shape and datatype |
InvalidArgument | if given new dimension already exist in given frames |
InvalidArgument | if all frames don't have the same interpretation of axes |
|
static |
Create a sub-sampled imageView from original.
No memory is allocated by this operation.
Capabilities of returned ImageView will be resctriced to (see ImageCapability):
image | ImageView to sub-sample |
step | level of sub-sampling to apply |
New ImageView is created by picking one sample for every step
samples of original ImageView. A step of 1 will give the same Image as the original
InvalidArgument | If properties of input ImageView are not valid |
InvalidArgument | If step is 0 or not compatible with ImageView shape |
Error | If input image does not support READ capability |
|
static |
Create an image with uniform value.
No memory is allocated by this operation.
Returned ImageView has following capabilities (see ImageCapability):
This image doesn't consume memory, so you can create an image as big as you want.
shape | The shape of the image (its dimension and sizes in all dimensions) |
type | The type of data contained in that view. |
value | Buffer should correspond to given DataType. If null is given, image is filled with zeros. |
|
static |
Create an image with uniform value.
No memory is allocated by this operation.
Returned ImageView has following capabilities (see ImageCapability):
This image doesn't consume memory, so you can create an image as big as you want.
shape | The shape of the image (its dimension and sizes in all dimensions) |
type | The type of data contained in that view. |
value | Buffer should correspond to given DataType. If null is given, image is filled with zeros. |
properties | Optional properties. If null, default properties are generated. |
metadata | Optional metadata. If null, no metadata are generated. |
InvalidArgument | If given properties are not compatible with given shape and type |