Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

csuCommonFile.h

Go to the documentation of this file.
00001 
00012 #ifndef CSU_FILE_COMMON_INCLUDED
00013 #define CSU_FILE_COMMON_INCLUDED
00014 
00015 #include "csuCommon.h"
00016 namespace csu{
00017 /* A ListOfStrings is simply an array of char pointers. */
00018 
00019 typedef char** ListOfStrings;
00020 
00044 typedef struct image_list_node {
00045     char* filename;
00046     int imageIndex;
00047     struct image_list_node* next_replicate;
00048     struct image_list_node* next_subject;
00049 }
00050 ImageList;
00051 
00052 /* Function Prototypes */
00053 
00054 char *makePath (const char *directoryName, const char *fileName);
00055 void checkWriteableDirectory (const char *directory, const char *message);
00056 void checkReadableDirectory (const char *directory, const char *message);
00057 void checkReadableFile (const char *file, const char *message);
00058 
00059 ListOfStrings readListOfStrings (const char *fileName, int *nStrings);
00060 void freeListOfStrings (ListOfStrings list);
00061 
00062 void sortSubjectsBySimilarityToProbe (char *probe, ListOfStrings subjects, char *distanceMatrix, int *indices);
00063 
00064 void readFile(const char *fname, int n, Matrix images);
00065 ImageList* getImageNames(char* imageNamesFile, int *numImages);
00066 void freeImageNames (ImageList *list);
00067 Matrix readImages(char *imageNamesFile, char *imageDirectory, int *numPixels, int *numImages, int *numSubjects, ImageList **srt);
00068 void readFile(const char *fname, int n, Matrix images);
00069 
00070 int numImageInImageList(ImageList *srt);
00071 int autoFileLength(const char* imageName);
00072 
00073 float *readFeretRaster(const char *fn, int numpix);
00074 float *writeFeretRaster(const char *fn, float *data, int numpix);
00075 
00076 unsigned char *readImagePGM(const char *filename, int *w, int *h, int verbose);
00077 void writeImagePGM(const char *fn, float *data, int numpix, int w, int h);
00078 }
00079 #endif /* CSU_FILE_COMMON_INCLUDED */
00080 
00081 
00082 
00083 

Generated on Wed Apr 23 10:42:33 2003 for BioFilter by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002