robokudo.cas ============ .. py:module:: robokudo.cas Classes ------- .. autoapisummary:: robokudo.cas.CASViews robokudo.cas.CAS Module Contents --------------- .. py:class:: CASViews Definition of the standard 'keys' for the data we want to store. .. py:attribute:: COLOR_IMAGE :value: 'color_image' .. py:attribute:: DEPTH_IMAGE :value: 'depth_image' .. py:attribute:: COLOR2DEPTH_RATIO :value: 'color2depth_ratio' .. py:attribute:: CAM_INFO :value: 'cam_info' .. py:attribute:: CAM_INTRINSIC :value: 'cam_intrinsic' .. py:attribute:: PC_CAM_INTRINSIC :value: 'pc_cam_intrinsic' .. py:attribute:: CLOUD :value: 'cloud' .. py:attribute:: CLOUD_ORGANIZED :value: 'cloud_organized' .. py:attribute:: TIMESTAMP :value: 'timestamp' .. py:attribute:: QUERY :value: 'query' .. py:attribute:: VIEWPOINT_CAM_TO_WORLD :value: 'viewpoint_cam_to_world' .. py:attribute:: VIEWPOINT_WORLD_TO_CAM :value: 'viewpoint_world_to_cam' .. py:attribute:: PLANE :value: 'plane' .. py:attribute:: OBJECT_IMAGE :value: 'object_image' .. py:attribute:: OBJECT_COLOR_MAP :value: 'object_color_map' .. py:class:: CAS The main data representation in RoboKudo. Annotators can fetch information from it and should also assert back their information back to the CAS. Each pipeline has one CAS. .. py:attribute:: timestamp .. py:attribute:: timestamp_readable .. py:attribute:: views .. py:attribute:: annotations :value: [] .. py:method:: get(view_name: str) .. py:method:: contains(view_name: str) .. py:method:: get_copy(view_name: str) .. py:method:: set(view_name: str, value) Put data in the CAS index by a given view name. This method will make a deepcopy of value. :param view_name: The name of the view which should be selected from constants in the CASView class. :param value: The value that will be placed in the CAS under view_name by making a deepcopy of it. .. py:method:: set_ref(view_name: str, value) Put data in the CAS index by a given view name. In contrast to set(), this will not make a copy but just does an assignment. :param view_name: The name of the view which should be selected from constants in the CASView class. :param value: The value that will be placed in the CAS under view_name by making assigning it. .. py:method:: filter_by_type(type_to_include, input_list) :staticmethod: .. py:method:: filter_annotations_by_type(type_to_include) .. py:method:: _filter_objects(objects, criteria) :staticmethod: Filters a list of objects based on specified criteria. :param objects: List of objects to be filtered. :param criteria: A dictionary where keys are attribute names and values are tuples containing the comparison operator as a string ("==", ">", "<", ">=", "<=") and the value to compare against. :return: A list of objects that match all specified attribute values. .. py:method:: filter_by_type_and_criteria(type_to_include, input_list, criteria: dict) Filters a list of objects based on specified criteria. Objects must be of type 'type_to_include' :param type_to_include: All the returned objects must be of this type. :param input_list: List of objects to be filtered. :param criteria: A dictionary where keys are attribute names and values are tuples containing the comparison operator as a string ("==", ">", "<", ">=", "<=") and the value to compare against. :return: A list of objects of type 'type_to_include' that match all specified attribute values.