xmcdpy.image_reading

xmcdpy.image_reading.import_single(folder, name_filter='')

Imports the first image in the folder containing the name_filter substring.

Parameters
  • folder (str) – Path to folder

  • name_filter (str, optional) – Defaults to ‘’.

Returns

Image in np array.

Return type

(n, m) array

xmcdpy.image_reading.import_stack(folder, name_filter='')

Imports a stack of images in the given folder

Parameters
  • folder (str) – Path to folder

  • name_filter (str, optional) – Substring that images need to contain. Defaults to ‘’.

Returns

Stack of images with the last axis being the different images.

Return type

(n, m, k) array

xmcdpy.image_reading.read_dat_image(file_path)

Reads an image in Alba .dat format

Parameters

file_path (str) –

Returns

Image in np array.

Return type

array

xmcdpy.image_reading.read_image(file_path)

Reads the image from file_path.

Parameters

file_path (str) –

Returns

Image in np array.

Return type

array

xmcdpy.image_reading.save_image(path, image)

Saves the image to path. First puts the values between 0 and 255 and transforms to uint8.

Parameters
  • path (str) –

  • image (array) –