コード例 #1
0
    def __init__(self, image_collection, df_positions, pos_columns=['x','y'], tail_length=3, track_column='track'):
        CollectionViewer.__init__(self, image_collection)
        
        self.artists = None
        self.circle_kwargs = dict(edgecolor='r', radius=6, facecolor=None, fill=False, lw=1)
        
        self.pos_columns = pos_columns
        self.track_column = track_column
        self.df_positions = df_positions.sort_values(['frame', self.track_column])

        image = self.image_collection[0]
        
        # Use the min/max of the first image for all other images
        self.vmin_vmax = (np.min(image), np.max(image))
        
        
        self.tail_length = tail_length
        

        self.traj_colors = ["#ffbfbf", "#ced936", "#3db6f2",
                            "#6c468c", "#f2553d", "#98b386",
                            "#566573", "#a336d9", "#7f4840",
                            "#00ff00", "#0057d9", "#ffbffb",
                            "#7f3300", "#79f279", "#bfd9ff",
                            "#f200c2", "#d97736", "#1d7328",
                            "#1d3473", "#73566d", "#e6cbac",
                            "#66ccaa", "#7999f2", "#73004d",
                            "#ffaa00", "#00a7b3", "#0000f2",
                            "#ff0066", "#73561d", "#bffbff",
                            "#0000e6", "#d96c98", "#b2a159",
                            "#004d73", "#3d0073", "#73000f"]

        self.traj_colors_len = len(self.traj_colors)
        
        self.update_image(image)
コード例 #2
0
    def __init__(self, image_collection, df_positions, pos_columns=['x','y']):
        CollectionViewer.__init__(self, image_collection)
        self.df_positions = df_positions
        self.artists = None
        self.circle_kwargs = dict(edgecolor='r', radius=6, facecolor='red', fill=False, lw=1)
        
        self.pos_columns = pos_columns

        image = self.image_collection[0]
        
        # Use the min/max of the first image for all other images
        self.vmin_vmax = (np.min(image), np.max(image))
        
        self.update_image(image)