bioformats  5.1.3
Tags.h
1 /*
2  * #%L
3  * OME-BIOFORMATS C++ library for image IO.
4  * Copyright © 2006 - 2015 Open Microscopy Environment:
5  * - Massachusetts Institute of Technology
6  * - National Institutes of Health
7  * - University of Dundee
8  * - Board of Regents of the University of Wisconsin-Madison
9  * - Glencoe Software, Inc.
10  * %%
11  * Redistribution and use in source and binary forms, with or without
12  * modification, are permitted provided that the following conditions are met:
13  *
14  * 1. Redistributions of source code must retain the above copyright notice,
15  * this list of conditions and the following disclaimer.
16  * 2. Redistributions in binary form must reproduce the above copyright notice,
17  * this list of conditions and the following disclaimer in the documentation
18  * and/or other materials provided with the distribution.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
24  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30  * POSSIBILITY OF SUCH DAMAGE.
31  *
32  * The views and conclusions contained in the software and documentation are
33  * those of the authors and should not be interpreted as representing official
34  * policies, either expressed or implied, of any organization.
35  * #L%
36  */
37 
38 #ifndef OME_BIOFORMATS_TIFF_TAGS_H
39 #define OME_BIOFORMATS_TIFF_TAGS_H
40 
41 #include <string>
42 #include <vector>
43 
44 #include <ome/bioformats/tiff/Types.h>
45 
46 #include <ome/compat/memory.h>
47 
48 #include <ome/compat/array.h>
49 #include <ome/compat/cstdint.h>
50 
51 namespace ome
52 {
53  namespace bioformats
54  {
55  namespace tiff
56  {
57 
58  class TIFF;
59 
62  {
69  MAKE,
74  };
75 
78  {
80  };
81 
84  {
99  };
100 
103  {
105  };
106 
109  {
111  };
112 
115  {
117  };
118 
121  {
123  };
124 
127  {
129  };
130 
133  {
135  };
136 
139  {
141  };
142 
145  {
147  };
148 
151  {
153  };
154 
157  {
159  };
160 
163  {
168  };
169 
172  {
174  };
175 
178  {
180  };
181 
184  {
187  };
188 
191  {
206  };
207 
210  {
213  };
214 
217  {
225  };
226 
229  {
235  };
236 
239  {
244  };
245 
248  {
250  };
251 
254  {
256  };
257 
260  {
263  };
264 
265  /*
266  * Tags which are known but not currently wrapped.
267  *
268  * OSUBFILETYPE, ///< Type of data in this subfile [old tag].
269  * COLORRESPONSEUNIT, ///<
270  * SMINSAMPLEVALUE, ///<
271  * SMAXSAMPLEVALUE, ///<
272  * CLIPPATH, ///<
273  * XCLIPPATHUNITS, ///<
274  * YCLIPPATHUNITS, ///<
275  * OPIPROXY, ///<
276  * GLOBALPARAMETERSIFD, ///<
277  * PROFILETYPE, ///<
278  * FAXPROFILE, ///<
279  * CODINGMETHODS, ///<
280  * VERSIONYEAR, ///<
281  * MODENUMBER, ///<
282  * DECODE, ///<
283  * IMAGEBASECOLOR, ///<
284  * T82OPTIONS, ///<
285  * JPEGPROC, ///<
286  * JPEGIFOFFSET, ///<
287  * JPEGIFBYTECOUNT, ///<
288  * JPEGRESTARTINTERVAL, ///<
289  * JPEGLOSSLESSPREDICTORS, ///<
290  * JPEGPOINTTRANSFORM, ///<
291  * JPEGQTABLES, ///<
292  * JPEGDCTABLES, ///<
293  * JPEGACTABLES, ///<
294  * STRIPROWCOUNTS, ///<
295  * OPIIMAGEID, ///< Full pathname or identifier of original image (OPI).
296  * REFPTS, ///<
297  * REGIONTACKPOINT, ///<
298  * REGIONWARPCORNERS, ///<
299  * REGIONAFFINE, ///<
300  * PIXAR_IMAGEFULLLENGTH, ///<
301  * PIXAR_IMAGEFULLWIDTH, ///<
302  * PIXAR_TEXTUREFORMAT, ///<
303  * PIXAR_WRAPMODES, ///<
304  * PIXAR_FOVCOT, ///<
305  * PIXAR_MATRIX_WORLDTOSCREEN, ///<
306  * PIXAR_MATRIX_WORLDTOCAMERA, ///<
307  * WRITERSERIALNUMBER, ///<
308  * IT8SITE, ///<
309  * IT8COLORSEQUENCE, ///<
310  * IT8HEADER, ///<
311  * IT8RASTERPADDING, ///<
312  * IT8BITSPERRUNLENGTH, ///<
313  * IT8BITSPEREXTENDEDRUNLENGTH, ///<
314  * IT8COLORTABLE, ///<
315  * IT8IMAGECOLORINDICATOR, ///<
316  * IT8BKGCOLORINDICATOR, ///<
317  * IT8IMAGECOLORVALUE, ///<
318  * IT8BKGCOLORVALUE, ///<
319  * IT8PIXELINTENSITYRANGE, ///<
320  * IT8TRANSPARENCYINDICATOR, ///<
321  * IT8COLORCHARACTERIZATION, ///<
322  * IT8HCUSAGE, ///<
323  * IT8TRAPINDICATOR, ///<
324  * IT8CMYKEQUIVALENT, ///<
325  * FRAMECOUNT, ///<
326  * EXIFIFD, ///<
327  * IMAGELAYER, ///< Background, mask and foreground layers from RFC2301.
328  * JBIGOPTIONS, ///<
329  * GPSIFD, ///<
330  * FAXRECVPARAMS, ///<
331  * FAXSUBADDRESS, ///<
332  * FAXRECVTIME, ///<
333  * FAXDCS, ///<
334  * STONITS, ///<
335  * FEDEX_EDR, ///<
336  * INTEROPERABILITYIFD, ///<
337  * DNGVERSION, ///<
338  * DNGBACKWARDVERSION, ///<
339  * UNIQUECAMERAMODEL, ///<
340  * LOCALIZEDCAMERAMODEL, ///<
341  * CFAPLANECOLOR, ///<
342  * CFALAYOUT, ///<
343  * LINEARIZATIONTABLE, ///<
344  * BLACKLEVELREPEATDIM, ///<
345  * BLACKLEVEL, ///<
346  * BLACKLEVELDELTAH, ///<
347  * BLACKLEVELDELTAV, ///<
348  * WHITELEVEL, ///<
349  * DEFAULTSCALE, ///<
350  * DEFAULTCROPORIGIN, ///<
351  * DEFAULTCROPSIZE, ///<
352  * COLORMATRIX1, ///<
353  * COLORMATRIX2, ///<
354  * CAMERACALIBRATION1, ///<
355  * CAMERACALIBRATION2, ///<
356  * REDUCTIONMATRIX1, ///<
357  * REDUCTIONMATRIX2, ///<
358  * ANALOGBALANCE, ///<
359  * ASSHOTNEUTRAL, ///<
360  * ASSHOTWHITEXY, ///<
361  * BASELINEEXPOSURE, ///<
362  * BASELINENOISE, ///<
363  * BASELINESHARPNESS, ///<
364  * BAYERGREENSPLIT, ///<
365  * LINEARRESPONSELIMIT, ///<
366  * CAMERASERIALNUMBER, ///<
367  * LENSINFO, ///<
368  * CHROMABLURRADIUS, ///<
369  * ANTIALIASSTRENGTH, ///<
370  * SHADOWSCALE, ///<
371  * DNGPRIVATEDATA, ///<
372  * MAKERNOTESAFETY, ///<
373  * CALIBRATIONILLUMINANT1, ///<
374  * CALIBRATIONILLUMINANT2, ///<
375  * BESTQUALITYSCALE, ///<
376  * RAWDATAUNIQUEID, ///<
377  * ORIGINALRAWFILENAME, ///<
378  * ORIGINALRAWFILEDATA, ///<
379  * ACTIVEAREA, ///<
380  * MASKEDAREAS, ///<
381  * ASSHOTICCPROFILE, ///<
382  * ASSHOTPREPROFILEMATRIX, ///<
383  * CURRENTICCPROFILE, ///<
384  * CURRENTPREPROFILEMATRIX, ///<
385  * DCSHUESHIFTVALUES, ///<
386  * FAXMODE, ///<
387  * JPEGQUALITY, ///<
388  * JPEGCOLORMODE, ///<
389  * JPEGTABLESMODE, ///<
390  * FAXFILLFUNC, ///<
391  * PIXARLOGDATAFMT, ///<
392  * DCSIMAGERTYPE, ///<
393  * DCSINTERPMODE, ///<
394  * DCSBALANCEARRAY, ///<
395  * DCSCORRECTMATRIX, ///<
396  * DCSGAMMA, ///<
397  * DCSTOESHOULDERPTS, ///<
398  * DCSCALIBRATIONFD, ///<
399  * ZIPQUALITY, ///<
400  * PIXARLOGQUALITY, ///<
401  * DCSCLIPRECTANGLE, ///<
402  * SGILOGDATAFMT, ///<
403  * SGILOGENCODE, ///<
404  * LZMAPRESET, ///<
405  * PERSAMPLE ///<
406  */
407 
414  tag_type
416 
418  tag_type
420 
422  tag_type
424 
426  tag_type
428 
430  tag_type
432 
434  tag_type
436 
438  tag_type
440 
442  tag_type
444 
446  tag_type
448 
450  tag_type
452 
454  tag_type
456 
458  tag_type
460 
462  tag_type
464 
466  tag_type
468 
470  tag_type
472 
474  tag_type
476 
478  tag_type
480 
482  tag_type
484 
486  tag_type
488 
490  tag_type
492 
494  tag_type
496 
498  tag_type
500 
502  tag_type
504 
506  tag_type
508 
510  tag_type
512 
513  }
514 
515  namespace detail
516  {
520  namespace tiff
521  {
522 
527  template<typename TagCategory>
529 
531  template<>
533  {
535  typedef std::string value_type;
536  };
537 
539  template<>
541  {
543  typedef std::vector<std::string> value_type;
544  };
545 
547  template<>
549  {
551  typedef uint16_t value_type;
552  };
553 
555  template<>
557  {
559  typedef std::vector<uint16_t> value_type;
560  };
561 
563  template<>
565  {
567  typedef ::ome::bioformats::tiff::Compression value_type;
568  };
569 
571  template<>
573  {
575  typedef ::ome::bioformats::tiff::FillOrder value_type;
576  };
577 
579  template<>
581  {
583  typedef ::ome::bioformats::tiff::Orientation value_type;
584  };
585 
587  template<>
589  {
591  typedef ::ome::bioformats::tiff::PhotometricInterpretation value_type;
592  };
593 
595  template<>
597  {
599  typedef ::ome::bioformats::tiff::PlanarConfiguration value_type;
600  };
601 
603  template<>
605  {
607  typedef ::ome::bioformats::tiff::Predictor value_type;
608  };
609 
611  template<>
613  {
615  typedef ::ome::bioformats::tiff::SampleFormat value_type;
616  };
617 
619  template<>
621  {
623  typedef ::ome::bioformats::tiff::Threshholding value_type;
624  };
625 
627  template<>
629  {
631  typedef ::ome::bioformats::tiff::YCbCrPosition value_type;
632  };
633 
635  template<>
637  {
639  typedef ome::compat::array<uint16_t, 2> value_type;
640  };
641 
643  template<>
645  {
647  typedef ome::compat::array<uint16_t, 6> value_type;
648  };
649 
651  template<>
653  {
655  typedef std::vector< ::ome::bioformats::tiff::ExtraSamples> value_type;
656  };
657 
659  template<>
661  {
663  typedef ome::compat::array<std::vector<uint16_t>, 3> value_type;
664  };
665 
667  template<>
669  {
671  typedef uint32_t value_type;
672  };
673 
675  template<>
677  {
679  typedef std::vector<uint32_t> value_type;
680  };
681 
683  template<>
685  {
687  typedef std::vector<uint64_t> value_type;
688  };
689 
691  template<>
693  {
695  typedef std::vector<uint8_t> value_type;
696  };
697 
699  template<>
701  {
703  typedef float value_type;
704  };
705 
707  template<>
709  {
711  typedef ome::compat::array<float, 2> value_type;
712  };
713 
715  template<>
717  {
719  typedef ome::compat::array<float, 3> value_type;
720  };
721 
723  template<>
725  {
727  typedef ome::compat::array<float, 6> value_type;
728  };
729 
730  }
731  }
732  }
733 }
734 
735 #endif // OME_BIOFORMATS_TIFF_TAGS_H
736 
737 /*
738  * Local Variables:
739  * mode:C++
740  * End:
741  */
::ome::bioformats::tiff::Predictor value_type
uint16_t type.
Definition: Tags.h:607
UInt16YCbCrPosition1
YCbCrPosition enum fields.
Definition: Tags.h:156
Name of the document from which the image originated.
Definition: Tags.h:66
Tile depth in pixels (z planes).
Definition: Tags.h:203
Chromaticities of primary colours as 1931 CIE R(xy) G(xy) B(xy).
Definition: Tags.h:261
ICC profile data.
Definition: Tags.h:230
Number of bytes in each tile (after compression).
Definition: Tags.h:223
Memory type substitution.
ome::compat::array< float, 3 > value_type
float array type.
Definition: Tags.h:719
Description of the image.
Definition: Tags.h:68
::ome::bioformats::tiff::PhotometricInterpretation value_type
uint16_t type.
Definition: Tags.h:591
UInt16Tag2
Unsigned 16-bit integer (×2) fields.
Definition: Tags.h:162
Tile height in pixels (rows).
Definition: Tags.h:204
UInt16Predictor1
Predictor enum fields.
Definition: Tags.h:138
ome::compat::array< std::vector< uint16_t >, 3 > value_type
uint16_t array type.
Definition: Tags.h:663
Unit of measurement for XRESOLUTION and YRESOLUTION.
Definition: Tags.h:97
Image uses indexed color in any color space.
Definition: Tags.h:91
tag_type getWrappedTag(StringTag1 tag)
Get the TIFF tag number for the specified tag.
Definition: Tags.cpp:66
How bad scanlines were handled.
Definition: Tags.h:88
Byte offset of each tile.
Definition: Tags.h:224
Method used to convert to black and white pixels.
Definition: Tags.h:152
Transfer function for the image.
Definition: Tags.h:186
FloatTag3
Floating point (×3) fields.
Definition: Tags.h:253
UInt16TagArray1
Unsigned 16-bit integer array fields.
Definition: Tags.h:102
Height of dithering or halftoning matrix for bilevel data.
Definition: Tags.h:87
::ome::bioformats::tiff::Threshholding value_type
uint16_t type.
Definition: Tags.h:623
Precision of GRAYRESPONSECURVE.
Definition: Tags.h:90
UInt16Tag6
Unsigned 16-bit integer (×6) fields.
Definition: Tags.h:171
UInt64TagArray1
Unsigned 64-bit integer fields.
Definition: Tags.h:216
THe y position of the image in RESOLUTIONUNITs.
Definition: Tags.h:243
Number of inks.
Definition: Tags.h:96
How to interpret each data sample in a pixel.
Definition: Tags.h:146
Number of bad scan lines encountered.
Definition: Tags.h:192
UInt16Threshholding1
Threshholding enum fields.
Definition: Tags.h:150
std::vector< std::string > value_type
string type.
Definition: Tags.h:543
Tile width in pixels (columns).
Definition: Tags.h:205
Number of pixels per resolution unit along the image height.
Definition: Tags.h:241
Reference black and white pairs for RGB or YCbCr images.
Definition: Tags.h:262
UInt16PlanarConfiguration1
PlanarConfiguration enum fields.
Definition: Tags.h:132
FloatTag1
Floating point fields.
Definition: Tags.h:238
Array type substitution.
Sizes of free bytes [unused].
Definition: Tags.h:219
Offsets of free bytes [unused].
Definition: Tags.h:218
Subsampling factors used for YCbCr chrominance components.
Definition: Tags.h:167
::ome::bioformats::tiff::Compression value_type
uint16_t type.
Definition: Tags.h:567
JPEG quantization and/or Huffman tables (JPEG "abbreviated table specification" datastream).
Definition: Tags.h:231
Description of extra components.
Definition: Tags.h:179
Options for Group3 fax compression.
Definition: Tags.h:201
Number of bits per component.
Definition: Tags.h:85
Inkset used in a separated image.
Definition: Tags.h:92
FloatTag6
Floating point (×6) fields.
Definition: Tags.h:259
UInt16Tag1
Unsigned 16-bit integer fields.
Definition: Tags.h:83
::ome::bioformats::tiff::YCbCrPosition value_type
uint16_t type.
Definition: Tags.h:631
Number of rows per strip.
Definition: Tags.h:199
Number of z planes in the image.
Definition: Tags.h:196
UInt16ExtraSamplesArray1
Unsigned 16-bit integer array fields.
Definition: Tags.h:177
::ome::bioformats::tiff::SampleFormat value_type
uint16_t type.
Definition: Tags.h:615
Map a given tag category enum type to the corresponding language value type.
Definition: Tags.h:528
The x position of the image in RESOLUTIONUNITs.
Definition: Tags.h:242
ome::compat::array< uint16_t, 6 > value_type
uint16 array type.
Definition: Tags.h:647
Mathematical operation applied before encoding.
Definition: Tags.h:140
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
Number of bytes in each strip (after compression).
Definition: Tags.h:221
Private tag for ImageJ metadata.
Definition: Tags.h:234
Options for Group4 fax compression.
Definition: Tags.h:202
Names of each ink used in a separated image.
Definition: Tags.h:79
Image orientation.
Definition: Tags.h:122
UInt16FillOrder1
Fill order enum fields.
Definition: Tags.h:114
Expand range of TransferFunction.
Definition: Tags.h:173
UInt32TagArray1
Unsigned 32-bit integer array fields.
Definition: Tags.h:209
Scanner manufacturer.
Definition: Tags.h:69
Scanner model name or number.
Definition: Tags.h:70
UInt16SampleFormat1
Sample format enum fields.
Definition: Tags.h:144
Maximum number of consecutive bad scan lines encountered.
Definition: Tags.h:193
Compression scheme in use on the image data.
Definition: Tags.h:110
Use SAMPLEFORMAT [obsolete].
Definition: Tags.h:89
Logical order of bits within a byte.
Definition: Tags.h:116
Photometric interpretation; colour space of image data.
Definition: Tags.h:128
Photoshop "Image Resource Blocks".
Definition: Tags.h:232
UInt32Tag1
Unsigned 32-bit integer fields.
Definition: Tags.h:190
Options for Group 3 Fax compression (T4Options).
Definition: Tags.h:194
Number of components per pixel.
Definition: Tags.h:98
Private tag for ImageJ metadata byte counts.
Definition: Tags.h:211
UInt16Orientation1
Orientation enum fields.
Definition: Tags.h:120
Range of detail (low-high) for which tonal detail should be retained.
Definition: Tags.h:165
Maximum component value.
Definition: Tags.h:94
Use EXTRASAMPLES [obsolete].
Definition: Tags.h:93
Number of rows in the image (pixels per column).
Definition: Tags.h:197
std::vector< uint16_t > value_type
uint16_t vector type.
Definition: Tags.h:559
::ome::bioformats::tiff::PlanarConfiguration value_type
uint16_t type.
Definition: Tags.h:599
Width of dithering or halftoning matrix for bilevel data.
Definition: Tags.h:86
std::vector< uint32_t > value_type
uint32_t vector type.
Definition: Tags.h:679
Chromaticity of the white point of the image as 1931 CIE (xy).
Definition: Tags.h:249
IPTC (International Press Telecommunications Council) metadata.
Definition: Tags.h:212
Options for Group 4 Fax compression (T6Options).
Definition: Tags.h:195
Number of columns in the image (pixels per row).
Definition: Tags.h:198
How components of each pixel are stored.
Definition: Tags.h:134
Standard integer types.
Name of the page from which the image originated.
Definition: Tags.h:71
Person who created the image.
Definition: Tags.h:63
Description of the printing environment.
Definition: Tags.h:73
Number of pixels per resolution unit along the image width.
Definition: Tags.h:240
Positioning of subsampled chrominance components relative to luminance samples.
Definition: Tags.h:158
std::vector< ::ome::bioformats::tiff::ExtraSamples > value_type
uint16_t vector type.
Definition: Tags.h:655
Minimum component value.
Definition: Tags.h:95
std::vector< uint64_t > value_type
uint64_t vector type.
Definition: Tags.h:687
Computer and/or operating system creating the image.
Definition: Tags.h:67
StringTagArray1
String array fields.
Definition: Tags.h:77
ome::compat::array< uint16_t, 2 > value_type
uint16_t array type.
Definition: Tags.h:639
Optical density of greyscale pixel values.
Definition: Tags.h:104
Component values corresponding to a 0% dot and 100% dot.
Definition: Tags.h:164
std::vector< uint8_t > value_type
uint32_t vector type.
Definition: Tags.h:695
FloatTag2
Floating point (×2) fields.
Definition: Tags.h:247
RawDataTag1
Byte (Unsigned 8-bit integer) fields.
Definition: Tags.h:228
Type of data in this subfile [new tag].
Definition: Tags.h:200
ome::compat::array< float, 6 > value_type
float array type.
Definition: Tags.h:727
Name and version of the software creating the image.
Definition: Tags.h:72
UInt16TagArray3
Unsigned 16-bit integer array (×3) fields.
Definition: Tags.h:183
::ome::bioformats::tiff::Orientation value_type
uint16_t type.
Definition: Tags.h:583
UInt16PhotometricInterpretation1
Photometric interpretation enum fields.
Definition: Tags.h:126
UInt16Compression1
Compression enum fields.
Definition: Tags.h:108
StringTag1
String fields.
Definition: Tags.h:61
Number of the page from which the image originated.
Definition: Tags.h:166
ome::compat::array< float, 2 > value_type
float array type.
Definition: Tags.h:711
Colour map for palette colour images.
Definition: Tags.h:185
Byte offset of each strip.
Definition: Tags.h:222
Date and time of image creation.
Definition: Tags.h:65
Copyright notice.
Definition: Tags.h:64
Coefficients describing the RGB to YCbCr transform.
Definition: Tags.h:255
Offsets of child IFDs.
Definition: Tags.h:220
unsigned int tag_type
Tag number.
Definition: Types.h:59
XMP metadata.
Definition: Tags.h:233
::ome::bioformats::tiff::FillOrder value_type
uint16_t type.
Definition: Tags.h:575