Skip to content

Commit

Permalink
Adjust contrast and interpolation working with Tile
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Jan 30, 2024
1 parent 0df664b commit 1d61829
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions mesospim_stitcher/tile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ def __init__(self, tile_name: str, tile_id: int):
self.position: Tuple[int, int, int] = (0, 0, 0)
self.stitched_position: Tuple[int, int, int] = (0, 0, 0)
self.downsampled_factors: npt.ArrayLike = np.array([4, 4, 4])
self.downsampled_data: da.Array | None = None
self.data: da.Array | None = None
self._downsampled_data: da.Array | None = None
self._data: da.Array | None = None
self.channel_id: int = -1
self.channel_name: str | None = None
self.tile_id: int = -1
Expand All @@ -25,22 +25,22 @@ def set_position(self, position: Tuple[int, int, int]):

@property
def data(self):
if self.data is None:
if self._data is None:
raise ValueError("Tile data not set")

return self.data
return self._data

@data.setter
def data(self, data: da.Array):
self.data = data
self._data = data

@property
def downsampled_data(self):
if self.downsampled_data is None:
if self._downsampled_data is None:
raise ValueError("Tile downsampled data not set")

return self.downsampled_data
return self._downsampled_data

@downsampled_data.setter
def downsampled_data(self, data: da.Array):
self.downsampled_data = data
def downsampled_data(self, downsampled_data: da.Array):
self._downsampled_data = downsampled_data

0 comments on commit 1d61829

Please sign in to comment.