Utils

class pado.images.utils.Point(x, y, mpp=None)[source]

a 2D point that can optionally come with a MPP for scaling

scale(mpp)[source]

scale a point to a new mpp

Return type:

Point

class pado.images.utils.Size(x, y, mpp=None)[source]

a general 2D size that can optionally come with a MPP for scaling

scale(mpp)[source]

scale a size to a new mpp

Return type:

Size

class pado.images.utils.IntPoint(x, y, mpp=None)[source]

an integer 2D point

class pado.images.utils.IntSize(x, y, mpp=None)[source]

an integer 2D size

class pado.images.utils.MPP(x, y, rtol=0.0, atol=0.0)[source]

micrometer per pixel scaling common in pathological images

class pado.images.utils.Bounds(x0, y0, x1, y1, mpp=None)[source]

a class for rectangular bounds

Notes

p0 —- +
  • —- p1

p0: Point(x0, y0) p1: Point(x1, y1)

with: p0.x < p1.x and p0.y < p1.y

scale(mpp)[source]

scale bounds to a new mpp

Return type:

Bounds

class pado.images.utils.IntBounds(x0, y0, x1, y1, mpp=None)[source]
class pado.images.utils.Geometry(geometry, mpp=None)[source]

A general class for dealing with BaseGeometries at various MPPs.

scale(mpp)[source]

scale geometry to a new mpp

Return type:

Self

pado.images.utils.match_mpp(origin, *targets, remove_tolerance=True, raise_no_match=False)[source]

returns an MPP from potential matches or the original

Return type:

MPP