Metadata Results#

The metadata helper functions return small result objects:

  • Success results are dataclasses with ok=True.

  • Failures are ResultFailure with ok=False and fields error and issues.

Issue Codes

class weitsicht.metadata.metadata_results.MetadataIssue(value)[source]#

Issue codes for metadata extraction and estimation.

IOR_FAILED = 'Metadata IOR extraction failed'#
EOR_FAILED = 'Metadata EOR extraction failed'#
MISSING_GPS = 'Metadata GPS tags missing'#
MISSING_ORIENTATION = 'Metadata orientation tags missing'#
TRANSFORMATION_FAILED = 'Metadata coordinate transformation failed'#
UNKNOWN = 'unknown'#

IOR Results

IORFromMetaResultSuccess(ok, camera, width, ...)

Successful IOR (intrinsics) estimation from metadata.

IORFromMetaResult

class weitsicht.metadata.metadata_results.IORFromMetaResultSuccess(ok: Literal[True], camera: CameraBasePerspective, width: int, height: int)[source]#

Successful IOR (intrinsics) estimation from metadata.

Parameters:
ok: Literal[True]#
camera: CameraBasePerspective#
width: int#
height: int#
__init__(ok: Literal[True], camera: CameraBasePerspective, width: int, height: int) None#
Parameters:
Return type:

None

weitsicht.metadata.metadata_results.IORFromMetaResult#

alias of IORFromMetaResultSuccess | ResultFailure[MetadataIssue]

EOR Results

EORFromMetaResultSuccess(ok, position, ...)

Successful EOR (pose) extraction from metadata.

EORFromMetaResult

class weitsicht.metadata.metadata_results.EORFromMetaResultSuccess(ok: Literal[True], position: ndarray, orientation: Rotation, crs: CRS | CompoundCRS | None)[source]#

Successful EOR (pose) extraction from metadata.

Parameters:
  • ok (Literal[True])

  • position (ndarray)

  • orientation (Rotation)

  • crs (CRS | CompoundCRS | None)

ok: Literal[True]#
position: ndarray#
orientation: Rotation#
crs: CRS | CompoundCRS | None#
__init__(ok: Literal[True], position: ndarray, orientation: Rotation, crs: CRS | CompoundCRS | None) None#
Parameters:
  • ok (Literal[True])

  • position (ndarray)

  • orientation (Rotation)

  • crs (CRS | CompoundCRS | None)

Return type:

None

weitsicht.metadata.metadata_results.EORFromMetaResult#

alias of EORFromMetaResultSuccess | ResultFailure[MetadataIssue]

Image Results

ImageFromMetaResultSuccess(ok, image, ior, eor)

Successful image build from metadata.

ImageFromMetaResult

class weitsicht.metadata.metadata_results.ImageFromMetaResultSuccess(ok: Literal[True], image: ImagePerspective, ior: IORFromMetaResultSuccess, eor: EORFromMetaResultSuccess)[source]#

Successful image build from metadata.

Parameters:
ok: Literal[True]#
image: ImagePerspective#
ior: IORFromMetaResultSuccess#
eor: EORFromMetaResultSuccess#
__init__(ok: Literal[True], image: ImagePerspective, ior: IORFromMetaResultSuccess, eor: EORFromMetaResultSuccess) None#
Parameters:
Return type:

None

weitsicht.metadata.metadata_results.ImageFromMetaResult#

alias of ImageFromMetaResultSuccess | ResultFailure[MetadataIssue]