// file: $USFS/class/image_analysis/v3.0/imaga_he_03.cc
//
// system include files
//
#include <memory.h>

// isip include files
//
#include "image_analysis.h"
#include <integral_constants.h>
 
// method: pca_init_cc
//
// arguments: none
//
// return: a logical_1 value indicating status
//
// this method initializes the principal components computation.
//
logical_1 Image_analysis::pca_init_cc() {
  
  // deallocate memory if necessary
  //
  if (pca_t_data_d != (float_4*)NULL) {
    delete[] pca_t_data_d;
    pca_t_data_d = (float_4*)NULL;
  }
  
  // declare memory for the feature vector and initializing to zero
  //
  pca_t_data_d = new float_4[pca_t_values_read_d];
  
  for (int_4 i=0; i < pca_t_values_read_d; i++) {
    pca_t_data_d[i] = 0.0;
  }
  
  // clear the counters
  //
  pca_t_nimages_d = (int_4)0;
  pca_t_npxls_d = (int_4)0;
  pca_t_nblks_d = (int_4)0;
  
  // exit gracefully
  //
  return ISIP_TRUE;
}



