# creation of to volume" class objects, of "binary" modality
vol.A <- vol.create (pt000 = c(-25,-25,0), dxyz = c (1 , 1, 1),
n.ijk = c(50, 50, 1), default.value = FALSE,
ref.pseudo = "ref1",
alias = "vol.A", modality = "binary",
description = "")
vol.B <- vol.copy (vol.A,alias = "vol.B")
vol.A$vol3D.data [as.matrix(expand.grid(15:35,20:35,1))] <- TRUE
vol.A$max.pixel <- TRUE
vol.B$vol3D.data [as.matrix(expand.grid(16:36,18:37,1))] <- TRUE
vol.B$max.pixel <- TRUE
display.plane (vol.A, vol.B, interpolate = FALSE,
main = "vol.A & vol.B @ z = 0 mm")
sp.similarity.from.bin (vol.A, vol.B)
Run the code above in your browser using DataLab