def pixel_threshold(self) -> torch.tensor:
        """Get the pixel-level threshold.

        If the pixel-level threshold is not set, the image-level threshold is used.

        Returns:
            float: Pixel-level threshold value.
        """
        if not self._pixel_threshold.isnan():
            return self._pixel_threshold
        return self._image_threshold if self.enable_threshold_matching else torch.tensor(float("nan"))
Get the pixel-level threshold.

        If the pixel-level threshold is not set, the image-level threshold is used.

        Returns:
            float: Pixel-level threshold value.
        
src/anomalib/post_processing/one_class.py