read_tps#
- ktch.io.read_tps(file_path, as_frame=False)[source]#
Read landmark data from a TPS file.
- Parameters:
- file_pathstr or path-like
Path to the TPS file.
- as_framebool, default=False
If True, return a
DataFrame.
- Returns:
- resultTPSData or list of TPSData or pd.DataFrame
If
as_frame=False, returns aTPSDatafor a single specimen or a list ofTPSDatafor multiple specimens. Landmark coordinates are accessible viaTPSData.to_numpy(), and semilandmark curves via theTPSData.curvesattribute.If
as_frame=True, returns a concatenated DataFrame. When the file contains CURVES data, returns a tuple(landmarks, semilandmarks)of DataFrames.