WaveData module

class lys.widgets.canvas.interface.WaveData.WaveData(canvas, wave, axis)[source]

Bases: CanvasPart

Interface to access wave data in the canvas.

This class is inherited by Line.LineData, Image.ImageData, RGB.RGBData, Vector.VectorData, and Contour.ContourData.

Instance of WaveData is automatically generated by display or append methods.

getAxis()[source]

Get the axis to which the data was added.

Returns

The axis (‘BottomLeft’, ‘TopLeft’, ‘BottomRight’, or ‘TopRight’).

Return type

str

getFilter()[source]
getFilteredWave()[source]

Get the wave to which offset and filter have been applied.

Returns

The filtered wave.

Return type

Wave

getName()[source]

Get the name of the wave data.

Returns

The name.

Return type

str

getOffset()[source]

Get the offset to the data.

See setOffset() for detail.

Returns

The offset in the form of (x0, y0, x1, y1).

Return type

tuple of length 4 float

getVisible()[source]

Get the visibility of the data.

Returns

The visibility of the data.

Return type

bool

getWave()[source]

Get the wave.

Returns

The wave.

Return type

Wave

getZOrder()[source]

Get the z order of the data.

Returns

The z order.

Return type

int

loadAppearance(appearance)[source]

Load appearance from dictionary.

Users can save/load appearance of data by save/loadAppearance methods.

Parameters

appearance (dict) – dictionary that include all appearance information, which is usually generated by saveAppearance() method.

modified

This pyqtSignal is emimtted when the data is changed.

saveAppearance()[source]

Save appearance from dictionary.

Users can save/load appearance of data by save/loadAppearance methods.

Returns

dictionary that include all appearance information.

Return type

dict

setFilter(filter=None)[source]

Apply filter to the data.

Parameters

filter (filterr) – The filter. See lys.filters.filter.FilterInterface.FilterInterface

setName(name)[source]

Set the name of the data.

Parameters

name (str) – The name of the data.

setOffset(offset)[source]

Set the offset to the data.

The data is offset as x’=x*x1+x0 and y’=y*y1+y0.

Parameters

offset (tuple of length 4 float) – The offset in the form of (x0, y0, x1, y1).

setVisible(visible)[source]

Set the visibility of the data.

Parameters

visible (bool) – The visibility of the data.

setZOrder(z)[source]

Set the z order of the data.

Parameters

z (int) – The z order.