Files
situr/situr/registration/tile_registration.py

27 lines
1.1 KiB
Python

from situr.image.situ_tile import Tile
from situr.registration import RoundRegistration, ChannelRegistration, round_registration
class CombinedRegistration:
def __init__(self, round_registration: RoundRegistration = RoundRegistration(), channel_registration: ChannelRegistration = ChannelRegistration(), reference_channel=0) -> None:
self.round_registration = round_registration
self.channel_registration = channel_registration
def do_registration_and_transform(self, tile: Tile):
""" This function applies the registration in the following order:
1. Register the channels for each round of each tile.
2. Apply transformations
3. Register the rounds
4. Apply transformation
Args:
tile (Tile): The tile that the registration and transformations are to be performed on.
"""
self.channel_registration.do_channel_registration(tile)
tile.apply_channel_transformations()
self.round_registration.do_round_registration(tile)
tile.apply_round_transformations()