neuralib.registration.coordinates.FieldOfView
- class neuralib.registration.coordinates.FieldOfView[source]
Bases:
objectField‑Of‑View defined by its four XY corners
- __init__(corners, rotation_ml=0.0, rotation_ap=0.0, unit='mm', *, perpendicular=True, region_name=None)
Method generated by attrs for class FieldOfView.
- Parameters:
corners (ndarray)
rotation_ml (float)
rotation_ap (float)
unit (Literal['mm', 'um'])
perpendicular (bool)
region_name (str | None)
- Return type:
None
Methods
__init__(corners[, rotation_ml, ...])Method generated by attrs for class FieldOfView.
invert_axes([ap, ml])Return a new FOV with specified axes inverted
to_polygon(**kwargs)convert corners to a matplotlib Polygon patch
to_um()Attributes
corner coordinates in order [AM, PM, PL, AL].
in-plane rotation (CCW) around the ML axis, in degrees
tilt around the AP axis (foreshortening), in degrees
unit of the corners value
imaging objective is perpendicular to the cranial windows.
optional identifier for this FOV region
anterolateral corner coordinate [x, y] in mm or µm
anteromedial corner coordinate [x, y] in mm or µm.
span along the AP axis
span along the ML axis
posterolateral corner coordinate [x, y] in mm or µm
posteromedial corner coordinate [x, y] in mm or µm
- corners: ndarray
corner coordinates in order [AM, PM, PL, AL]. Array[float, [4, 2]]
- rotation_ml: float
in-plane rotation (CCW) around the ML axis, in degrees
- rotation_ap: float
tilt around the AP axis (foreshortening), in degrees
- unit: Literal['mm', 'um']
unit of the corners value
- perpendicular: bool
imaging objective is perpendicular to the cranial windows. if True, skip rotation and tilt transforms
- region_name: str | None
optional identifier for this FOV region
- property am: ndarray
anteromedial corner coordinate [x, y] in mm or µm.
- property pm: ndarray
posteromedial corner coordinate [x, y] in mm or µm
- property pl: ndarray
posterolateral corner coordinate [x, y] in mm or µm
- property al: ndarray
anterolateral corner coordinate [x, y] in mm or µm
- property ap_distance: float
span along the AP axis
- property ml_distance: float
span along the ML axis
- invert_axes(ap=True, ml=True)[source]
Return a new FOV with specified axes inverted
- Parameters:
ap (bool) – invert anterior-posterior (Y) axis if True.
ml (bool) – invert medial-lateral (X) axis if True.
- Return type:
Self
- __init__(corners, rotation_ml=0.0, rotation_ap=0.0, unit='mm', *, perpendicular=True, region_name=None)
Method generated by attrs for class FieldOfView.
- Parameters:
corners (ndarray)
rotation_ml (float)
rotation_ap (float)
unit (Literal['mm', 'um'])
perpendicular (bool)
region_name (str | None)
- Return type:
None