bioformats  5.1.2
FormatTools.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_FORMATTOOLS_H
39 #define OME_BIOFORMATS_FORMATTOOLS_H
40 
41 #include <string>
42 
43 #include <ome/compat/array.h>
44 
45 #include <ome/bioformats/Types.h>
46 
47 namespace ome
48 {
49  namespace bioformats
50  {
51 
55  enum Domain
56  {
69  };
70 
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>&
100 
117  getIndex(const std::string& order,
118  dimension_size_type zSize,
119  dimension_size_type cSize,
120  dimension_size_type tSize,
125 
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,
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,
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,
227  dimension_size_type index);
228 
229  }
230 }
231 
232 #endif // OME_BIOFORMATS_FORMATTOOLS_H
233 
234 /*
235  * Local Variables:
236  * mode:C++
237  * End:
238  */
239 
High-Content Screening (HCS)
Definition: FormatTools.h:58
Medical Imaging.
Definition: FormatTools.h:64
Graphics.
Definition: FormatTools.h:68
const std::vector< std::string > & getDomainCollection(DomainCollection domains)
Get the strings corresponding to a particular Domain collection.
Definition: FormatTools.cpp:249
Domain
Imaging domain.
Definition: FormatTools.h:55
Gel/Blot Imaging.
Definition: FormatTools.h:66
Array type substitution.
Fluorescence-Lifetime Imaging (FLIM)
Definition: FormatTools.h:63
Scanning Probe Microscopy (SPM)
Definition: FormatTools.h:61
Electron Microscopy (EM)
Definition: FormatTools.h:60
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
Light Microscopy (LM)
Definition: FormatTools.h:59
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:74
Astronomy.
Definition: FormatTools.h:67
Unknown.
Definition: FormatTools.h:57
Scanning Electron Microscopy (SEM)
Definition: FormatTools.h:62
std::size_t dimension_size_type
Size type for image dimensions.
Definition: Types.h:59
Histology.
Definition: FormatTools.h:65
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
const std::string & getDomain(Domain domain)
Get the string corresponding to a particular Domain.
Definition: FormatTools.cpp:165