## Not run:
# mat = matrix( rnorm(60), ncol=10 )
# smat = sparseDistanceMatrix( mat, 2 )
# r16 = antsImageRead( getANTsRData( 'r16' ) )
# mask = getMask( r16 )
# mat <- getNeighborhoodInMask(image = r16, mask = mask, radius = c(0,0),
# physical.coordinates=TRUE, spatial.info=TRUE )
# smat = sparseDistanceMatrix( t(mat$indices), 10 ) # close points
# ## End(Not run)
Run the code above in your browser using DataLab