00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 3 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * Written (W) 1999-2008 Soeren Sonnenburg 00008 * Copyright (C) 1999-2008 Fraunhofer Institute FIRST and Max-Planck-Society 00009 */ 00010 00011 #ifndef _DREALFILEFEATURES__H__ 00012 #define _DREALFILEFEATURES__H__ 00013 00014 #include "lib/common.h" 00015 #include "features/RealFeatures.h" 00016 00021 class CRealFileFeatures: public CRealFeatures 00022 { 00023 public: 00029 CRealFileFeatures(int32_t size, FILE* file); 00030 00036 CRealFileFeatures(int32_t size, char* filename); 00037 00039 CRealFileFeatures(const CRealFileFeatures& orig); 00040 00041 virtual ~CRealFileFeatures(); 00042 00047 virtual float64_t* load_feature_matrix(); 00048 00054 int32_t get_label(int32_t idx); 00055 00056 protected: 00064 virtual float64_t* compute_feature_vector( 00065 int32_t num, int32_t& len, float64_t* target=NULL); 00066 00071 bool load_base_data(); 00072 00074 FILE* working_file; 00076 char* working_filename; 00078 bool status; 00080 int32_t* labels; 00081 00083 uint8_t intlen; 00085 uint8_t doublelen; 00087 uint32_t endian; 00089 uint32_t fourcc; 00091 uint32_t preprocd; 00093 int64_t filepos; 00094 }; 00095 #endif