deepness.processing.tile_params.TileParams¶
- class TileParams(x_bin_number: int, y_bin_number: int, x_bins_number: int, y_bins_number: int, params: ~deepness.common.processing_parameters.map_processing_parameters.MapProcessingParameters, rlayer_units_per_pixel, processing_extent: <MagicMock name='mock.QgsRectangle' id='140217810845264'>)¶
Bases:
objectDefines a single tile parameters - image that’s being processed by model
Methods
get_entire_tile_from_full_imgAs we are doing processing with overlap, we are not going to copy the entire tile result to final image, but only the part that is not overlapping with the neighbouring tiles.
Obtain slice to get the entire tile from full final image, including the overlapping parts.
Similar to _get_slice_on_full_image_for_copying, but ROI is a slice on the tile
To check if tile is within the mask image
set_mask_on_full_img- get_slice_on_full_image_for_copying(tile_offset: int = 0)¶
As we are doing processing with overlap, we are not going to copy the entire tile result to final image, but only the part that is not overlapping with the neighbouring tiles. Edge tiles have special handling too.
- Parameters:
tile_offset – how many pixels to cut from the tile result (to remove the padding)
:return Slice to be used on the full image
- get_slice_on_full_image_for_entire_tile() Tuple[slice, slice]¶
Obtain slice to get the entire tile from full final image, including the overlapping parts.
- Returns:
Slice to be used on the full image
- Return type:
Tuple[slice, slice]
- get_slice_on_tile_image_for_copying(roi_slice_on_full_image=None, tile_offset: int = 0)¶
Similar to _get_slice_on_full_image_for_copying, but ROI is a slice on the tile
- is_tile_within_mask(mask_img: ndarray | None)¶
To check if tile is within the mask image