preprocess.alignment
vhrharmonize.preprocess.alignment
¶
Pairwise image alignment wrapper around coregix.
AlignmentResult
dataclass
¶
Summary of pairwise alignment execution.
align_image_pair(moving_image_path, fixed_image_path, output_image_path, *, band_index=0, moving_band_index=None, fixed_band_index=None, moving_nodata=None, fixed_nodata=None, output_nodata=None, min_valid_fraction=0.01, temp_dir=None, keep_temp_dir=False, split_factor=2, clip_fixed_to_moving=False, output_on_moving_grid=True, trim_edge_invalid=False, edge_trim_depth=8, edge_trim_detection_band_index=0, edge_trim_invalid_below=None, edge_trim_invalid_above=None, enforce_mutual_valid_mask=False, use_edge_proxies=True, solve_resolution=None, log_to_console=False, scene_basename=None)
¶
Align a moving image to a fixed image. Args: moving_image_path: Moving image path to transform. fixed_image_path: Fixed reference image path. output_image_path: Output aligned image path. band_index: Default band index used when band-specific overrides are not provided. moving_band_index: Optional moving-image band index override. fixed_band_index: Optional fixed-image band index override. moving_nodata: Optional moving-image nodata override. fixed_nodata: Optional fixed-image nodata override. output_nodata: Optional output nodata override. min_valid_fraction: Minimum valid overlap fraction required for registration. temp_dir: Optional temp directory for coregix intermediates. keep_temp_dir: Whether to preserve the coregix temp directory. split_factor: Chunking factor used by coregix. clip_fixed_to_moving: Whether to clip the fixed image to the moving bounds before registration. output_on_moving_grid: Whether to write the aligned result on the moving grid. trim_edge_invalid: Whether to trim invalid alignment edge artifacts. edge_trim_depth: Edge trim depth in pixels. edge_trim_detection_band_index: Detection band index used for edge trimming. edge_trim_invalid_below: Optional lower invalid-value threshold for edge trimming. edge_trim_invalid_above: Optional upper invalid-value threshold for edge trimming. enforce_mutual_valid_mask: Whether to enforce mutual valid masks during alignment. use_edge_proxies: Whether to use edge proxies during alignment. solve_resolution: Optional solve resolution override. log_to_console: Whether to emit console logs. scene_basename: Optional scene basename for log prefixes. Returns: Alignment result summary.