R / ImageJ:测量点和曲线之间的最短距离 [英] R/ImageJ: Measuring shortest distance between points and curves
问题描述
任何想法如何做到这一点?我应该在R中使用哪个包?你会推荐另一个程序来完成这种任务吗?
编辑:现在可以使用sclero软件包。该软件包目前在 GitHub 上提供,该过程在本教程。为了说明,我使用了一个来自教程的例子:
library(devtools)
install_github(MikkoVihtakari / sclero ,dependencies = TRUE)
library(sclero)
path< - file.path(system.file(extdata,package =sclero),shellspots.zip)
dat< - read.ijdata(path,scale = 0.7812,unit =um)
shell < - convert.ijdata(dat)
aligned< - spot.dist(shell)
plot(aligned)
也可以使用sclero软件包提供的功能添加样本点大小。请参阅教程中的第2.5节。
I have some experience with R as a statistics platform, but am inexperienced in image based maths. I have a series of photographs (tiff format, px/µm is known) with holes and irregular curves. I'd like to measure the shortest distance between a hole and the closest curve for that particular hole. I'd like to do this for each hole in a photograph. The holes are not regular either, so maybe I'd need to tell the program what are holes and what are curves (ImageJ has a point and segmented line functions).
Any ideas how to do this? Which package should I use in R? Would you recommend another program for this kind of task?
EDIT: Doing this is now possible using sclero package. The package is currently available on GitHub and the procedure is described in detail in the tutorial. Just to illustrate, I use an example from the tutorial:
library(devtools)
install_github("MikkoVihtakari/sclero", dependencies = TRUE)
library(sclero)
path <- file.path(system.file("extdata", package = "sclero"), "shellspots.zip")
dat <- read.ijdata(path, scale = 0.7812, unit = "um")
shell <- convert.ijdata(dat)
aligned <- spot.dist(shell)
plot(aligned)
It is also possible to add sample spot sizes using the functions provided by the sclero package. Please see Section 2.5 in the tutorial.
这篇关于R / ImageJ:测量点和曲线之间的最短距离的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!