def apply_window(img, ww: float, wc: float):
    """
    Apply HU window on a HU image

    Args:
        img: Image to transform
        ww: Window width
        wc: Window center
    """
    lower_bound = wc - ww / 2
    upper_bound = wc + ww / 2

    img[img < lower_bound] = lower_bound
    img[img > upper_bound] = upper_bound

    img = (img - wc) / ww * (upper_bound - lower_bound) + lower_bound

    return img