The RLE module provides Run Length Encoding suitable for recording the file positions of a set of LIS Logical Records that represent frame data.
Created on 5 Jan 2011
A generic item in a Run Length Encoding list.
A generic Run Length Encoding list.
A specialised item in a Run Length Encoding list for type 0/1 LIS Logical Records.
A specialised Run Length Encoding list for type 0/1 LIS Logical Records.
Class that represents a single entry in a Run Length Encoding set. v - The datum value.
String representation.
The initial datum value.
The stride as a number or None if there is only one entry.
The repeat count.
Total number of record values.
Returns True if v has been absorbed in this entry. False means a new entry is required.
Generates all values.
Returns a particular value.
Returns a range object that has (start, stop, step) or None if a single entry.
Returns the first value.
Returns the last value.
list of weak references to the object (if defined)
Class that represents Run Length Encoding.
theFunc - optional unary function to convert all values with.
Constructor, optionally takes a unary function to convert all values with.
String representation.
The number of RLEItem(s).
Returns a RLEItem.
Total number of record values.
Adds a value to this RLE object.
Generates all values entered.
Indexing; this returns the i’th value added.
Returns a list of range() or None objects. A None object means that the RLEItem has a single value.
Returns the first value or None if no values added.
Returns the last value or None if no values added.
list of weak references to the object (if defined)
Specialisation of an RLEItem for type 0 and type 1 LIS Logical Records. This is a RLEItem for the Logical Record but within we have a RLE() object for the X axis values.
tellLrPos - the position in the LIS file of the start of the Logical Record.
numFrameS - integer number of frames in this Logical Record.
xAxisValue - The value of the X axis of the first frame in the Logical Record.
String representation.
Total number of frames.
Returns True if v has been absorbed in this entry. False means a new entry is required. A new entry is required if the tellLrPos is not regular or numFrameS is different than before.
Generates ordered tuples of (value, number of frames, xaxis value).
Returns the i’th tuple of (i, (value, number of frames, xaxis value)).
Returns the total number of frames in this RLE item.
Returns the Logical Record position that contains the integer frame number.
Returns the first X-axis value loaded.
Returns the first X-axis value loaded.
Class that represents Run Length Encoding for type 0/1 logical records.
theXUnits - the X axis units.
String representation.
X axis units.
True if there is X axis data.
Adds a value to this RLE object.
Returns the (lr_seek, frame_offset) i.e. the Logical Record position that contains the integer frame number and the number of excess frames.
Returns the total number of frames in this RLE object.
Returns the first X-axis value loaded or None if nothing loaded.
Returns the last X-axis value at the satart of the last Logical Record loaded or None if nothing loaded.
Returns the last X-axis value of the last frame loaded or None if nothing loaded.
Returns the frame spacing from the first/last entries, or None if nothing loaded. Returned value is -ve for decreasing X (up logs), +ve for increasing X (down and time logs).