ome-files  0.5.0
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 <array>
42 #include <string>
43 
44 #include <ome/files/Types.h>
45 
46 namespace ome
47 {
48  namespace files
49  {
50 
54  enum Domain
55  {
68  };
69 
74  {
75  NON_GRAPHICS_DOMAINS,
76  NON_HCS_DOMAINS,
77  NON_SPECIAL_DOMAINS,
78  ALL_DOMAINS,
79  HCS_ONLY_DOMAINS
80  };
81 
88  const std::string&
89  getDomain(Domain domain);
90 
97  const std::vector<std::string>&
99 
116  getIndex(const std::string& order,
117  dimension_size_type zSize,
118  dimension_size_type cSize,
119  dimension_size_type tSize,
124 
153  getIndex(const std::string& order,
154  dimension_size_type zSize,
155  dimension_size_type cSize,
156  dimension_size_type tSize,
157  dimension_size_type moduloZSize,
158  dimension_size_type moduloCSize,
159  dimension_size_type moduloTSize,
164  dimension_size_type moduloZ,
165  dimension_size_type moduloC,
166  dimension_size_type moduloT);
167 
181  std::array<dimension_size_type, 3>
182  getZCTCoords(const std::string& order,
183  dimension_size_type zSize,
184  dimension_size_type cSize,
185  dimension_size_type tSize,
187  dimension_size_type index);
188 
217  std::array<dimension_size_type, 6>
218  getZCTCoords(const std::string& order,
219  dimension_size_type zSize,
220  dimension_size_type cSize,
221  dimension_size_type tSize,
222  dimension_size_type moduloZSize,
223  dimension_size_type moduloCSize,
224  dimension_size_type moduloTSize,
226  dimension_size_type index);
227 
228  }
229 }
230 
231 #endif // OME_FILES_FORMATTOOLS_H
232 
233 /*
234  * Local Variables:
235  * mode:C++
236  * End:
237  */
238 
Astronomy.
Definition: FormatTools.h:66
Graphics.
Definition: FormatTools.h:67
std::size_t dimension_size_type
Size type for image dimensions.
Definition: Types.h:58
const std::vector< std::string > & getDomainCollection(DomainCollection domains)
Get the strings corresponding to a particular Domain collection.
Definition: FormatTools.cpp:249
High-Content Screening (HCS)
Definition: FormatTools.h:57
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
DomainCollection
Imaging domain collections.
Definition: FormatTools.h:73
Light Microscopy (LM)
Definition: FormatTools.h:58
Medical Imaging.
Definition: FormatTools.h:63
Open Microscopy Environment C++.
Fluorescence-Lifetime Imaging (FLIM)
Definition: FormatTools.h:62
Domain
Imaging domain.
Definition: FormatTools.h:54
Scanning Probe Microscopy (SPM)
Definition: FormatTools.h:60
Gel/Blot Imaging.
Definition: FormatTools.h:65
Electron Microscopy (EM)
Definition: FormatTools.h:59
const std::string & getDomain(Domain domain)
Get the string corresponding to a particular Domain.
Definition: FormatTools.cpp:165
std::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
Histology.
Definition: FormatTools.h:64
Unknown.
Definition: FormatTools.h:56
Scanning Electron Microscopy (SEM)
Definition: FormatTools.h:61