Hi,
I’d like to give an answer to a question I repeatedly got and I failed to find a useful written answer.
Among the classes in the wrappers there are two classes that can easily be mixed up - to be fair they may not have the best names to distinguish them. So let me characterize those objects here.
ImagePlane
An ImagePlane
defines a two dimensional data set that is part of an image. It cannot exist without an image object. Images consist of one or more ImagePlane
s that all have the same dimension (width and height) but may have different data types. The memory described by an ImagePlane
may be scattered, that means that ImagePlane
s support variable x and y increments. Typical examples for ImagePlane
s are the red, green and blue channels of RGB image. ImagePlane
s do not own the memory they describe - the parent image of the plane does.
Plane
A Plane
is hyperplane that my have 1 to N dimensions (ranks). Plane
s must have linear memory layout with constant increments for each dimension. If not explicitly created as views, Plane
s always own the memory they describe. Typical examples for Plane
s are the X, Y and Z components of a point cloud.
Q & A
Can every ImagePlan
e be represented as Plane
?
Not generally. Plane
s only support contiguous and linear memory layouts, wherease ImagePlane
s may have variable increments. However, variable increments are rarely required and therefore most ImagePlane
s can effectively be represented as Plane
s. If you copy the ImagePlane
into linear memory first, then it can always be represented as Plan
e.
Can every Plane
be represented as ImagePlane
?
Not generally. ImagePlane
s must be 2D entities, whereas Plane
s can by hyper planes or even one dimensional data sets. One 3D Plane
(rank=3) can be used for representing a RGB8 image with linear memory layout. Note that it is of course also possible to describe every color channel with an extra plane that could also be represented as ImagePlan
e. However, Plane
s do not require an extra object to describe their relation to each other. Such information must then be maintained by the user.