implement application of transformations

This commit is contained in:
2021-07-14 16:41:48 +02:00
parent d9ab104612
commit 7f99d56cc1
2 changed files with 9 additions and 8 deletions

View File

@@ -63,8 +63,8 @@ class SituImage:
return self.data
def apply_transformations(self):
# TODO: implement
pass
for i, transformation in enumerate(self.channel_transformations):
transformation.apply_transformation(self, i)
def set_channel_transformation(self, channel: int, transformation: ChannelTransform):
self.channel_transformations[channel] = transformation

View File

@@ -25,16 +25,17 @@ class Tile:
self.round_transformations.append(IdentityRoundTransform())
def apply_transformations(self):
# TODO: implement (first apply channel transformations then round transformations)
pass
# first apply channel transformations then round transformations
self.apply_channel_transformations()
self.apply_round_transformations()
def apply_channel_transformations(self):
# TODO: implement
pass
for i in range(self.get_round_count()):
self.images[i].apply_transformations()
def apply_round_transformations(self):
# TODO: implement
pass
for round, transformation in enumerate(self.round_transformations):
transformation.apply_tranformation(self, round)
def set_round_transformation(self, round, transformation: RoundTransform):
self.round_transformations[round] = transformation