verifyPith {CTRing} | R Documentation |
Check if pith location is correct
Description
Check if pith location is correct
Usage
verifyPith(im, pith_coord)
Arguments
im |
Density matrix of image |
pith_coord |
Pith coordinates |
Value
Corrected pith coordinates
Examples
library(oro.dicom)
file_path <- system.file("extdata", "disk.dcm", package = "CTRing")
dcm <- readDICOM(file_path)
hdr_df <- dcm$hdr[[1]]
image_info <- getImageInfo(hdr = hdr_df)
im <- imageToMatrix(dcm$img)
im_8bit <- xBitTo8Bit(im, image_info$grayScale)
im_dens <- grayToDensity(im_8bit)
pith_coord <- detect_pith(im_dens, n_segments = 12, pixel = TRUE, toPlot = FALSE)
pith_coord_checked <- verifyPith(im_dens, pith_coord)
[Package CTRing version 0.1.0 Index]