Metadata manager module

This module is responsible for extracting metadata from the CZI files.

class library.image_manipulation.meta_manager.MetaUtilities

Bases: object

Collection of methods used to extract meta-data from czi files and insert into database. Also includes methods for validating information in database and/or files [double-check]

all_slide_meta_data_exists_in_database(czi_files)

Determines whether or not all the slide info is already in the datbase

Parameters:

list – list of CZI files

Return status:

boolean on whether the files are valid

Return list:

list of CZI files

check_czi_file_exists()

Check that the CZI files are placed in the correct location

correct_multiples()
extract_slide_meta_data_and_insert_to_database()

REVISED FOR PARALLEL PROCESSING Scans the czi dir to extract the meta information for each tif file

file_validation(czi_files)

CHECK IF DUPLICATE SLIDE NUMBERS EXIST IN FILENAMES. If there are duplicates, record the ID. ALSO CHECKS CZI FORMAT CHECK DB COUNT FOR SLIDE TABLE

Parameters:

czi_files – list of CZI files

Return status:

boolean on whether the files are valid

Return list:

list of CZI files

get_user_entered_scan_id()

Get id in the “scan run” table for the current microscopy scan that was entered by the user in the preparation phase

parallel_extract_slide_meta_data_and_insert_to_database(file_key)

A helper method to define some methods for extracting metadata.