Skip to content

Renderer

Renderer(rigid=None, affine=None, tilesize=None, clip=False, blend=10)

Rendering of tiles with rigid of affine placement

Parameters:

Name Type Description Default
rigid Optional[Dict[Tuple, Tuple]]

dictionary of tile positions (from Placement.rigid())

None
affine Optional[Dict[Tuple, Affine]]

dictionary of affine transforms (from Placement.affine())

None
tilesize Dict[Tuple, Tuple] or Tuple

either a (W, H) tuple if all tiles have same dimensions, or a dictionary mapping tile IDs to (W, H) tuples to specify dimensions on a per-tile basis

None
clip ArrayLike or bool

An optional [x0, y0, w, h] bounding box in model space. If not given, the full extent covered by the source images is used. Clip may also be a single boolean True to automatically clip to the intersection of all images.

False
blend float

radius of blending between overlapping tiles. Set to zero for hard edge.

10

Either rigid or affine must be given, not both.

Use the render method to render a source image into model space.

Use the clear method between z-levels.

Use the image property to retrieve results.

image = None

The blended image

Only valid after calling render for all relevant tiles.

clear()

Reset the image in preparation for rendering another z-level

render(tile, img)

Render a tile into model space

Parameters:

Name Type Description Default
tile Tuple

ID of the tile

required
img ArrayLike

Image for the tile

required

The image is rendered with either pure translation or an affine transformation, depending on how the Renderer was constructed.