ImageView QML Type

Display a colorized image from a 2D array. More...

Import Statement: import QuickGraphLib
Inherits:

Item

Inherited By:

ColorMesh

Properties

Detailed Description

See also Builtin color maps, Color mapped images, and Image alignment.

Property Documentation

alignment : enumeration [default: Qt.AlignHCenter | Qt.AlignVCenter]

A bitwise or of one horizontal and one vertical flag from the following:

ConstantDescription
Qt.AlignLeftLeft align
Qt.AlignHCenterCenter align (horizontally)
Qt.AlignRightRight align
Qt.AlignTopTop align
Qt.AlignVCenterCenter align (vertically)
Qt.AlignBottomBottom align

See also Qt::AlignmentFlag.


autoMax : bool [default: true]

Whether the maximum value for the colormap should be determined from source.

See also ImageView::max.


autoMin : bool [default: true]

Whether the minimum value for the colormap should be determined from source.

See also ImageView::min.


colormap : var [default: ColorMaps.Grayscale]

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.

Note: This property has no effect when source is a QImage.

See also ColorMaps::colors.


fillMode : enumeration [default: Qt.IgnoreAspectRatio]

One of the following:

ConstantDescription
Qt.IgnoreAspectRatioStretch the image to fill
Qt.KeepAspectRatioPreserve the aspect ratio
Qt.KeepAspectRatioByExpandingPreserve the aspect ratio by cropping

See also Qt::AspectRatioMode.


max : real

The value which is mapped to 1 on the colormap. If autoMax is set, this property will update to the maximum value of source.


min : real

The value which is mapped to 0 on the colormap. If autoMin is set, this property will update to the minimum value of source.


mirrorHorizontally : bool [default: false]

Mirror the image horizontally.


mirrorVertically : bool [default: false]

Mirror the image vertically.


paintedRect : rect [read-only]

The rect that the image is painted in, in the ImageView's own coordinate space. If fillMode is Qt.IgnoreAspectRatio, this will equal Qt.rect(0, 0, width, height).


smooth : bool [default: false]

Sets whether the displayed image should be pixelated or smooth (linearly interpolated).


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 [default: false]

Transpose the image.