def _visualize_full(self, image_result: ImageResult) -> np.ndarray:
        """Generate the full set of visualization for an image.

        The full visualization mode shows a grid with subplots that contain:
            - Original image
            - GT mask (if available)
            - Predicted heat map
            - Predicted segmentation mask (if available)
            - Predicted segmentations (if available)

        Args:
            image_result (ImageResult): GT and Prediction data for a single image.

        Returns:
            np.ndarray: Image showing the full set of visualizations.

        Raises:
            ValueError: If predicted mask is None for segmentation task.
        """
        image_grid = _ImageGrid()
        if self.task == TaskType.SEGMENTATION:
            if image_result.pred_mask is None:
                msg = "Image result predicted mask is None."
                raise ValueError(msg)

            image_grid.add_image(image_result.image, "Image")
            if image_result.gt_mask is not None:
                image_grid.add_image(image=image_result.gt_mask, color_map="gray", title="Ground Truth")
            image_grid.add_image(image_result.heat_map, "Predicted Heat Map")
            image_grid.add_image(image=image_result.pred_mask, color_map="gray", title="Predicted Mask")
            image_grid.add_image(image=image_result.segmentations, title="Segmentation Result")
        elif self.task == TaskType.CLASSIFICATION:
            image_grid.add_image(image_result.image, title="Image")
            if image_result.heat_map is not None:
                image_grid.add_image(image_result.heat_map, "Predicted Heat Map")
            if image_result.pred_label:
                image_classified = add_anomalous_label(image_result.image, image_result.pred_score)
            else:
                image_classified = add_normal_label(image_result.image, 1 - image_result.pred_score)
            image_grid.add_image(image=image_classified, title="Prediction")

        return image_grid.generate()
Generate the full set of visualization for an image.

        The full visualization mode shows a grid with subplots that contain:
            - Original image
            - GT mask (if available)
            - Predicted heat map
            - Predicted segmentation mask (if available)
            - Predicted segmentations (if available)

        Args:
            image_result (ImageResult): GT and Prediction data for a single image.

        Returns:
            np.ndarray: Image showing the full set of visualizations.

        Raises:
            ValueError: If predicted mask is None for segmentation task.
        
src/anomalib/utils/visualization/image.py