OwenModel.from_elem

giant.camera_models.owen_model:

classmethod OwenModel.from_elem(elem)

This class method is used to construct a new instance of cls from an etree._Element object

This method works by first creating an initialized instance of the class. It then loops through each attribute defined in the important_attributes list and searches the element to see if it contains information about the current attribute. If the element contains information for the specified attribute, then this information is set in the initialized instance of this class. If information is not found for the current attribute, then a warning is thrown that the element does not contain all the information necessary to define the important_attributes.

Note

The user will generally not use this method and instead will use the module level load() function to retrieve a camera model from a file

Parameters:

elem (_Element) – The element containing the attribute information for the instance to be created

Returns:

An initialized instance of this class with the attributes set according to the elem object

Return type:

CameraModel