ImageTransform

class kgpy.img.coalignment.image_coalignment.ImageTransform(transform, origin, transform_func, initial_crop, initial_pad, post_transform_size, post_transform_translation, post_transform_crop)

Bases: object

Class tracking transformations done to an image during co-alignment for repeating later or for use in a forward model

Parameters:
__init__(transform, origin, transform_func, initial_crop, initial_pad, post_transform_size, post_transform_translation, post_transform_crop)
Parameters:
Return type:

None

Attributes

transform

origin

transform_func

initial_crop

initial_pad

post_transform_size

post_transform_translation

post_transform_crop

Methods

__init__(transform, origin, transform_func, ...)

coord_post_process(coords[, reverse])

coord_pre_process(coords[, reverse])

from_pickle(path)

rtype:

kgpy.img.coalignment.image_coalignment.ImageTransform

img_post_process(img)

img_pre_process(img[, reverse])

invert_quadratic_transform(img)

Given a transformation object and the originally transformed image the transformation step can be inverted using this routine.

to_pickle(path)

transform_coordinates(coords)

If you only want the transformed coordinates and not the transformed images to avoid extra interpolation.

transform_image(img)

Take in image and perform all transformation operations stored in the ImageTransform object.

Inheritance Diagram

digraph inheritance003c69d290 { bgcolor=transparent; rankdir=TB; size="8.0, 12.0"; "kgpy.img.coalignment.image_coalignment.ImageTransform" [URL="kgpy.img.coalignment.image_coalignment.ImageTransform.html#kgpy.img.coalignment.image_coalignment.ImageTransform",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Class tracking transformations done to an image during co-alignment for repeating later or for use in a forward model"]; }
coord_post_process(coords, reverse=None)
coord_pre_process(coords, reverse=None)
static from_pickle(path)
Return type:

kgpy.img.coalignment.image_coalignment.ImageTransform

Parameters:

path (Path) –

img_post_process(img)
img_pre_process(img, reverse=None)
invert_quadratic_transform(img)

Given a transformation object and the originally transformed image the transformation step can be inverted using this routine.

Return type:

numpy.ndarray

to_pickle(path)
Parameters:

path (Path) –

transform_coordinates(coords)

If you only want the transformed coordinates and not the transformed images to avoid extra interpolation.

Return type:

numpy.ndarray

transform_image(img)

Take in image and perform all transformation operations stored in the ImageTransform object.

Return type:

numpy.ndarray

initial_crop: typing.Tuple[slice, ...]
initial_pad: typing.Tuple[typing.Tuple[int, int], ...]
origin: numpy.ndarray
post_transform_crop: tuple
post_transform_size: tuple
post_transform_translation: numpy.ndarray
transform: numpy.ndarray
transform_func: typing.Callable