dicom_to_cnn.tools.cleaning_dicom package

Submodules

dicom_to_cnn.tools.cleaning_dicom.cleaning_series module

dicom_to_cnn.tools.cleaning_dicom.cleaning_series.find_non_intersting_series(json_merged_file_path: str) list

find non interesting series (not all body PET or all body CT)

Args:

json_merged_file_path (str): [merged json file generated by generated_merged_file() function]

Returns:

[list]: [Return the list of each serie path which is not interesting]

dicom_to_cnn.tools.cleaning_dicom.cleaning_series.find_studies_over_two_series(json_merged_file_path: str) tuple

find study with more than 2 series

Args:

json_merged_file_path (str): [merged json file generated by generated_merged_file() function]

Returns:

[tuple]: [Return the list of each serie path which belong to a study with more than 2 series and their path]

dicom_to_cnn.tools.cleaning_dicom.cleaning_series.find_studies_with_two_series(json_merged_file_path: str) tuple

find study with two series

Args:

json_merged_file_path (str): [merged json file generated by generated_merged_file() function]

Returns:

[tuple]: [Return the list of each serie path which belong to a study with 2 series and their path]

dicom_to_cnn.tools.cleaning_dicom.cleaning_series.generate_merged_file(json_path: str) dict

function to generate a json file to gather information about other json file with series details.

Args:

json_path (str): [directory’s path where the series json are]

Returns:

[dict]: [dict to gather informations about series json]

dicom_to_cnn.tools.cleaning_dicom.cleaning_series.remove_path_from_disk(path: str)

remove a serie from disk

Args:

path (str): [a serie’s path]

dicom_to_cnn.tools.cleaning_dicom.folders module

dicom_to_cnn.tools.cleaning_dicom.folders.get_series_path(path: str) list

Go through all the folder to find every series path

Arguments:

path {[string]} – [Absolute path where the repertory is located]

Returns:

[list] – [Path’s list of every series]

dicom_to_cnn.tools.cleaning_dicom.folders.remove_bi_file(path: str)

remove bi file of a dicom serie

Args:

path (str): [directory’s path of the serie]

dicom_to_cnn.tools.cleaning_dicom.folders.remove_empty_folders(path: str)

remove serie with no dicom file in it

Args:

path (str): [directory’s path of a dicom serie]

dicom_to_cnn.tools.cleaning_dicom.folders.remove_index_ini(path: str)

remove index ini of a dicom serie

Args:

path (str): [directory’s path of the serie]

dicom_to_cnn.tools.cleaning_dicom.folders.write_json_file(path: str, file_name: str, content: list, extension: str = 'json')

write and save a json file

Args:

path (str): [directory’s path where to save json file] file_name (str): [name of the json file] content (list): [what to write in the json file] extension (str, optional): [description]. Defaults to ‘json’.

Module contents