dvpio.read.shapes.read_lmd#
- dvpio.read.shapes.read_lmd(path, calibration_points_image, transformation_type='similarity')#
Read and parse LMD-formatted masks for the use in spatialdata
Wrapper for pyLMD functions.
- Parameters:
path (
str) – Path to LMD-formatted segmentation masks in .xml formatcalibration_points_image (
PointsModel) – Calibration points of the image as DataFrame, with 3 calibration points. Point coordinates are stored as seperate columns inxandycolumn.transformation_type (
Literal['similarity','affine','euclidean'] (default:'similarity')) –- affine
Full affine transformation (scaling, rotation/reflexion, translation, shearing). This operation does not preserve the angles within or distances the shapes
- similarity (recommended)
Similarity transformation. Compared to an affine transformation, a similarity transformation constraints the solution space to scaling, rotations, reflections, and translations, i.e. angles of shapes are retained. If you only want to map between image and microscopy coordinates only the subset of similarity transformations (scaling, rotation, reflection, translation) is required.
- euclidean (Rigid transform)
Only translation and rotation are allowed
- Return type:
- Returns:
spatialdata.models.ShapesModelTransformed shapes in image coordinates.Object has special attributes
attrs.transformationglobal(image coordinates)to_lmdTransformation back to leica coordinate system