Skip to content

Commit

Permalink
Use sizeZ instead of z-range to disable Z-projection for export script
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed Aug 19, 2024
1 parent 3d9cfe3 commit 9c44243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions omero_figure/scripts/omero/figure_scripts/Figure_To_Pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -1678,15 +1678,15 @@ def get_panel_image(self, image, panel, orig_name=None):
t = panel['theT']
size_x = image.getSizeX()
size_y = image.getSizeY()
size_z = image.getSizeZ()

if 'z_projection' in panel and panel['z_projection']:
if 'z_start' in panel and 'z_end' in panel:
# check max_projection_bytes
pixel_range = image.getPixelRange()
bytes_per_pixel = ceil(log2(pixel_range[1]) / 8.0)
act_chs = [ch for ch in image.getChannels() if ch.isActive()]
z_range = panel['z_end'] - panel['z_start']
proj_bytes = (z_range * image.getSizeX() * image.getSizeY()
proj_bytes = (size_z * size_x * size_y
* len(act_chs) * bytes_per_pixel)

cfg = self.conn.getConfigService()
Expand Down

0 comments on commit 9c44243

Please sign in to comment.