View source: R/antsImageTypeCast.R
antsImageTypeCast | R Documentation |
Cast images to either a passed pixeltype or the most precise of the inputs
antsImageTypeCast(imageList, pixeltype = NA)
imageList |
list of images |
pixeltype |
to cast to |
list of antsImages
J Duda
img <- antsImageRead(getANTsRData("rand")) %>% resampleImage(c(32, 32))
img2 <- antsImageRead(getANTsRData("rand"), pixeltype = "double") %>%
resampleImage(c(32, 32))
allDoubles <- antsImageTypeCast(list(img, img2))
floats <- antsImageTypeCast(list(img))
pixeltype(img) <- "unsigned int"
ints <- antsImageTypeCast(list(img))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.