Camera.image_check¶
- 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 ofOpNavImage
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 anOpNavImage
. If you are entering the path to the image file then you can specify the optionalparse_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 ofOpNavImage
with the same functionality then you can simply override thedefault_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: