ui/ImageView.py
def load_moment(self, entry: EntryTreeItem):
        """
        Load pertinent data from imaged moment entry
        :param entry: Entry tree item of imaged moment
        :return: None
        """
        self.moment = entry
        if 'cached_image' not in entry.metadata.keys():  # Cache pixmap
            entry.metadata['cached_image'] = fetch_image(entry.metadata['url'])
        self.set_pixmap(entry.metadata['cached_image'])  # Set pixmap
        observation_entries = [entry.child(idx) for idx in range(entry.childCount())]
        self.observation_map = dict([(entry.metadata['uuid'], entry) for entry in observation_entries])  # observation uuid -> entry tree item
        self.enabled_observations = dict()
        for observation_entry in observation_entries:
            uuid = observation_entry.metadata['uuid']
            observation_entry.metadata['box_manager'] = BoundingBoxManager()  # Construct new bounding box manager
            observation_entry.metadata['box_manager'].set_box_click_callback(self.show_box_properties_dialog)
            self.enabled_observations[uuid] = True

        Load pertinent data from imaged moment entry
        :param entry: Entry tree item of imaged moment
        :return: None
        
Load pertinent data from imaged moment entry
Load pertinent data from imaged moment entry
def load_moment(self, entry: EntryTreeItem):
        self.moment = entry
        if 'cached_image' not in entry.metadata.keys():  
            entry.metadata['cached_image'] = fetch_image(entry.metadata['url'])
        self.set_pixmap(entry.metadata['cached_image'])  
        observation_entries = [entry.child(idx) for idx in range(entry.childCount())]
        self.observation_map = dict([(entry.metadata['uuid'], entry) for entry in observation_entries])  
        self.enabled_observations = dict()
        for observation_entry in observation_entries:
            uuid = observation_entry.metadata['uuid']
            observation_entry.metadata['box_manager'] = BoundingBoxManager()  
            observation_entry.metadata['box_manager'].set_box_click_callback(self.show_box_properties_dialog)
            self.enabled_observations[uuid] = True
def load_moment ( self , entry : EntryTreeItem ) : self . moment = entry if 'cached_image' not in entry . metadata . keys ( ) : entry . metadata [ 'cached_image' ] = fetch_image ( entry . metadata [ 'url' ] ) self . set_pixmap ( entry . metadata [ 'cached_image' ] ) observation_entries = [ entry . child ( idx ) for idx in range ( entry . childCount ( ) ) ] self . observation_map = dict ( [ ( entry . metadata [ 'uuid' ] , entry ) for entry in observation_entries ] ) self . enabled_observations = dict ( ) for observation_entry in observation_entries : uuid = observation_entry . metadata [ 'uuid' ] observation_entry . metadata [ 'box_manager' ] = BoundingBoxManager ( ) observation_entry . metadata [ 'box_manager' ] . set_box_click_callback ( self . show_box_properties_dialog ) self . enabled_observations [ uuid ] = True
Load pertinent data from imaged moment entry
Load pertinent data from imaged moment entry
"""
        Load pertinent data from imaged moment entry
        :param entry: Entry tree item of imaged moment
        :return: None
        """ # Cache pixmap # Set pixmap # observation uuid -> entry tree item # Construct new bounding box manager
None
self
entry
EntryTreeItem
Entry tree item of imaged moment
Entry tree item of imaged moment