This module defines a widget designed to display data arrays with any number of dimensions as 2D frames (images, slices) in a table view. The dimensions not displayed in the table can be browsed using improved sliders.
The widget uses a TableView that relies on a custom abstract item model: silx.gui.data.ArrayTableModel.
This widget is designed to display data of 2D frames (images, slices) in a table view. The widget can load any n-dimensional array, and display any 2-D frame/slice in the array.
The index of the dimensions orthogonal to the displayed frame can be set interactively using a browser widget (sliders, buttons and text entries).
To set the data, use setArrayData(). To select the perspective, use setPerspective() or use setFrameAxes(). To select the frame, use setFrameIndex().
Set the data array. Update frame browsers and labels.
Parameters: |
|
---|
Set the colors for all table cells by passing an array of RGB or RGBA values (integers between 0 and 255).
The shape of the colors array must be consistent with the data shape.
If the data array is n-dimensional, the colors array must be (n+1)-dimensional, with the first n-dimensions identical to the data array dimensions, and the last dimension length-3 (RGB) or length-4 (RGBA).
Parameters: |
|
---|
Allow to display or hide the axes selector.
Parameters: | isVisible (bool) – True to display the axes selector. |
---|
Set the active slice/image index in the n-dimensional array.
A frame is a 2D array extracted from an array. This frame is necessarily parallel to 2 axes, and orthogonal to all other axes.
The index of a frame is a sequence of indices along the orthogonal axes, where the frame intersects the respective axis. The indices are listed in the same order as the corresponding dimensions of the data array.
For example, it the data array has 5 dimensions, and we are considering frames whose parallel axes are the 2nd and 4th dimensions of the array, the frame index will be a sequence of length 3 corresponding to the indices where the frame intersects the 1st, 3rd and 5th axes.
Parameters: | index – Sequence of indices defining the active data slice in a n-dimensional array. The sequence length is \(n-2\) |
---|---|
Raise: | IndexError if any index in the index sequence is out of bound on its respective axis. |
Set the perspective by specifying which axes are orthogonal to the frame.
For the opposite approach (defining parallel axes), use setFrameAxes() instead.
Parameters: | perspective – Sequence of unique axes numbers (0-based) defining the orthogonal axes. For a n-dimensional array, the sequence length is \(n-2\). The order is of the sequence is not taken into account (the dimensions are displayed in increasing order in the widget). |
---|
Set the perspective by specifying which axes are parallel to the frame.
For the opposite approach (defining orthogonal axes), use setPerspective() instead.
Parameters: |
|
---|
Return a copy of the data array, or a reference to it if copy=False is passed as parameter.
Parameters: | copy (bool) – If True (default), return a copy of the data. If False, return a reference. |
---|---|
Returns: | Numpy array of data, or reference to original data object if copy=False |
This module defines a data model for displaying and editing arrays of any number of dimensions in a table view.
This data model provides access to 2D slices in a N-dimensional array.
A slice for a 3-D array is characterized by a perspective (the number of the axis orthogonal to the slice) and an index at which the slice intersects the orthogonal axis.
In the n-D case, only slices parallel to the last two axes are handled. A slice is therefore characterized by a list of indices locating the slice on all the \(n - 2\) orthogonal axes.
Parameters: |
|
---|