IT++ Logo
pnm.h
Go to the documentation of this file.
1 
29 #ifndef PNM_H
30 #define PNM_H
31 
32 #include <itpp/base/mat.h>
33 #include <itpp/itexports.h>
34 
35 
36 namespace itpp
37 {
38 
51 //--------------------------------------------------------------
52 // General PNM functions
60 ITPP_EXPORT char pnm_type(const std::string & filename);
61 
72 ITPP_EXPORT bool pnm_info(const std::string & filename,
73  char & pnm_type,
74  int & width,
75  int & height,
76  int & max_val,
77  std::string & comments);
78 
79 //--------------------------------------------------------------
80 // PGM related functions (gray images)
90 ITPP_EXPORT bool pgm_read(const std::string & filename, imat & m,
91  std::string & comments);
92 
93 
104 ITPP_EXPORT bool pgm_read(const std::string & filename, imat &m,
105  int r1, int r2, int c1, int c2);
106 
107 
115 ITPP_EXPORT imat pgm_read(const std::string & filename);
116 
117 
127 ITPP_EXPORT bool pgm_write(const std::string & filename,
128  const imat &m,
129  const std::string & comments = "Generated by IT++ (http://itpp.sourceforge.net)");
130 
131 
132 //--------------------------------------------------------------
133 // PPM related functions (color images)
146 ITPP_EXPORT bool ppm_read(const std::string & filename,
147  imat &r, imat &g, imat &b,
148  std::string & comments);
149 
150 
159 ITPP_EXPORT bool ppm_read(const std::string & filename,
160  imat &r, imat &g, imat &b);
161 
162 
170 ITPP_EXPORT bool ppm_read(const std::string & filename,
171  imat &r, imat &g, imat &b,
172  int r1, int r2, int c1, int c2);
173 
185 ITPP_EXPORT bool ppm_write(const std::string & filename,
186  const imat &r,
187  const imat &g,
188  const imat &b,
189  const std::string & comments = "Generated by IT++ (http://itpp.sourceforge.net)",
190  int max_val = 255);
191 
207 ITPP_EXPORT imat img_double2int(const mat & m,
208  int max_val = 255,
209  double double_min = 0 ,
210  double double_max = 1);
211 
224 ITPP_EXPORT mat img_int2double(const imat & m,
225  int max_val = 255,
226  double double_min = 0,
227  double double_max = 1);
228 
229 } // namespace itpp
230 
231 #endif // #ifndef PNM_H
SourceForge Logo

Generated on Sat Jul 6 2013 10:54:25 for IT++ by Doxygen 1.8.2