package yi.iu.processor;

import java.awt.*;
import java.io.*;
import yi.iu.SImage;

public abstract class ImageProcessor
{
    public boolean VERBOSE= false;              //control the instances
    public static boolean _VERBOSE= false;      //control the static functions
    public ImageProcessor() {}
    
    // basic operations
    abstract public int[] getProcessed(int[] source, Dimension d);
    abstract public int[] getProcessedPseudoColor(int[] source, Dimension d);
    public SImage getProcessed(SImage i) {
        int source[]=i.data;
        Dimension d= new Dimension(i.width, i.height);
        int rst[]=getProcessed(source, d);
        return new SImage(d.width, d.height, SImage.RGB, rst);
    }
    
    // about the arguments
    public int getArguNum() { return 0;}
    public void setArgument(int i, String s) {}
    public String getArgument(int i) {return null;}
    public String getArguName(int i) {return null;}
    
    // turn on/off the verbose
    public void setVerbose(boolean b) {VERBOSE=b;}
}