mantidimaging.gui.widgets.mi_image_view.view module#
- class mantidimaging.gui.widgets.mi_image_view.view.MIImageView(parent=None, name='ImageView', view=None, imageItem=None, levelMode='mono', detailsSpanAllCols=False, *args)[source]#
Bases:
ImageView
,BadDataOverlay
,AutoColorMenu
- property angles: ProjectionAngles | None#
- close() None [source]#
Closes the widget nicely, making sure to clear the graphics scene and release memory.
- details: QLabel#
- get_roi() tuple[CloseEnoughPoint, CloseEnoughPoint] [source]#
- property histogram: HistogramLUTItem#
- imageItem: ImageItem#
- property image_item: ImageItem#
- roiChanged() None [source]#
Re-implements the roiChanged function to expect only 3D data, and uses a faster mean calculation on the ROI view of the data, instead of the full sized data.
- roiString = None#
- roi_changed_callback: Callable[[SensibleROI], None] | None = None#
- setImage(image: ndarray, *args, **kwargs)[source]#
Set the image to be displayed in the widget.
Parameters#
- imgnp.ndarray
The image to be displayed. See
ImageItem.setImage()
and notes below.- autoRangebool
Whether to scale/pan the view to fit the image.
- autoLevelsbool
Whether to update the white/black levels to fit the image.
- levelstuple
(min, max) white and black level values to use.
- axesdict
Dictionary indicating the interpretation for each axis. This is only needed to override the default guess. Format is:
{'t':0, 'x':1, 'y':2, 'c':3};
- xvalsnp.ndarray
1D array of values corresponding to the first axis in a 3D image. For video, this array should contain the time of each frame.
- pos
Change the position of the displayed image
- scale
Change the scale of the displayed image
- transform
Set the transform of the displayed image. This option overrides pos and scale.
- autoHistogramRangebool
If True, the histogram y-range is automatically scaled to fit the image data.
- levelModestr
If specified, this sets the user interaction mode for setting image levels. Options are ‘mono’, which provides a single level control for all image channels, and ‘rgb’ or ‘rgba’, which provide individual controls for each channel.
Notes#
For backward compatibility, image data is assumed to be in column-major order (column, row). However, most image data is stored in row-major order (row, column) and will need to be transposed before calling setImage():
imageview.setImage(imagedata.T)
This requirement can be changed by the
imageAxisOrder
global configuration option.
- property viewbox: ViewBox#