protoclass.data_management.ADCModality¶
-
class
protoclass.data_management.
ADCModality
(path_data=None)[source]¶ Class to handle ADC modality.
Parameters: path_data : str, optional (default=None)
The folder in which the data are stored.
Attributes
path_data_ (string) Location of the data. data_ (ndarray, shape (Y, X, Z)) The different volume of the T2W volume. The data are saved in Y, X, Z ordered. metadata_ (dict) Dictionnary which contain the MRI sequence information. Note that the information are given in the original ordering (X, Y, Z), which is different from the organisation of data_ which is (Y, X, Z). 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 T2W-MRI volume. min_ (float) Minimum intensity of the T2W-MRI volume. Methods
get_pdf
([roi_data, nb_bins])Extract the a list of pdf related with the data. is_read
()Function to know if the data have been read. read_data_from_path
([path_data])Read T2W images which represent a single 3D volume. update_histogram
([nb_bins])Update the PDF and the first-order statistics. Methods
__init__
([path_data])get_pdf
([roi_data, nb_bins])Extract the a list of pdf related with the data. is_read
()Function to know if the data have been read. read_data_from_path
([path_data])Read T2W images which represent a single 3D volume. update_histogram
([nb_bins])Update the PDF and the first-order statistics. -
get_pdf
(roi_data=None, nb_bins='auto')[source]¶ Extract the a list of pdf related with the data.
Parameters: roi_data : tuple
Indices of elements to consider while computing the histogram. The ROI is a 3D volume which will be used for each time serie.
nb_bins : list of int or str, optional (default=’auto’)
The numbers of bins to use to compute the histogram. The possibilities are: - If ‘auto’, the number of bins is found at fitting time. - If None, the number of bins used is the one at the last call of update histogram. - Otherwise, a list of integer needs to be given.
Returns: pdf_data : ndarray, length (n_serie)
List of the pdf with the associated series.
bin_data : list of ndarray, length (n_series + 1)
List of the bins associated with the list of pdf.
-
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
(path_data=None)[source]¶ Read T2W images which represent a single 3D volume.
Parameters: path_data : str or None, optional (default=None)
Path to the standalone modality 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. - If ‘auto’, the number of bins is found at fitting time. - 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.
-