extract.otf.image.3d: Title Optimal Transport Allocation and Transport between 3D...

Description Usage Arguments Value Examples

View source: R/otf.R

Description

Compute optimal transport between X and Y and create allocation and transport images

Usage

1
2
3
4
5
6
7
extract.otf.image.3d(
  from.image,
  to.image,
  mass.cost = 0,
  transport.type = 3,
  p.degree = 2
)

Arguments

from.image

3d array

to.image

3d array

mass.cost

cost of allocating or removing mass

transport.type

optimal transport mode default=3: \n 0 - Balanced (equalizes source and target mass) 1 - Add mass (Only allow addition of mass in soutrce or target) 2 - Subtract mass (Only allow subtraction of mass in source or target) 3 - Match source mass (Add or subtract in source to match target) 4 - Free (Add or subtract mass anywhere) 5 - Free source only (Add or subtract mass in source only)

p.degere

optimal transport cost degree (i.e. cost^p.degreee)

Value

list with allocation and trasnport cost images in from and to

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(brains)
otf = extract.otf.image.3d(brain1, brain2)
par(mfrow=c(2,2))
image(brain1[,,2])
title("From")
image(brain2[,,2])
title("To")
image(brain1[,,2] - brain2[,,2])
title("Difference Per Voxel")
image(otf$difference.from[,,2])
title("Mass Allocation in From")

samuelgerber/OTFeatures documentation built on Dec. 22, 2021, 10:13 p.m.