imageProcessing package
Contents
imageProcessing package¶
Submodules¶
imageProcessing.alignImages module¶
imageProcessing.alignImages3D module¶
imageProcessing.imageProcessing module¶
Classes for common image processing
-
class
imageProcessing.imageProcessing.Image(current_log=None)¶ Bases:
object-
get_image_filename(root_folder, tag)¶
-
load_image(file_name)¶
-
load_image_2d(file_name, master_folder, tag='_2d')¶
-
save_image_2d(root_folder, tag='_2d')¶
-
show_image(show=False, size=(10, 10), output_name='tmp.png', save=True, normalization='stretch')¶
-
-
imageProcessing.imageProcessing.image_adjust(image, lower_threshold=0.3, higher_threshold=0.9999)¶ - Adjust intensity levels:
rescales exposures
gets histogram of pixel intensities to define cutoffs
applies thresholds
- Parameters
image (numpy array) – input 3D image.
lower_threshold (float, optional) – lower threshold for adjusting image levels. The default is 0.3.
higher_threshold (float, optional) – higher threshold for adjusting image levels.. The default is 0.9999.
- Returns
image1 (numpy array) – adjusted 3D image.
hist1_before (numpy array) – histogram of pixel intensities before adjusting levels.
hist1 (numpy array) – histogram of pixel intensities after adjusting levels.
lower_cutoff (float) – lower cutoff used for thresholding.
higher_cutoff (float) – higher cutoff used for thresholding.
-
imageProcessing.imageProcessing.preprocess_3d_image(x, lower_threshold, higher_threshold, parallel_execution=True)¶ - 3D stack pre-processing:
rescales intensities to 0->1
removes inhomogeneous background plane by plane
adjusts image levels by thresholding
- Parameters
x (numpy array) – 3D image.
lower_threshold (float) – lower threshold for adjusting image levels.
higher_threshold (float) – higher threshold for adjusting image levels..
- Returns
image – pre-processed 3D image.
- Return type
numpy array
-
imageProcessing.imageProcessing.reassemble_3d_image(client, futures, output_shape)¶ waits for futures to arrive collects them into a results list reassembles 3D image plane by plane
- Parameters
client (dask CLient()) – result of get_client()
futures ([]) – list of futures
output_shape (tuple) – result of image.shape
- Returns
output – contains reassembled 3D image.
- Return type
numpy array
-
imageProcessing.imageProcessing.scatter_3d_image(image)¶ splits 3D image plane by plane and scatteres them to a cluster
- Parameters
image (numpy array) – 3D image.
- Returns
image_list_scattered – scattered image.
- Return type
List, dict, iterator, or queue of futures matching the type of input.
imageProcessing.makeProjections module¶
imageProcessing.segmentMasks module¶
imageProcessing.segmentMasks3D module¶
imageProcessing.segmentSources3D module¶
Module contents¶
Created on Wed Aug 12 15:59:09 2020
@author: marcnol
The pyHi-M.projections package includes functions to produce 2D projections from 3d images