bioformats  5.1.0
CoreMetadata.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_COREMETADATA_H
39 #define OME_BIOFORMATS_COREMETADATA_H
40 
41 #include <map>
42 #include <string>
43 #include <vector>
44 
45 #include <ome/compat/cstdint.h>
46 
47 #include <ome/bioformats/MetadataMap.h>
48 #include <ome/bioformats/Modulo.h>
49 #include <ome/bioformats/Types.h>
50 
51 #include <ome/xml/meta/BaseMetadata.h>
52 #include <ome/xml/model/enums/DimensionOrder.h>
53 #include <ome/xml/model/enums/PixelType.h>
54 
55 namespace ome
56 {
57  namespace bioformats
58  {
59 
78  {
79  public:
82 
85 
88 
91 
94 
97 
100 
103 
106 
109 
112 
115 
118 
121 
124 
126  bool rgb;
127 
130 
136 
138  bool indexed;
139 
142 
145 
148 
150  bool thumbnail;
151 
159 
161  CoreMetadata();
162 
168  CoreMetadata(const CoreMetadata& copy);
169 
171  virtual
172  ~CoreMetadata();
173  };
174 
182  template<class charT, class traits>
183  inline std::basic_ostream<charT,traits>&
184  operator<< (std::basic_ostream<charT,traits>& os,
185  const CoreMetadata& core)
186  {
187  os << "sizeX = " << core.sizeX << '\n'
188  << "sizeY = " << core.sizeY << '\n'
189  << "sizeZ = " << core.sizeZ << '\n'
190  << "sizeC = " << core.sizeC << '\n'
191  << "sizeT = " << core.sizeT << '\n'
192  << "thumbSizeX = " << core.thumbSizeX << '\n'
193  << "thumbSizeY = " << core.thumbSizeY << '\n'
194  << "pixelType = " << core.pixelType << '\n'
195  << "bitsPerPixel = " << core.bitsPerPixel << '\n'
196  << "imageCount = " << core.imageCount << '\n'
197  << "moduloZ = {\n" << core.moduloZ
198  << "}\nmoduloT = {\n" << core.moduloT
199  << "}\nmoduloC = {\n" << core.moduloC
200  << "}\ndimensionOrder = " << core.dimensionOrder << '\n'
201  << "orderCertain = " << core.orderCertain << '\n'
202  << "rgb = " << core.rgb << '\n'
203  << "littleEndian = " << core.littleEndian << '\n'
204  << "interleaved = " << core.interleaved << '\n'
205  << "indexed = " << core.indexed << '\n'
206  << "falseColor = " << core.falseColor << '\n'
207  << "metadataComplete = " << core.metadataComplete << '\n'
208  << "seriesMetadata = " << core.seriesMetadata.size() << " keys" << '\n'
209  << "thumbnail = " << core.thumbnail << '\n'
210  << "resolutionCount = " << core.resolutionCount << '\n';
211  return os;
212  }
213 
214  }
215 }
216 
217 #endif // OME_BIOFORMATS_COREMETADATA_H
218 
219 /*
220  * Local Variables:
221  * mode:C++
222  * End:
223  */
dimension_size_type sizeZ
Number of Z sections.
Definition: CoreMetadata.h:87
bool metadataComplete
Is all of the metadata stored within the file parsed correctly?
Definition: CoreMetadata.h:144
A subdimension of Z, C, or T.
Definition: Modulo.h:57
CoreMetadata()
Constructor.
Definition: CoreMetadata.cpp:45
Metadata key-value map using a restricted set of value types.
Definition: MetadataMap.h:79
uint32_t pixel_size_type
Size type for pixel bit depths.
Definition: Types.h:62
Modulo moduloZ
Modulo Z dimension.
Definition: CoreMetadata.h:111
bool interleaved
true if channels are stored RGBRGBRGB...; false if channels are stored RRR...GGG...BBB...
Definition: CoreMetadata.h:135
ome::xml::model::enums::PixelType pixelType
Number of bytes per pixel.
Definition: CoreMetadata.h:102
dimension_size_type sizeC
Number of channels.
Definition: CoreMetadata.h:90
DimensionOrder enumeration.
Definition: DimensionOrder.h:70
Core metadata values.
Definition: CoreMetadata.h:77
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
bool indexed
Are images are stored as indexed color?
Definition: CoreMetadata.h:138
dimension_size_type thumbSizeY
Height (in pixels) of thumbnail images in this series.
Definition: CoreMetadata.h:99
Modulo moduloC
Modulo C dimension.
Definition: CoreMetadata.h:117
ome::xml::model::enums::DimensionOrder dimensionOrder
Order in which dimensions are stored.
Definition: CoreMetadata.h:120
bool rgb
Are images are stored as RGB (multiple channels per plane)?
Definition: CoreMetadata.h:126
dimension_size_type sizeX
Width (in pixels) of images in this series.
Definition: CoreMetadata.h:81
bool thumbnail
Is this series is a lower-resolution copy of another series?
Definition: CoreMetadata.h:150
dimension_size_type resolutionCount
Sub-resolution count.
Definition: CoreMetadata.h:158
PixelType enumeration.
Definition: PixelType.h:70
Standard integer types.
MetadataMap seriesMetadata
Non-core metadata associated with this series.
Definition: CoreMetadata.h:147
virtual ~CoreMetadata()
Destructor.
Definition: CoreMetadata.cpp:101
bool littleEndian
Is the pixel byte order little endian?
Definition: CoreMetadata.h:129
dimension_size_type imageCount
Total number of images.
Definition: CoreMetadata.h:108
bool orderCertain
Are we confident that the dimension order is correct?
Definition: CoreMetadata.h:123
dimension_size_type sizeT
Number of timepoints.
Definition: CoreMetadata.h:93
Modulo moduloT
Modulo T dimension.
Definition: CoreMetadata.h:114
dimension_size_type thumbSizeX
Width (in pixels) of thumbnail images in this series.
Definition: CoreMetadata.h:96
dimension_size_type sizeY
Height (in pixels) of images in this series.
Definition: CoreMetadata.h:84
bool falseColor
Can the color map (if present) be ignored?
Definition: CoreMetadata.h:141
pixel_size_type bitsPerPixel
Number of valid bits per pixel. */.
Definition: CoreMetadata.h:105
std::size_t dimension_size_type
Size type for image dimensions.
Definition: Types.h:59