protoclass.data_management.OCTModality

class protoclass.data_management.OCTModality(path_data=None)[source]

Class to handle OCT modality.

Parameters:

path_data : str, optional (default=None)

The img file where the data are stored.

Attributes

path_data_ (string) Location of the img file.
data_ (array-like, shape (Y, Z, X)) The different volume of the SD-OCT volume. The data are saved in Y, Z, X ordered. Generally, the data are coded on 8 bits.
pdf_ (list, length (n_serie)) List of the PDF for each serie.
bin_ (list of ndarray, length (n_serie)) List of the bins used to plot the pdfs.
max_ (float) Maximum intensity of the OCT volume.
min_ (float) Minimum intensity of the OCT volume.

Methods

is_read() Function to know if the data have been read.
read_data_from_path(sz_data[, path_data, dtype]) Function to read OCT images which correspond to a 3D volume.
update_histogram([nb_bins]) Update the PDF and the first-order statistics.
__init__(path_data=None)[source]

Methods

__init__([path_data])
is_read() Function to know if the data have been read.
read_data_from_path(sz_data[, path_data, dtype]) Function to read OCT images which correspond to a 3D volume.
update_histogram([nb_bins]) Update the PDF and the first-order statistics.
is_read()

Function to know if the data have been read.

Returns:

is_read : bool

If True, the data have been read at least once.

read_data_from_path(sz_data, path_data=None, dtype='uint8')[source]

Function to read OCT images which correspond to a 3D volume.

Parameters:

sz_data : tuple of int, shape (Y, Z, X)

Tuple with 3 values specifying the dimension of the volume.

path_data : str or None, optional (default=None)

Path to the img file. It will overrides the path given in the constructor.

dtype : str, optional (default=’uint8’)

Type of the raw data.

Returns:

self : object

Returns self.

update_histogram(nb_bins=None)[source]

Update the PDF and the first-order statistics.

Parameters:

nb_bins : int or None, optional (default=None)

The numbers of bins to use to compute the histogram. The possibilities are: - If None, the number of bins found at reading will be used. - Otherwise, an integer needs to be given.

Returns:

self : object

Returns self.

Notes

There is the possibility to redifine the number of bins to use for the histogram since it can be tricky to play with normalized data.