nabu.stitching.alignment
source module nabu.stitching.alignment
Classes
-
AlignmentAxis2 — Specific alignment named to help users orienting themself with specific name
-
AlignmentAxis1 — Specific alignment named to help users orienting themself with specific name
-
PaddedRawData — Util class to extend a data when necessary Must to aplpy to a volume and to an hdf5dataset - array The idea behind is to avoid loading all the data in memory
Functions
-
align_frame — Align 2D array to extend if size along
alignment_axis
tonew_aligned_axis_size
. -
align_horizontally — Align data horizontally to make sure new data width will ne
new_width
.
source enum AlignmentAxis2(*args, **kwds)
Bases : Enum
Specific alignment named to help users orienting themself with specific name
Attributes
-
CENTER
-
LEFT
-
RIGTH
source enum AlignmentAxis1(*args, **kwds)
Bases : Enum
Specific alignment named to help users orienting themself with specific name
Attributes
-
FRONT
-
CENTER
-
BACK
source align_frame(data: numpy.ndarray, alignment: _Alignment, alignment_axis: int, new_aligned_axis_size: int, pad_mode='constant')
Align 2D array to extend if size along alignment_axis
to new_aligned_axis_size
.
:param numpy.ndarray data: data (frame) to align (2D numpy array) :param alignment_axis: axis along which we want to align the frame. Must be in (0, 1) :param HAlignment alignment: alignment strategy :param int new_width: output data width
Raises
-
ValueError
source align_horizontally(data: numpy.ndarray, alignment: AlignmentAxis2, new_width: int, pad_mode='constant')
Align data horizontally to make sure new data width will ne new_width
.
:param numpy.ndarray data: data to align :param HAlignment alignment: alignment strategy :param int new_width: output data width
source class PaddedRawData(data: Union[numpy.ndarray, h5py.Dataset], axis_1_pad_width: tuple)
Util class to extend a data when necessary Must to aplpy to a volume and to an hdf5dataset - array The idea behind is to avoid loading all the data in memory
Methods
source staticmethod PaddedRawData.get_empty_frame(shape, dtype)
source property PaddedRawData.empty_frame
source property PaddedRawData.shape
source property PaddedRawData.raw_data
source property PaddedRawData.raw_data_start
source property PaddedRawData.raw_data_end
source property PaddedRawData.dtype