Camera.image_check

giant.camera:

Camera.image_check(data, parse_data=True, metadata_only=False)[source]

This method is used to interpret the image data that is supplied by the user (either during initialization or through the add_images() method) and ensure that it is a subclass of OpNavImage

The input to this method should be a single representation of image data (either an OpNavImage, Sequence of Sequences, numpy array, or the path to the image file) and the output will be that representation converted to an OpNavImage. If you are entering the path to the image file then you can specify the optional parse_data flag which is passed to the OpNavImage initialization function.

In general it may be desirable to override this method when the Camera class is subclassed to customize the functionality. If you simply want to use a subclass of OpNavImage with the same functionality then you can simply override the default_image_class keyword argument to the constructor of this class.

Parameters:
  • data (Path | str | Sequence[Sequence] | ndarray) – The data to be converted into an OpNavImage

  • parse_data (bool) – A flag specifying whether to attempt to automatically parse the metadata for the image

  • metadata_only (bool) – A flag to specify to only load the metadata for an image, not the image data itself.

Returns:

The image data converted into an OpNavImage or one of its subclasses

Return type:

OpNavImage