Skip to content

Commit

Permalink
v0.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jwindhager committed Oct 19, 2021
1 parent ea7747c commit 35051a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.6.1] - 2021-10-19

Fixed bug related to positioning of acquisitions from old MCD files

## [v0.6.0] - 2021-10-18

Replaced imctools by readimc
Expand All @@ -28,6 +32,7 @@ Updated documentation
Last release before introducing this changelog


[v0.6.1]: https://github.com/BodenmillerGroup/napari-imc/compare/v0.6.0...v0.6.1
[v0.6.0]: https://github.com/BodenmillerGroup/napari-imc/compare/v0.5.6...v0.6.0
[v0.5.6]: https://github.com/BodenmillerGroup/napari-imc/compare/v0.5.4...v0.5.6
[v0.5.4]: https://github.com/BodenmillerGroup/napari-imc/compare/v0.5.3...v0.5.4
Expand Down
8 changes: 4 additions & 4 deletions napari_imc/io/mcd.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ def read_acquisition(self, acquisition_id: int, channel_label: str) -> Tuple[Ima
if acquisition.id == acquisition_id
)
channel_index = acquisition.channel_labels.index(channel_label)
xs_physical = [acquisition.start_x_um, acquisition.end_x_um]
ys_physical = [acquisition.start_y_um, acquisition.end_y_um]
x_physical, y_physical = min(xs_physical), min(ys_physical)
w_physical, h_physical = max(xs_physical) - x_physical, max(ys_physical) - y_physical
x_physical = min(acquisition.start_x_um, acquisition.end_x_um)
y_physical = min(acquisition.start_y_um, acquisition.end_y_um)
w_physical = x_physical + acquisition.width_um
h_physical = y_physical + acquisition.height_um
channel_img = self._mcd_file.read_acquisition(acquisition)[channel_index]
if x_physical != acquisition.start_x_um:
channel_img = channel_img[:, ::-1]
Expand Down

0 comments on commit 35051a0

Please sign in to comment.