Total Variation Deconvolution using Split Bregman
cliio.h
Go to the documentation of this file.
1 
6 #ifndef _CLIIO_H_
7 #define _CLIIO_H_
8 
9 #include "num.h"
10 #include "imageio.h"
11 
12 #ifdef NUM_SINGLE
13 #define IMAGEIO_NUM (IMAGEIO_SINGLE)
14 #else
15 #define IMAGEIO_NUM (IMAGEIO_DOUBLE)
16 #endif
17 
19 typedef struct
20 {
22  num *Data;
24  int Width;
26  int Height;
29 } image;
30 
31 
32 int AllocImageObj(image *f, int Width, int Height, int NumChannels);
33 void FreeImageObj(image f);
34 int ReadImageObj(image *f, const char *FileName);
35 int ReadImageObjGrayscale(image *f, const char *FileName);
36 int WriteImageObj(image f, const char *FileName, int JpegQuality);
37 
38 int IsGrayscale(num *Data, int Width, int Height);
39 int GetStrToken(char *Token, const char *Start, int MaxLength, const char *Delim);
40 int ParseDouble(double *Num, const char *String);
41 int CliParseArglist(const char **Param, const char **Value,
42  char *TokenBuf, int MaxLength, int k, const char *Start,
43  int argc, const char *argv[], const char *Delimiters);
44 int CliGetNum(num *Value, const char *String, const char *Param);
45 int ReadMatrixFromTextFile(image *f, const char *FileName);
46 int ReadMatrixFromFile(image *f, const char *FileName,
47  int (*RescaleFun)(image *f));
48 
49 extern const image NullImage;
50 
51 #endif /* _CLIIO_H_ */