uvaSeg | R Documentation |
Trains a variational autoencoding with a convolutional network. This is followed by k-means clustering to produce a segmentation and probabilities.
uvaSeg(
image,
model,
k,
mask,
returnProbabilities = FALSE,
batchSize = 1028,
standardize = TRUE,
verbose = FALSE
)
image |
input image |
model |
the model output from |
k |
number of clusters or cluster centers |
mask |
defining output segmentation space |
returnProbabilities |
boolean |
batchSize |
for the prediction |
standardize |
boolean controlling whether patches are standardized |
verbose |
boolean |
segmentation and probability images are output
Avants BB
## Not run:
library(ANTsR)
img <- ri( 1 ) %>% resampleImage( c(4,4) ) %>% iMath( "Normalize" )
mask = randomMask( getMask( img ), 50 )
patch = getNeighborhoodInMask( img, mask, c(3,3), boundary.condition = "NA" )
uvaSegModel = uvaSegTrain( patch, k = 6 )
tarImg = ri( 3 ) %>% resampleImage( c(4,4) )
uvaSegmentation = uvaSeg(tarImg, uvaSegModel, k = 3, getMask( tarImg ) )
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.