package yi.iu.imgdb.learn;

import java.util.*;
import java.awt.Dimension;

public abstract class RgnFeatureRepresentationList
    extends FeatureRepresentationList implements
    FeatureScoreDemoable, ImageDemoCapable
//    , FeaturePickDemoable
{
  static final long serialVersionUID = 1339824853806282256L;

  public int imgWidth;
  public int imgHeight;

  /**
   * @param image_width
   * @param image_height
   */
  public RgnFeatureRepresentationList(int ft_dim, int image_width,
                                      int image_height) {
    super(ft_dim);
    imgWidth = image_width;
    imgHeight = image_height;
  }

  public RgnFeatureRepresentationList(double[][] data, int ft_dim, int image_width, int image_height) {
    super(data, ft_dim);
    imgWidth = image_width;
    imgHeight = image_height;
  }

  public int[] graphicDemo(Dimension d) {
    d.width = imgWidth; d.height = imgHeight;

    int[] pixels = drawScoreDemo(
        null,
        new FeatureScoringCapable() { // a inner class give sequence score
          int count = 1;
          public double getFeatureScore(double[] feature, Object obj) {
            return count++;
          }
        }
        , 0, 1);
    return yi.util.ImageUtil.makeNewImageFromLabel(pixels, true);
  }

  public int[] colorDemo(Dimension d) {
    return null;
  }


}