package com.cringe_studios.christmastreescanning.scanning;

import java.awt.geom.Point2D;
import java.awt.image.BufferedImage;

import com.cringe_studios.christmastreescanning.scanning.image_scanning.ImageScanner;

public class MultiColoredSideScanner extends SideScanner{
	private BufferedImage sideImagesRed[];
	private BufferedImage sideImagesGreen[];
	private BufferedImage sideImagesBlue[];
	
	byte gammaDelta = ImageScanner.GAMMA_DELTA_DEFAULT;
	
	Point2D foundPoints[] = null;
	
	public MultiColoredSideScanner(BufferedImage[] imagesRed, BufferedImage[] imagesGreen, BufferedImage[] imagesBlue, byte gammaDelta) {
		if(!(imagesRed.length == imagesGreen.length && imagesGreen.length == imagesBlue.length)); // TODO error
		this.sideImagesRed = imagesRed;
		this.sideImagesGreen = imagesGreen;
		this.sideImagesBlue = imagesBlue;
		
		this.gammaDelta = gammaDelta;
	}
	
	public MultiColoredSideScanner(BufferedImage[] imagesRed, BufferedImage[] imagesGreen, BufferedImage[] imagesBlue) {
		if(!(imagesRed.length == imagesGreen.length && imagesGreen.length == imagesBlue.length)); // TODO error
		
		this.sideImagesRed = imagesRed;
		this.sideImagesGreen = imagesGreen;
		this.sideImagesBlue = imagesBlue;
	}
	
	@Override
	public void scan() {
		int imagesLength = this.sideImagesRed.length;	
		
		foundPoints = new Point2D[imagesLength];
		
		for(int i = 0; i < imagesLength; i++) {
			//TODO
			//foundPoints[i] = ImageScanner.getBrightestSpot(this.sideImagesRed[i], this.sideImagesGreen[i], this.sideImagesBlue[i], this.gammaDelta);
		}
	}
	
	@Override
	public Point2D[] getPoints() {
		return foundPoints;
	}
}
