View source: R/oneHotSegmentation.R
oneHotToSegmentation | R Documentation |
Inverse of basic one-hot transformation of segmentations array
oneHotToSegmentation(oneHotArray, domainImage, channelFirstOrdering = FALSE)
oneHotArray |
an array where the channel dimension contains the one-hot encoding. |
domainImage |
image definining the geometry of the returned probability images. |
channelFirstOrdering |
Specifies the ordering of the dimensions. |
a list of probability images.
Tustison NJ
r16 <- antsImageRead( getANTsRData( "r16" ) )
seg <- kmeansSegmentation( r16, 3 )$segmentation
oneHot <- segmentationToOneHot( as.array( seg ) )
oneHotInv <- oneHotToSegmentation( oneHot, seg )
r16 <- antsImageRead( getANTsRData( "r16" ) )
seg <- kmeansSegmentation( r16, 3 )$segmentation
oneHot <- segmentationToOneHot( as.array( seg ),
channelFirstOrdering = TRUE )
oneHotInv <- oneHotToSegmentation( oneHot, seg,
channelFirstOrdering = TRUE )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.