Hive_ML.data_loader.image_loader module#

Hive_ML.data_loader.image_loader.get_3D_image_sequence_list_from_4D_image(image_filename)[source]#

Convert a single 4D Image into a list of 3D Images. Each item of the list is one sequence of the 4D image in ITK image format with the same spacing and origin of the main image.

Parameters:

image_filename (Union[str, PathLike]) – 4D image file path.

Return type:

List[Image]

Returns:

List of 3D Images (one per sequence).

Hive_ML.data_loader.image_loader.get_id_label(filename, config_dict)[source]#

Function to provide Subject ID and Label ID for a given file path, extracting the information from the parent folder tree.

Parameters:
  • filename – File path to extract Subject ID and Label.

  • config_dict – Configuration dictionary containing the mapping for each label class to the corresponding label ID.

Return type:

Tuple[str, str]

Returns:

Subject ID and Label ID.