[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

imageinfo.hxx |

1 /************************************************************************/
2 /* */
3 /* Copyright 1998-2001 by Ullrich Koethe */
4 /* Copyright 2001-2002 by Gunnar Kedenburg */
5 /* */
6 /* This file is part of the VIGRA computer vision library. */
7 /* The VIGRA Website is */
8 /* http://hci.iwr.uni-heidelberg.de/vigra/ */
9 /* Please direct questions, bug reports, and contributions to */
10 /* ullrich.koethe@iwr.uni-heidelberg.de or */
11 /* vigra@informatik.uni-hamburg.de */
12 /* */
13 /* Permission is hereby granted, free of charge, to any person */
14 /* obtaining a copy of this software and associated documentation */
15 /* files (the "Software"), to deal in the Software without */
16 /* restriction, including without limitation the rights to use, */
17 /* copy, modify, merge, publish, distribute, sublicense, and/or */
18 /* sell copies of the Software, and to permit persons to whom the */
19 /* Software is furnished to do so, subject to the following */
20 /* conditions: */
21 /* */
22 /* The above copyright notice and this permission notice shall be */
23 /* included in all copies or substantial portions of the */
24 /* Software. */
25 /* */
26 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND */
27 /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES */
28 /* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND */
29 /* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT */
30 /* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, */
31 /* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING */
32 /* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR */
33 /* OTHER DEALINGS IN THE SOFTWARE. */
34 /* */
35 /************************************************************************/
36
37 /* Modifications by Pablo d'Angelo
38 * updated to vigra 1.4 by Douglas Wilkins
39 * as of 18 February 2006:
40 * - Added UINT16 and UINT32 pixel types.
41 * - Added support for obtaining extra bands beyond RGB.
42 * - Added support for a position field that indicates the start of this
43 * image relative to some global origin.
44 * - Added support for x and y resolution fields.
45 * - Added support for ICC profiles
46 */
47
48 #ifndef VIGRA_IMAGEINFO_HXX
49 #define VIGRA_IMAGEINFO_HXX
50
51 #include <memory>
52 #include <string>
53 #include "config.hxx"
54 #include "error.hxx"
55 #include "diff2d.hxx"
56 #include "codec.hxx"
57 #include "array_vector.hxx"
58 #include "multi_iterator.hxx"
59
60 namespace vigra
61 {
62 /** \addtogroup VigraImpex Image Import/Export Facilities
63
64 supports GIF, TIFF, JPEG, BMP, EXR, HDR, PNM (PBM, PGM, PPM), PNG, SunRaster, KHOROS-VIFF formats
65 **/
66 //@{
67
68 /** \brief List the image formats VIGRA can read and write.
69
70 This is useful for creating error messages if VIGRA encounters an
71 image format it doesn't recognize.
72
73 <b> Usage:</b>
74
75 <b>\#include</b> <vigra/imageinfo.hxx><br>
76 Namespace: vigra
77
78 \code
79 std::cout << "supported formats: " << vigra::impexListFormats() << std::endl;
80 \endcode
81
82 **/
83 VIGRA_EXPORT std::string impexListFormats();
84
85 /** \brief List the file extension VIGRA understands.
86
87 This is useful for creating file dialogs that only list image files
88 VIGRA can actually import.
89
90 <b> Usage:</b>
91
92 <b>\#include</b> <vigra/imageinfo.hxx><br>
93 Namespace: vigra
94
95 \code
96 std::cout << "supported extensions: " << vigra::impexListExtensions() << std::endl;
97 \endcode
98
99 **/
100 VIGRA_EXPORT std::string impexListExtensions();
101
102 /** \brief Test whether a file is an image format known to VIGRA.
103
104 This checks the first few bytes of the file and compares them with the
105 "magic strings" of each recognized image format.
106
107 <b> Usage:</b>
108
109 <b>\#include</b> <vigra/imageinfo.hxx><br>
110 Namespace: vigra
111
112 \code
113 std::cout << "is image: " << vigra::isImage("foo.bmp") << std::endl;
114 \endcode
115
116 **/
117 VIGRA_EXPORT bool isImage(char const * filename);
118
119 /********************************************************/
120 /* */
121 /* ImageExportInfo */
122 /* */
123 /********************************************************/
124
125 /** \brief Argument object for the function exportImage().
126
127 See \ref exportImage() for usage example. This object must be used
128 to define the properties of an image to be written to disk.
129
130 <b>\#include</b> <vigra/imageinfo.hxx><br>
131 Namespace: vigra
132 **/
133 class ImageExportInfo
134 {
135 public:
136 /** Construct ImageExportInfo object.
137
138 The image will be stored under the given \a filename.
139 The file type will be guessed from the extension unless overridden
140 by \ref setFileType(). Recognized extensions: '.bmp', '.exr', '.gif',
141 '.jpeg', '.jpg', '.p7', '.png', '.pbm', '.pgm', '.pnm', '.ppm', '.ras',
142 '.tif', '.tiff', '.xv', '.hdr'.
143
144 EXR support requires libopenexr, JPEG support requires libjpeg,
145 PNG support requires libpng and TIFF support requires libtiff.
146
147 If the data is exported to TIFF, the \a mode may be "a", in which case
148 the exported image is appended to the existing file, resulting in a
149 multi-page TIFF image.
150 **/
151 VIGRA_EXPORT ImageExportInfo( const char * filename, const char * mode = "w" );
152 VIGRA_EXPORT ~ImageExportInfo();
153
154 /** Set image file name.
155
156 The file type will be guessed from the extension unless overridden
157 by \ref setFileType(). Recognized extensions: '.bmp', '.exr', '.gif',
158 '.jpeg', '.jpg', '.p7', '.png', '.pbm', '.pgm', '.pnm', '.ppm', '.ras',
159 '.tif', '.tiff', '.xv', '.hdr'.
160 EXR support requires libopenexr, JPEG support requires libjpeg,
161 PNG support requires libpng and TIFF support requires libtiff.
162 **/
163 VIGRA_EXPORT ImageExportInfo & setFileName(const char * filename);
164 VIGRA_EXPORT const char * getFileName() const;
165
166 /** Return the image file opening mode.
167 **/
168 VIGRA_EXPORT const char * getMode() const;
169
170 /** Store image as given file type.
171
172 This will override any type guessed
173 from the file name's extension. Recognized file types:
174
175 <DL>
176 <DT><b>BMP:</b><DD> Microsoft Windows bitmap image file.
177 <DT><b>EXR:</b><DD> OpenEXR high dynamic range image format.
178 (only available if libopenexr is installed)
179 <DT><b>GIF:</b><DD> CompuServe graphics interchange format; 8-bit color.
180 <DT><b>HDR:</b><DD> Radiance RGBE high dynamic range image format.
181 <DT><b>JPEG:</b><DD> Joint Photographic Experts Group JFIF format;
182 compressed 24-bit color (only available if libjpeg is installed).
183 <DT><b>PNG:</b><DD> Portable Network Graphic
184 (only available if libpng is installed).
185 <DT><b>PBM:</b><DD> Portable bitmap format (black and white).
186 <DT><b>PGM:</b><DD> Portable graymap format (gray scale).
187 <DT><b>PNM:</b><DD> Portable anymap.
188 <DT><b>PPM:</b><DD> Portable pixmap format (color).
189 <DT><b>SUN:</b><DD> SUN Rasterfile.
190 <DT><b>TIFF:</b><DD> Tagged Image File Format.
191 (only available if libtiff is installed.)
192 <DT><b>VIFF:</b><DD> Khoros Visualization image file.
193 </DL>
194
195 With the exception of TIFF, VIFF, PNG, and PNM all file types store
196 only 1 byte (gray scale and mapped RGB) or 3 bytes (RGB) per
197 pixel.
198
199 PNG can store UInt8 and UInt16 values, and supports 1 and 3 channel
200 images. One additional alpha channel is also supported.
201
202 PNM can store 1 and 3 channel images with UInt8, UInt16 and UInt32
203 values in each channel.
204
205 TIFF and VIFF are additionally able to store short and long
206 integers (2 or 4 bytes) and real values (32 bit float and
207 64 bit double) without conversion. So you will need to use
208 TIFF or VIFF if you need to store images with high
209 accuracy (the appropriate type to write is automatically
210 derived from the image type to be exported). However, many
211 other programs using TIFF (e.g. ImageMagick) have not
212 implemented support for those pixel types. So don't be
213 surprised if the generated TIFF is not readable in some
214 cases. If this happens, export the image as 'unsigned
215 char' or 'RGBValue<unsigned char>' by calling
216 \ref ImageExportInfo::setPixelType().
217
218 Support to reading and writing ICC color profiles is
219 provided for TIFF, JPEG, and PNG images.
220 **/
221 VIGRA_EXPORT ImageExportInfo & setFileType( const char * );
222 VIGRA_EXPORT const char * getFileType() const;
223
224 /** Set compression type and quality.
225
226 This option is ignored when the target file format doesn't recognize
227 the compression type. Valid arguments:
228
229 <DL>
230 <DT><b>NONE:</b><DD> (recognized by EXR and TIFF): do not compress (many other formats don't
231 compress either, but it is not an option for them).
232 <DT><b>JPEG:</b><DD> (recognized by JPEG and TIFF): use JPEG compression.
233 You can also specify a compression quality parameter by
234 passing "JPEG QUALITY=N", where "N" must be an integer between 1 and 100
235 (e.g. "JPEG QUALITY=70").
236 <DT><b>JPEG-ARITH:</b><DD> (recognized by new versions of JPEG): use arithmetic coding as a back-end
237 after JPEG compression (by default, the back-end is Huffman coding).
238 You can also specify a compression quality parameter by
239 passing "JPEG-ARITH QUALITY=N", where "N" must be an integer between 1 and 100
240 (e.g. "JPEG-ARITH QUALITY=70").
241 <DT><b>RLE, RunLength:</b><DD> (recognized by EXR and TIFF): use run-length encoding. (BMP also
242 uses run-length encoding, but there it is not an option).
243 <DT><b>PACKBITS:</b><DD> (recognized by TIFF): use packbits encoding (a variant of RLE).
244 <DT><b>DEFLATE:</b><DD> (recognized by TIFF): use deflate encoding, as defined in zlib (PNG also
245 uses deflate, but there it is not an option).
246 <DT><b>LZW:</b><DD> (recognized by TIFF): use Lempel-Ziv-Welch encoding.
247 <DT><b>ZIP:</b><DD> (recognized by EXR): use zip-style encoding.
248 <DT><b>PIZ:</b><DD> (recognized by EXR): use wavelet encoding.
249 <DT><b>PXR24:</b><DD> (recognized by EXR): reduce to 24-bit, then use zip-style encoding.
250 <DT><b>B44, B44A:</b><DD> (recognized by EXR): see OpenEXR documentation.
251 <DT><b>ASCII:</b><DD> (recognized by PNM): store pixels as ASCII (human readable numbers).
252 <DT><b>RAW:</b><DD> (recognized by PNM): store pixels as uncompressed binary data.
253 <DT><b>BILEVEL:</b><DD> (recognized by PNM): store as one bit per pixel.
254 <DT><b>1 ... 100:</b><DD> deprecated (equivalent to <tt>setCompression("JPEG QUALITY=number")</tt>
255 where the number denotes the desired quality).
256 </DL>
257
258 Some of these options (e.g. "JPEG-ARITH", "LZW", "B44", "B44A") may only be available when
259 they have been enabled in the corresponding third-party library.
260 **/
261 VIGRA_EXPORT ImageExportInfo & setCompression( const char * type);
262
263 VIGRA_EXPORT const char * getCompression() const;
264
265 /** Set the pixel type of the image file. Possible values are:
266 <DL>
267 <DT><b>UINT8:</b><DD> 8-bit unsigned integer (unsigned char)
268 <DT><b>INT16:</b><DD> 16-bit signed integer (short)
269 <DT><b>UINT16:</b><DD> 16-bit unsigned integer (unsigned short)
270 <DT><b>INT32:</b><DD> 32-bit signed integer (long)
271 <DT><b>UINT32:</b><DD> 32-bit unsigned integer (unsigned long)
272 <DT><b>FLOAT:</b><DD> 32-bit floating point (float)
273 <DT><b>DOUBLE:</b><DD> 64-bit floating point (double)
274 </DL>
275
276 <b>Usage:</b>
277
278 \code
279 FImage img(w,h);
280
281 // by default, float images are exported with pixeltype float
282 // when the target format support this type, i.e. is TIFF or VIFF.
283 exportImage(srcImageRange(img), ImageExportInfo("asFloat.tif"));
284
285 // if this is not desired, force a different pixeltype
286 exportImage(srcImageRange(img), ImageExportInfo("asByte.tif").setPixelType("UINT8"));
287 \endcode
288 **/
289 VIGRA_EXPORT ImageExportInfo & setPixelType( const char * );
290
291 /** Get the pixel type of the image. Possible values are:
292 <DL>
293 <DT><b>UINT8:</b><DD> 8-bit unsigned integer (unsigned char)
294 <DT><b>INT16:</b><DD> 16-bit signed integer (short)
295 <DT><b>INT32:</b><DD> 32-bit signed integer (long)
296 <DT><b>FLOAT:</b><DD> 32-bit floating point (float)
297 <DT><b>DOUBLE:</b><DD> 64-bit floating point (double)
298 </DL>
299 **/
300 VIGRA_EXPORT const char * getPixelType() const;
301
302 VIGRA_EXPORT ImageExportInfo & setForcedRangeMapping(double fromMin, double fromMax,
303 double toMin, double toMax);
304 VIGRA_EXPORT bool hasForcedRangeMapping() const;
305 VIGRA_EXPORT double getFromMin() const;
306 VIGRA_EXPORT double getFromMax() const;
307 VIGRA_EXPORT double getToMin() const;
308 VIGRA_EXPORT double getToMax() const;
309
310 /** Set the image resolution in horizontal direction
311 **/
312 VIGRA_EXPORT ImageExportInfo & setXResolution( float );
313 VIGRA_EXPORT float getXResolution() const;
314
315 /** Set the image resolution in vertical direction
316 **/
317 VIGRA_EXPORT ImageExportInfo & setYResolution( float );
318 VIGRA_EXPORT float getYResolution() const;
319
320 /** Set the position of the upper Left corner on a global
321 canvas.
322
323 Currently only supported by TIFF, PNG and OpenEXR files.
324
325 The offset is encoded in the XPosition and YPosition TIFF tags. TIFF
326 requires that the resolution must also be set.
327
328 @param pos position of the upper left corner in pixels
329 (must be >= 0 for TIFF)
330 **/
331 VIGRA_EXPORT ImageExportInfo & setPosition(const Diff2D & pos);
332
333 /** Get the position of the upper left corner on
334 a global canvas.
335 **/
336 VIGRA_EXPORT Diff2D getPosition() const;
337
338 /** Get the size of the canvas, on which the image is positioned at
339 getPosition()
340 **/
341 VIGRA_EXPORT Size2D getCanvasSize() const;
342
343 /** Get the size of the canvas, on which the image is positioned at
344 getPosition()
345 **/
346 VIGRA_EXPORT ImageExportInfo & setCanvasSize(const Size2D & size);
347
348 /**
349 ICC profiles (handled as raw data so far).
350 see getICCProfile()/setICCProfile()
351 **/
352 typedef ArrayVector<unsigned char> ICCProfile;
353
354 /** Returns a reference to the ICC profile.
355 */
356 VIGRA_EXPORT const ICCProfile & getICCProfile() const;
357
358 /** Sets the ICC profile.
359 ICC profiles are currently supported by TIFF, PNG and JPEG images.
360 (Otherwise, the profile data is silently ignored.)
361 **/
362 VIGRA_EXPORT ImageExportInfo & setICCProfile(const ICCProfile & profile);
363
364 private:
365 std::string m_filename, m_filetype, m_pixeltype, m_comp, m_mode;
366 float m_x_res, m_y_res;
367 Diff2D m_pos;
368 ICCProfile m_icc_profile;
369 Size2D m_canvas_size;
370 double fromMin_, fromMax_, toMin_, toMax_;
371 };
372
373 // return an encoder for a given ImageExportInfo object
374 VIGRA_EXPORT VIGRA_UNIQUE_PTR<Encoder> encoder( const ImageExportInfo & info );
375
376 /********************************************************/
377 /* */
378 /* ImageImportInfo */
379 /* */
380 /********************************************************/
381
382 /** \brief Argument object for the function importImage().
383
384 See \ref importImage() for a usage example. This object must be
385 used to read an image from disk and enquire about its properties.
386
387 <b>\#include</b> <vigra/imageinfo.hxx><br>
388 Namespace: vigra
389 **/
390 class ImageImportInfo
391 {
392 public:
393 enum PixelType { UINT8, INT16, UINT16, INT32, UINT32, FLOAT, DOUBLE };
394
395 /** Construct ImageImportInfo object.
396
397 The image with the given filename is read into memory.
398 The file type will be determined by the first few bytes of the
399 file (magic number). Recognized file types:
400
401 <DL>
402 <DT><b>BMP:</b><DD> Microsoft Windows bitmap image file.
403 <DT><b>EXR:</b><DD> OpenEXR high dynamic range image format.
404 (only available if libopenexr is installed)
405 <DT><b>GIF:</b><DD> CompuServe graphics interchange format; 8-bit color.
406 <DT><b>HDR:</b><DD> Radiance RGBE high dynamic range image format.
407 <DT><b>JPEG:</b><DD> Joint Photographic Experts Group JFIF format;
408 compressed 24-bit color (only available if libjpeg is installed).
409 <DT><b>PNG:</b><DD> Portable Network Graphic
410 (only available if libpng is installed).
411 <DT><b>PBM:</b><DD> Portable bitmap format (black and white).
412 <DT><b>PGM:</b><DD> Portable graymap format (gray scale).
413 <DT><b>PNM:</b><DD> Portable anymap.
414 <DT><b>PPM:</b><DD> Portable pixmap format (color).
415 <DT><b>SUN:</b><DD> SUN Rasterfile.
416 <DT><b>TIFF:</b><DD> Tagged Image File Format.
417 (only available if libtiff is installed.)
418 <DT><b>VIFF:</b><DD> Khoros Visualization image file.
419 </DL>
420
421 The parameter \a page can be used in conjunction with multi-page TIFF
422 files in order to specify the desired page (i.e. image) in the file.
423 **/
424 VIGRA_EXPORT ImageImportInfo( const char * filename, unsigned int page = 0 );
425 VIGRA_EXPORT ~ImageImportInfo();
426
427 VIGRA_EXPORT const char * getFileName() const;
428
429 /** Get the file type of the image associated with this
430 info object.
431
432 See ImageImportInfo::ImageImportInfo for a list of the
433 available file types.
434 **/
435 VIGRA_EXPORT const char * getFileType() const;
436
437 /** Get width of the image.
438 **/
439 VIGRA_EXPORT int width() const;
440
441 /** Get height of the image.
442 **/
443 VIGRA_EXPORT int height() const;
444
445 /** Get the total number of bands in the image.
446 **/
447 VIGRA_EXPORT int numBands() const;
448
449 /** Get the number of extra (non color) bands in the image.
450 ** Usually these are the alpha channels.
451 **/
452 VIGRA_EXPORT int numExtraBands() const;
453
454 /** Get the number of images contained in the image file.
455 **/
456 VIGRA_EXPORT int numImages() const;
457
458 /** Sets the index of the image to import from the image file.
459 **/
460 VIGRA_EXPORT void setImageIndex(const int);
461
462 /** Gets the index of the image to import from the image file.
463 **/
464 VIGRA_EXPORT int getImageIndex() const;
465
466 /** Get size of the image.
467 **/
468 VIGRA_EXPORT Size2D size() const;
469
470 /** Get size of the image in a form compatible to MultiArray.
471 **/
472 VIGRA_EXPORT MultiArrayShape<2>::type shape() const;
473
474 /** Returns true if the image is gray scale.
475 **/
476 VIGRA_EXPORT bool isGrayscale() const;
477
478 /** Returns true if the image is colored (RGB).
479 **/
480 VIGRA_EXPORT bool isColor() const;
481
482 /** Query the pixel type of the image.
483
484 Possible values are:
485 <DL>
486 <DT><b>UINT8:</b><DD> 8-bit unsigned integer (unsigned char)
487 <DT><b>INT16:</b><DD> 16-bit signed integer (short)
488 <DT><b>UINT16:</b><DD> 16-bit unsigned integer (unsigned short)
489 <DT><b>INT32:</b><DD> 32-bit signed integer (long)
490 <DT><b>UINT32:</b><DD> 32-bit unsigned integer (unsigned long)
491 <DT><b>FLOAT:</b><DD> 32-bit floating point (float)
492 <DT><b>DOUBLE:</b><DD> 64-bit floating point (double)
493 </DL>
494 **/
495 VIGRA_EXPORT const char * getPixelType() const;
496
497 /** Query the pixel type of the image.
498
499 Same as getPixelType(), but the result is returned as a
500 ImageImportInfo::PixelType enum. This is useful to implement
501 a switch() on the pixel type.
502
503 Possible values are:
504 <DL>
505 <DT><b>UINT8:</b><DD> 8-bit unsigned integer (unsigned char)
506 <DT><b>INT16:</b><DD> 16-bit signed integer (short)
507 <DT><b>UINT16:</b><DD> 16-bit unsigned integer (unsigned short)
508 <DT><b>INT32:</b><DD> 32-bit signed integer (long)
509 <DT><b>UINT32:</b><DD> 32-bit unsigned integer (unsigned long)
510 <DT><b>FLOAT:</b><DD> 32-bit floating point (float)
511 <DT><b>DOUBLE:</b><DD> 64-bit floating point (double)
512 </DL>
513 **/
514 VIGRA_EXPORT PixelType pixelType() const;
515
516 /** Returns true if the image has 1 byte per pixel (gray) or
517 3 bytes per pixel (RGB).
518 **/
519 VIGRA_EXPORT bool isByte() const;
520
521 /** Returns the layer offset of the current image, if there is one
522 **/
523 VIGRA_EXPORT Diff2D getPosition() const;
524
525 /** Get the size of the canvas, on which the image is positioned at
526 getPosition()
527 **/
528 VIGRA_EXPORT Size2D getCanvasSize() const;
529
530 /** Returns the image resolution in horizontal direction
531 **/
532 VIGRA_EXPORT float getXResolution() const;
533
534 /** Returns the image resolution in vertical direction
535 **/
536 VIGRA_EXPORT float getYResolution() const;
537
538 /**
539 ICC profiles (handled as raw data so far).
540 see getICCProfile()/setICCProfile()
541 **/
542 typedef ArrayVector<unsigned char> ICCProfile;
543
544 /** Returns a reference to the ICC profile.
545
546 Note: The reference will become invalid when the
547 ImageImportInfo object has been destroyed.
548 **/
549 VIGRA_EXPORT const ICCProfile & getICCProfile() const;
550
551 private:
552 std::string m_filename, m_filetype, m_pixeltype;
553 int m_width, m_height, m_num_bands, m_num_extra_bands, m_num_images, m_image_index;
554 float m_x_res, m_y_res;
555 Diff2D m_pos;
556 Size2D m_canvas_size;
557 ICCProfile m_icc_profile;
558
559 void readHeader_();
560 };
561
562 // return a decoder for a given ImageImportInfo object
563 VIGRA_EXPORT VIGRA_UNIQUE_PTR<Decoder> decoder( const ImageImportInfo & info );
564
565 //@}
566
567 } // namespace vigra
568
569 #endif // VIGRA_IMAGEINFO_HXX
vigra::ImageImportInfo::height
int height() const
vigra::ImageImportInfo::isGrayscale
bool isGrayscale() const
vigra::ImageExportInfo::ImageExportInfo
ImageExportInfo(const char *filename, const char *mode="w")
vigra::ImageExportInfo::setFileName
ImageExportInfo & setFileName(const char *filename)
vigra::ImageExportInfo::setYResolution
ImageExportInfo & setYResolution(float)
vigra::ImageExportInfo::getCanvasSize
Size2D getCanvasSize() const
vigra::ImageImportInfo::ICCProfile
ArrayVector< unsigned char > ICCProfile
Definition: imageinfo.hxx:542
vigra::ImageImportInfo::size
Size2D size() const
vigra::Diff2D
Two dimensional difference vector.
Definition: diff2d.hxx:185
vigra::isImage
bool isImage(char const *filename)
Test whether a file is an image format known to VIGRA.
vigra::ImageImportInfo::getPixelType
const char * getPixelType() const
vigra::ImageImportInfo::ImageImportInfo
ImageImportInfo(const char *filename, unsigned int page=0)
vigra::ImageExportInfo::getICCProfile
const ICCProfile & getICCProfile() const
vigra::Size2D
Two dimensional size object.
Definition: diff2d.hxx:482
vigra::ArrayVector< unsigned char >
vigra::MultiArrayShape
Definition: multi_fwd.hxx:63
vigra::ImageImportInfo::getFileType
const char * getFileType() const
vigra::ImageImportInfo::getICCProfile
const ICCProfile & getICCProfile() const
vigra::ImageImportInfo::isColor
bool isColor() const
vigra::ImageImportInfo::numBands
int numBands() const
vigra::ImageImportInfo::shape
MultiArrayShape< 2 >::type shape() const
vigra::ImageExportInfo::getPosition
Diff2D getPosition() const
vigra::ImageImportInfo
Argument object for the function importImage().
Definition: imageinfo.hxx:390
vigra::ImageExportInfo
Argument object for the function exportImage().
Definition: imageinfo.hxx:133
vigra::ImageImportInfo::numImages
int numImages() const
vigra::ImageExportInfo::getMode
const char * getMode() const
vigra::ImageImportInfo::getCanvasSize
Size2D getCanvasSize() const
vigra::ImageExportInfo::ICCProfile
ArrayVector< unsigned char > ICCProfile
Definition: imageinfo.hxx:352
vigra::ImageExportInfo::setXResolution
ImageExportInfo & setXResolution(float)
vigra::ImageExportInfo::setPixelType
ImageExportInfo & setPixelType(const char *)
vigra::ImageExportInfo::setICCProfile
ImageExportInfo & setICCProfile(const ICCProfile &profile)
vigra::ImageImportInfo::getImageIndex
int getImageIndex() const
vigra::ImageExportInfo::getPixelType
const char * getPixelType() const
vigra::ImageImportInfo::getYResolution
float getYResolution() const
vigra::impexListExtensions
std::string impexListExtensions()
List the file extension VIGRA understands.
vigra::ImageExportInfo::setCompression
ImageExportInfo & setCompression(const char *type)
vigra::ImageImportInfo::setImageIndex
void setImageIndex(const int)
vigra::ImageImportInfo::isByte
bool isByte() const
vigra::impexListFormats
std::string impexListFormats()
List the image formats VIGRA can read and write.
vigra::ImageExportInfo::setCanvasSize
ImageExportInfo & setCanvasSize(const Size2D &size)
vigra::ImageImportInfo::pixelType
PixelType pixelType() const
vigra::ImageExportInfo::setPosition
ImageExportInfo & setPosition(const Diff2D &pos)
vigra::ImageImportInfo::getPosition
Diff2D getPosition() const
vigra::ImageImportInfo::getXResolution
float getXResolution() const
vigra::ImageExportInfo::setFileType
ImageExportInfo & setFileType(const char *)
vigra::ImageImportInfo::numExtraBands
int numExtraBands() const
vigra::ImageImportInfo::width
int width() const

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.11.1 (Fri May 19 2017)