napari-topograph/__init__.py
def update_plots() -> None:
        """
        Note that all coordinate values are in world coordinates; they correspond to
        *microns*. It is the responsibility of whoever is interacting with the image to
        convert these values from microns to pixels.
        """

        # at least one rectangle
        shapes: List[np.ndarray] = annotation_layer.data
        rects: List[np.ndarray] = [s for s in shapes if is_rectangle(s)]
        if len(rects) == 0:
            return

        # did rect change?
        rect = rects[0]
        nonlocal _rect
        if (_rect == rect).all():
            return
        _rect = np.copy(rect)

        # polygon to rectangle
        ymin, ymax = rect[:, 0].min(), rect[:, 0].max()
        ymin, ymax = int(round(ymin)), int(round(ymax)) + 1

        xmin, xmax = rect[:, 1].min(), rect[:, 1].max()
        xmin, xmax = int(round(xmin)), int(round(xmax)) + 1

        topograph_pixels.update_plots(xmin, xmax, ymin, ymax)

        Note that all coordinate values are in world coordinates; they correspond to
        *microns*. It is the responsibility of whoever is interacting with the image to
        convert these values from microns to pixels.
        
Note that all coordinate values are in world coordinates; they correspond to
microns*. It is the responsibility of whoever is interacting with the image to
convert these values from microns to pixels.
Note that all coordinate values are in world coordinates ; they correspond to microns * . It is the responsibility of whoever is interacting with the image to convert these values from microns to pixels .
def update_plots() -> None:
        shapes: List[np.ndarray] = annotation_layer.data
        rects: List[np.ndarray] = [s for s in shapes if is_rectangle(s)]
        if len(rects) == 0:
            return
        rect = rects[0]
        nonlocal _rect
        if (_rect == rect).all():
            return
        _rect = np.copy(rect)
        ymin, ymax = rect[:, 0].min(), rect[:, 0].max()
        ymin, ymax = int(round(ymin)), int(round(ymax)) + 1
        xmin, xmax = rect[:, 1].min(), rect[:, 1].max()
        xmin, xmax = int(round(xmin)), int(round(xmax)) + 1
        topograph_pixels.update_plots(xmin, xmax, ymin, ymax)
def update_plots ( ) -> None : shapes : List [ np . ndarray ] = annotation_layer . data rects : List [ np . ndarray ] = [ s for s in shapes if is_rectangle ( s ) ] if len ( rects ) == 0 : return rect = rects [ 0 ] nonlocal _rect if ( _rect == rect ) . all ( ) : return _rect = np . copy ( rect ) ymin , ymax = rect [ : , 0 ] . min ( ) , rect [ : , 0 ] . max ( ) ymin , ymax = int ( round ( ymin ) ) , int ( round ( ymax ) ) + 1 xmin , xmax = rect [ : , 1 ] . min ( ) , rect [ : , 1 ] . max ( ) xmin , xmax = int ( round ( xmin ) ) , int ( round ( xmax ) ) + 1 topograph_pixels . update_plots ( xmin , xmax , ymin , ymax )
Note that all coordinate values are in world coordinates; they correspond to
microns*.
Note that all coordinate values are in world coordinates ; they correspond to microns * .
"""
        Note that all coordinate values are in world coordinates; they correspond to
        *microns*. It is the responsibility of whoever is interacting with the image to
        convert these values from microns to pixels.
        """ # at least one rectangle # did rect change? # polygon to rectangle