pysap.base.io#

load(path, dtype=<class 'numpy.float32'>, **kwargs)[source]#

Load an image.

Parameters
  • path (str) – the path to the data to be loaded.

  • dtype (str) – type to which the data will be cast. Passing ‘None’ will not cast.

Returns

image – the loaded image.

Return type

Image

save(image, path, **kwargs)[source]#

Save an image.

Parameters
get_loader(path)[source]#

Search for a suitable loader in the declared loaders. Raise an exception if no loader is found.

Parameters

path (str) – the path to the data to be loaded.

Returns

loader – the loader instance.

Return type

@instance

get_saver(path)[source]#

Search for a suitable saver in the declared savers. Raise an exception if no saver is found.

Parameters

path (str) – the path to the data to be saved.

Returns

saver – the loader instance.

Return type

@instance