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:
# add to v(i, j)
tile = self.readViewTile(slice_nr, i, j)
size = (tile.shape[self.npWidthIdx], tile.shape[self.npHeightIdx]) # (w, h)
# translation matrix
m = np.float32([
[1, 0, src_tile_pos_x],
[0, 1, cur_src_tile_pos_y]
cv2.warpAffine(current_src_img, m, size, tile, borderMode=cv2.BORDER_TRANSPARENT)
m_rot[0, 2] = src_tile_pos_x
m_rot[1, 2] = cur_src_tile_pos_y
cv2.warpAffine(current_src_img, m_rot, size, tile, borderMode=cv2.BORDER_TRANSPARENT)
self.saveViewTile(tile, slice_nr, i, j)
cur_src_tile_pos_y -= view_tile_height
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