<commit_before>"""Annotate the segmented tissue."""

from jicbioimage.core.transform import transformation
from jicbioimage.illustrate import AnnotatedImage
from jicbioimage.core.util.array import _pretty_color

from align import find_angle
from util import argparse_get_image
from segment import segment
from transform import rotate

@transformation
def annotate(image):
    """Return annotated image."""
    segmentation, angle = segment(image)

    image = rotate(image, angle)
    annotation = AnnotatedImage.from_grayscale(image)
    for i in segmentation.identifiers:
        region = segmentation.region_by_identifier(i)
        color = _pretty_color()
        annotation.mask_region(region.border, color)
    return annotation

def main():
    image = argparse_get_image()
    annotate(image)
    

<commit_msg>Made the annoation outline thicker.<commit_after>"""Annotate the segmented tissue."""

from jicbioimage.core.transform import transformation
from jicbioimage.illustrate import AnnotatedImage
from jicbioimage.core.util.array import _pretty_color

from align import find_angle
from util import argparse_get_image
from segment import segment
from transform import rotate

@transformation
def annotate(image):
    """Return annotated image."""
    segmentation, angle = segment(image)

    image = rotate(image, angle)
    annotation = AnnotatedImage.from_grayscale(image)
    for i in segmentation.identifiers:
        region = segmentation.region_by_identifier(i)
        color = _pretty_color()
        annotation.mask_region(region.border.dilate(), color)
    return annotation

def main():
    image = argparse_get_image()
    annotate(image)
    


{'fraction_non_alphanumeric': 0.07549430796884361, 'fraction_numerical': 0.0, 'mean_word_length': 4.475409836065574, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4359485', 'n_tokens_mistral': 493, 'n_tokens_neox': 456, 'n_words': 130}