예제 #1
0
 public void initialize() {
   // add up all the features
   for (DatumFeatureSet feature_set : feature_sets) {
     feature_set.InitializeForRun(imageSetInterface);
     p += feature_set.NumFeatures();
   }
   //		System.out.println("DatumSetupForEntireRun()  p = " + numFeatures());
   InitializeFeatureTypesNamesAndColors();
 }
예제 #2
0
  private void InitializeFeatureTypesNamesAndColors() {
    feature_types = new ArrayList<FeatureType>(p);
    feature_names = new ArrayList<String>(p);
    feature_colors = new ArrayList<Color>(p);

    // now get the feature types and feature names in one shot
    int p_0 = 0;
    for (DatumFeatureSet feature_set : feature_sets) {
      // build the features into the array
      feature_set.UpdateFeatureTypes(feature_types, p_0);
      feature_set.UpdateFeatureNames(feature_names, p_0);
      feature_set.UpdateFeatureColors(feature_colors, p_0);
      // now make sure we keep track of where we are in the record to make room for other features
      p_0 += feature_set.NumFeatures();
    }
  }