Skip to content

Commit

Permalink
Merge pull request #14 from YuhangTom/fix/x3p_rotate
Browse files Browse the repository at this point in the history
Correct NA conditions after rotation
  • Loading branch information
heike committed Mar 5, 2024
2 parents 33d1952 + ce9f822 commit 073081a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/x3p_rotate.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ x3p_rotate <- function(x3p, angle = 90) {
x3p_matrix_rotate <- x3p_cimg_rotate %>%
as.matrix()
# there should not be any values between 0 and shift_up
x3p_matrix_rotate[x3p_matrix_rotate < (shift_up / 2)] <- NA
x3p_matrix_rotate[x3p_matrix_rotate < (not_zero / 2)] <- NA
x3p_matrix_rotate <- x3p_matrix_rotate - shift_up

if (!is.null(x3p$mask)) {
Expand Down

0 comments on commit 073081a

Please sign in to comment.