protoclass.data_management.DCEModality¶
-
class
protoclass.data_management.
DCEModality
(path_data=None)[source]¶ Class to handle DCE-MRI modality.
Parameters: path_data : str or None, optional (default=None)
Path where the data are located. Can also be specified when reading the data. It will be overidden with this function.
Attributes
path_data_ (str) Location of the data. data_ (ndarray, shape (T, Y, X, Z)) The different volume of the DCE serie. The data are saved in T, Y, X, Z ordered. metadata_ (dict) A dictionary containing the metadata related to the DCE serie. pdf_series_ (list of ndarray, length (n_serie)) List of the PDF for each serie. bin_series_ (list of ndarray, length (n_serie)) List of the bins used to plot the pdfs. max_series_ (float) Maximum intensity of all the DCE series. min_series_ (float) Minimum intensity of all the DCE series. n_serie_ (int) Number of serie in this DCE sequence. max_series_list_ (list of float) List of the maximum intensity for each DCE serie. min_series_list_ (list of float) List of the minimum intensity for each DCE serie. time_info_ (ndarray, shape (n_serie, )) Array containing the time information of the acquisition time in seconds Methods
build_heatmap
([roi_data, nb_bins])Function which return a heatmap using the pdf of each serie. get_pdf_list
([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])Function to read temporal images which represent a 3D volume over time. update_histogram
([nb_bins])Update the histogram of each serie and first-order statistics. Methods
__init__
([path_data])build_heatmap
([roi_data, nb_bins])Function which return a heatmap using the pdf of each serie. get_pdf_list
([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])Function to read temporal images which represent a 3D volume over time. update_histogram
([nb_bins])Update the histogram of each serie and first-order statistics. -
build_heatmap
(roi_data=None, nb_bins='auto')[source]¶ Function which return a heatmap using the pdf of each serie.
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 : int, str 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: heatmap : ndarray, shape (n_serie, intensity_range)
Return an heatmap of the different pdfs. This equivalent to pdf_series_ but properly shifted inside an array.
bins_heatmap : ndarray, shape (intensity_range, )
Returns the bins associated with the heatmap.
-
get_pdf_list
(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. - Otherwise, a list of integer needs to be given.
Returns: pdf_list : list of ndarray, length (n_serie)
List of the pdf with the associated series.
bin_list : 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]¶ Function to read temporal images which represent a 3D volume over time.
Parameters: path_data : str, list of str, or None, optional (default=None)
Path to the temporal data. It will overrides the path given in the constructor.
Returns: self : object
Returns self.
-
update_histogram
(nb_bins=None)[source]¶ Update the histogram of each serie and first-order statistics.
Parameters: nb_bins : list of int, str, 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, a list of integer needs to be given.
Returns: self : object
Returns self.
-