Skip to content

fov position file unaligned with centroids coordinates #47

Description

@drighelli

Very often the fov_position coordinates are unaligned with the cell centroids.

It could be helpful a function to move the fov positions by adding/subtracting x/y coordinates from the loaded fov positions.

A starting code point for this could be

fovpos_file <- list.files(cospath, "fov_positions_file.csv", full.names=TRUE)
fov_positions <- as.data.frame(data.table::fread(fovpos_file, header=TRUE))
f1 <- fov_positions[fov_positions$FOV %in%fovs,]
x_shift_px <- y_shift_px <- 80
fov_px <- 4239.291

f1 <- f1 |>
    dplyr::mutate(
        x_global_px = x_global_mm / 0.12028 * 1000 + x_shift_px,
        y_global_px = y_global_mm / 0.12028 * 1000 - fov_px + y_shift_px
    )

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions