helper

class Qiber3D.helper.NumpyMemoryManager(compressor='blosclz', storage=None, meta=None)

Bases: object

Stores numpy arrays compressed in memory in a dictionary like structure.

Parameters
  • compressor (str) – a compression algorithm suporrted by blosc

  • storage (dict) – prefilled storage dictionary

  • meta (dict) – prefilled meta dictionary

Variables

compression_ratio (float) – compression ratio

classmethod load(in_path=None, fileobj=None)

Create a NumpyMemoryManager from either a file or a file object.

Parameters
  • in_path (str) – path to load

  • fileobj – a opened file object

Returns

NumpyMemoryManager

save(out_path)

Save a NumpyMemoryManager to file.

Parameters

out_path (str, Path) – file or folder path where to save the NumpyMemoryManager

class Qiber3D.helper.LookUp(*arg, **kw)

Bases: object

Two way lookup dictionary

class Qiber3D.helper.PointLookUp(points=(), places=3, convert='float')

Bases: object

Two way lookup dictionary between points and point IDs.

Parameters
  • points (list) – list of initial points

  • places (int) – round points to number of places if convert is ‘float’

  • convert (str) – convert points to ‘float’ or ‘int’

add_points(points)

Add multiple points at once.

Parameters

points (list) – list of points to add

class Qiber3D.helper.Example

Bases: object

classmethod load_example(ex_name)

Download examples files from figshare.

Parameters

ex_name (str) – name of the example (see Example.ex_list)

Returns

Path

classmethod nd2()

Short form of Example.load_example() called with microvascular_network.nd2

Returns

Path

classmethod tiff()

Short form of Example.load_example() called with microvascular_network.tif

Returns

Path

classmethod tiff_c2()

Short form of Example.load_example() called with microvascular_network-C2.tif

Returns

Path

classmethod tiff_c2_red()

Short form of Example.load_example() called with microvascular_network-C2-reduced.tif

Returns

Path