Image cleaner module
This module takes clear of cleaning up the junk from outside the brain area by using masks.
- class library.image_manipulation.image_cleaner.ImageCleaner
Bases:
objectMethods for cleaning images [and rotation, if necessary]. ‘Cleaning’ means applying user-verified masks (QC step) to downsampled or full-resolution images
- create_cleaned_images()
This method applies the image masks that has been edited by the user to extract the tissue image from the surrounding debris 1. Set up the mask, input and output directories 2. clean images 3. Get biggest box size from all contours from all files and update DB with that info 4. Place images in image size with correct background color
- create_rotated_aligned_masks()
- create_shell()
- create_shell_from_mask()
- mask_aligned_imageNOTUSED(img, file)
- parallel_create_cleaned(INPUT, CLEANED, MASKS)
Do the image cleaning in parallel
- Parameters:
INPUT – str of file location input
CLEANED – str of file location output
MASKS – str of file location of masks
- set_max_width_and_height()