ImageView QML Type
Display a colorized image from a 2D array. More...
Properties
- alignment : enumeration
- autoMax : bool
- autoMin : bool
- colormap : var
- fillMode : enumeration
- max : real
- min : real
- mirrorHorizontally : bool
- mirrorVertically : bool
- paintedRect : rect
- smooth : bool
- source : var
- sourceSize : size
- transpose : bool
Detailed Description
See also Builtin color maps, Color mapped images, and Image alignment.
Property Documentation
alignment : enumeration |
A bitwise or of one horizontal and one vertical flag from the following:
Constant | Description |
---|---|
Qt.AlignLeft | Left align |
Qt.AlignHCenter | Center align (horizontally) |
Qt.AlignRight | Right align |
Qt.AlignTop | Top align |
Qt.AlignVCenter | Center align (vertically) |
Qt.AlignBottom | Bottom align |
Defaults to Qt.AlignCenter
(which is Qt.AlignHCenter | Qt.AlignVCenter
).
See also Qt::AlignmentFlag.
autoMax : bool |
Whether the maximum value for the colormap should be determined from source. Defaults to true
.
See also ImageView::max.
autoMin : bool |
Whether the minimum value for the colormap should be determined from source. Defaults to true
.
See also ImageView::min.
colormap : var |
The colormap to use when source is a list of values. This property can either take a Gradient, or a color map enumeration value from ColorMaps.
The values of source are mapped to a color using min and max (i.e. if the value is less than or equal to min, it will be assigned the value at 0; if the value is greater than or equal to max, it will be assigned the value at 1). To invert a colormap, swap the values of min and max.
The default colormap is grayscale.
See also ColorMaps::colors.
fillMode : enumeration |
One of the following:
Constant | Description |
---|---|
Qt.IgnoreAspectRatio | Stretch the image to fill |
Qt.KeepAspectRatio | Preserve the aspect ratio |
Qt.KeepAspectRatioByExpanding | Preserve the aspect ratio by cropping |
Defaults to Qt.IgnoreAspectRatio
.
See also Qt::AspectRatioMode.
max : real |
min : real |
paintedRect : rect |
smooth : bool |
Sets whether the displayed image should be pixelated or smooth (linearly interpolated). Unlike other Items, this property defaults to false
.
source : var |
The data source for the displayed image. This can be a QImage, or a 1D/2D list of reals.
If a list is provided, it will be converted to a color image using the colormap. A 1D list will be converted to a 2D list using sourceSize. The 2D data will be interpreted using "image" indexing (i.e. the first axis is Y and the second axis is X). If your data uses the opposite indexing scheme, use the transpose property to correct it.
sourceSize : size |
The size of source. When source is a 1D list, this property can be set to the size the list should be interpreted as.
transpose : bool |
Transpose the image.