antsImageTypeCast.Rd
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
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) )