httomolib.misc.blend#
Module for data blending functions
- httomolib.misc.blend.seam_blend_stitched_data(data: <np.ndarray>, seam_index: int | None = None, blending_width: int | None = None, path_to_stiched_params_file: str | None = None, shift_seam_index: int = 0) <np.ndarray>[source]#
Function blends the seam present in the stitched projection data. It uses the redundant by blending_width data present on both sides of the seam. Used in HTTomo for seamless stitching of datasets coming from two different PCO cameras.
- Parameters:
data (np.ndarray) – 3d array of the stitched data, assuming the following axis [“angles”, “detY”, “detX”].
seam_index (Optional, int) – The horizontal index of the seam along the ‘detX’ axis. If None and ‘path_to_stiched_params_file’ is provided, it will be taken from the file, otherwise middle of the horizontal axis.
blending_width (Optional, int) – The area for symmetric blending (e.g. with the ramp filter) around the seam position (seam_index) of the stitched data. If None and ‘path_to_stiched_params_file’ is provided, it will be taken from the file, otherwise 0.
path_to_stiched_params_file (Optional, str) – Path to the text file with the stiching parameters. If provided ‘seam_index’ and ‘blending_width’ parameters will be overridden by the ones provided in the file.
shift_seam_index (int) – performs a shift of the seam index with seam_index - shift_seam_index. This is purely an HTTomo related feature and should be ignored by users.
- Raises:
ValueError – When data is not 3D.:
- Returns:
np.ndarray
- Return type:
stitched data without the seam.