Commit c5a3864a authored by Josef Brandt's avatar Josef Brandt

Hotfix in creating viewtiles

Rotation contributions of transformation matrix were neglected, they are now properly taken into account.
parent c6a879a9
...@@ -592,12 +592,10 @@ class ScenePyramid: ...@@ -592,12 +592,10 @@ class ScenePyramid:
# add to v(i, j) # add to v(i, j)
tile = self.readViewTile(slice_nr, i, j) tile = self.readViewTile(slice_nr, i, j)
size = (tile.shape[self.npWidthIdx], tile.shape[self.npHeightIdx]) # (w, h) size = (tile.shape[self.npWidthIdx], tile.shape[self.npHeightIdx]) # (w, h)
# translation matrix m_rot[0, 2] = src_tile_pos_x
m = np.float32([ m_rot[1, 2] = cur_src_tile_pos_y
[1, 0, src_tile_pos_x],
[0, 1, cur_src_tile_pos_y] cv2.warpAffine(current_src_img, m_rot, size, tile, borderMode=cv2.BORDER_TRANSPARENT)
])
cv2.warpAffine(current_src_img, m, size, tile, borderMode=cv2.BORDER_TRANSPARENT)
self.saveViewTile(tile, slice_nr, i, j) self.saveViewTile(tile, slice_nr, i, j)
cur_src_tile_pos_y -= view_tile_height cur_src_tile_pos_y -= view_tile_height
src_tile_pos_x -= view_tile_width src_tile_pos_x -= view_tile_width
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment