ome-files 0.2.2

FormatTools.h
1 /*
2 * #%L
3 * OME-FILES 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_FILES_FORMATTOOLS_H
39 #define OME_FILES_FORMATTOOLS_H
40
41 #include <string>
42
43 #include <ome/compat/array.h>
44
45 #include <ome/files/Types.h>
46
47 namespace ome
48 {
49 namespace files
50 {
51
55 enum Domain
56 {
57 UNKNOWN_DOMAIN,
58 HCS_DOMAIN,
59 LM_DOMAIN,
60 EM_DOMAIN,
61 SPM_DOMAIN,
62 SEM_DOMAIN,
63 FLIM_DOMAIN,
64 MEDICAL_DOMAIN,
65 HISTOLOGY_DOMAIN,
66 GEL_DOMAIN,
67 ASTRONOMY_DOMAIN,
68 GRAPHICS_DOMAIN
69 };
70
74 enum DomainCollection
75 {
76 NON_GRAPHICS_DOMAINS,
77 NON_HCS_DOMAINS,
78 NON_SPECIAL_DOMAINS,
79 ALL_DOMAINS,
80 HCS_ONLY_DOMAINS
81 };
82
89 const std::string&
90 getDomain(Domain domain);
91
98 const std::vector<std::string>&
99 getDomainCollection(DomainCollection domains);
100
116 dimension_size_type
117 getIndex(const std::string& order,
118 dimension_size_type zSize,
119 dimension_size_type cSize,
120 dimension_size_type tSize,
121 dimension_size_type num,
122 dimension_size_type z,
123 dimension_size_type c,
124 dimension_size_type t);
125
153 dimension_size_type
154 getIndex(const std::string& order,
155 dimension_size_type zSize,
156 dimension_size_type cSize,
157 dimension_size_type tSize,
158 dimension_size_type moduloZSize,
159 dimension_size_type moduloCSize,
160 dimension_size_type moduloTSize,
161 dimension_size_type num,
162 dimension_size_type z,
163 dimension_size_type c,
164 dimension_size_type t,
165 dimension_size_type moduloZ,
166 dimension_size_type moduloC,
167 dimension_size_type moduloT);
168
182 ome::compat::array<dimension_size_type, 3>
183 getZCTCoords(const std::string& order,
184 dimension_size_type zSize,
185 dimension_size_type cSize,
186 dimension_size_type tSize,
187 dimension_size_type num,
188 dimension_size_type index);
189
218 ome::compat::array<dimension_size_type, 6>
219 getZCTCoords(const std::string& order,
220 dimension_size_type zSize,
221 dimension_size_type cSize,
222 dimension_size_type tSize,
223 dimension_size_type moduloZSize,
224 dimension_size_type moduloCSize,
225 dimension_size_type moduloTSize,
226 dimension_size_type num,
227 dimension_size_type index);
228
229 }
230 }
231
232 #endif // OME_FILES_FORMATTOOLS_H
233
234 /*
235 * Local Variables:
236 * mode:C++
237 * End:
238 */
239
ome::files::ASTRONOMY_DOMAIN
Astronomy.
Definition: FormatTools.h:67
ome::files::GRAPHICS_DOMAIN
Graphics.
Definition: FormatTools.h:68
ome::files::dimension_size_type
std::size_t dimension_size_type
Size type for image dimensions.
Definition: Types.h:59
ome::files::getDomainCollection
const std::vector< std::string > & getDomainCollection(DomainCollection domains)
Get the strings corresponding to a particular Domain collection.
Definition: FormatTools.cpp:249
ome::files::HCS_DOMAIN
High-Content Screening (HCS)
Definition: FormatTools.h:58
ome::files::getIndex
dimension_size_type getIndex(const std::string &order, dimension_size_type zSize, dimension_size_type cSize, dimension_size_type tSize, dimension_size_type num, dimension_size_type z, dimension_size_type c, dimension_size_type t)
Get the rasterized index corresponding to the given Z, C and T coordinates (real sizes).
Definition: FormatTools.cpp:365
ome::files::DomainCollection
DomainCollection
Imaging domain collections.
Definition: FormatTools.h:74
ome::files::LM_DOMAIN
Light Microscopy (LM)
Definition: FormatTools.h:59
ome::files::MEDICAL_DOMAIN
Medical Imaging.
Definition: FormatTools.h:64
ome::files::getZCTCoords
ome::compat::array< dimension_size_type, 3 > getZCTCoords(const std::string &order, dimension_size_type zSize, dimension_size_type cSize, dimension_size_type tSize, dimension_size_type num, dimension_size_type index)
Get the Z, C and T coordinates (real sizes) corresponding to the given rasterized index value...
Definition: FormatTools.cpp:422
ome
Open Microscopy Environment C++.
ome::files::FLIM_DOMAIN
Fluorescence-Lifetime Imaging (FLIM)
Definition: FormatTools.h:63
ome::files::Domain
Domain
Imaging domain.
Definition: FormatTools.h:55
ome::files::SPM_DOMAIN
Scanning Probe Microscopy (SPM)
Definition: FormatTools.h:61
ome::files::GEL_DOMAIN
Gel/Blot Imaging.
Definition: FormatTools.h:66
ome::files::EM_DOMAIN
Electron Microscopy (EM)
Definition: FormatTools.h:60
ome::files::getDomain
const std::string & getDomain(Domain domain)
Get the string corresponding to a particular Domain.
Definition: FormatTools.cpp:165
ome::files::HISTOLOGY_DOMAIN
Histology.
Definition: FormatTools.h:65
ome::files::UNKNOWN_DOMAIN
Unknown.
Definition: FormatTools.h:57
ome::files::SEM_DOMAIN
Scanning Electron Microscopy (SEM)
Definition: FormatTools.h:62
array.h