<commit_before>package pl.edu.misztal.JImageStreamToolkit.plugins.color;

import pl.edu.misztal.JImageStreamToolkit.image.Image;
import pl.edu.uj.JImageStream.collectors.BufferedImageCollector;
import pl.edu.uj.JImageStream.filters.statistical.CLAHEFilter;

public class CLAHistogramEqualization {

    private int BINS = 255;
    private int BLOCK_RADIUS = 63;
    private double SLOPE = 6.0;

    public CLAHistogramEqualization() {
    }

    public CLAHistogramEqualization(double slope, int blockRadius, int bins) {
        this.SLOPE = slope;
        this.BLOCK_RADIUS = blockRadius;
        this.BINS = bins;
    }

    protected void process(Image imgIn, Image imgOut) {
        imgOut.setBufferedImage(
                imgIn.parallelStream()
                        .apply(new CLAHEFilter(this.SLOPE, this.BLOCK_RADIUS, this.BINS))
                        .collect(new BufferedImageCollector())
        );
    }
}
<commit_msg>CLAHE<commit_after>package pl.edu.misztal.JImageStreamToolkit.plugins.color;

import pl.edu.misztal.JImageStreamToolkit.image.Image;
import pl.edu.misztal.JImageStreamToolkit.plugin.Plugin;
import pl.edu.uj.JImageStream.collectors.BufferedImageCollector;
import pl.edu.uj.JImageStream.filters.statistical.CLAHEFilter;

public class CLAHistogramEqualization extends Plugin {

    private int BINS = 255;
    private int BLOCK_RADIUS = 63;
    private double SLOPE = 6.0;

    public CLAHistogramEqualization() {
    }

    public CLAHistogramEqualization(double slope, int blockRadius, int bins) {
        this.SLOPE = slope;
        this.BLOCK_RADIUS = blockRadius;
        this.BINS = bins;
    }

    protected void process(Image imgIn, Image imgOut) {
        imgOut.setBufferedImage(
                imgIn.parallelStream()
                        .apply(new CLAHEFilter(this.SLOPE, this.BLOCK_RADIUS, this.BINS))
                        .collect(new BufferedImageCollector())
        );
    }
}

{'fraction_non_alphanumeric': 0.0889348500517063, 'fraction_numerical': 0.007238883143743537, 'mean_word_length': 2.87, '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': '988961', 'n_tokens_mistral': 649, 'n_tokens_neox': 585, 'n_words': 108}