GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GoFigureFileInfoMultiIndexContainerHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2  Authors: The GoFigure Dev. Team.
3  at Megason Lab, Systems biology, Harvard Medical school, 2009-11
4 
5  Copyright (c) 2009-11, President and Fellows of Harvard College.
6  All rights reserved.
7 
8  Redistribution and use in source and binary forms, with or without
9  modification, are permitted provided that the following conditions are met:
10 
11  Redistributions of source code must retain the above copyright notice,
12  this list of conditions and the following disclaimer.
13  Redistributions in binary form must reproduce the above copyright notice,
14  this list of conditions and the following disclaimer in the documentation
15  and/or other materials provided with the distribution.
16  Neither the name of the President and Fellows of Harvard College
17  nor the names of its contributors may be used to endorse or promote
18  products derived from this software without specific prior written
19  permission.
20 
21  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
23  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
24  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
25  BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
26  OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
27  OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
28  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
30  OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
31  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 
33 =========================================================================*/
34 
35 #ifndef __GoFigureFileInfoMultiIndexContainerHelper_h
36 #define __GoFigureFileInfoMultiIndexContainerHelper_h
37 
38 #include "boost/multi_index_container.hpp"
39 #include "boost/multi_index/member.hpp"
40 #include "boost/multi_index/ordered_index.hpp"
41 #include <algorithm>
42 #include <iostream>
43 #include <iterator>
44 #include <string>
45 #include <sstream>
46 #include <list>
47 #include <map>
48 #include <set>
49 
50 #include "QGoIOConfigure.h"
51 
52 struct QGOIO_EXPORT GoFigureFileInfoHelper {
53  unsigned int m_PCoord;
54  unsigned int m_RCoord;
55  unsigned int m_CCoord;
56  unsigned int m_XTileCoord;
57  unsigned int m_YTileCoord;
58  unsigned int m_ZTileCoord;
59  unsigned int m_XCoord;
60  unsigned int m_YCoord;
61  unsigned int m_ZCoord;
62  unsigned int m_TCoord;
63  unsigned int m_Channel;
64  std::string m_Filename;
65 
66  GoFigureFileInfoHelper(const unsigned int & p, const unsigned int & r,
67  const unsigned int & c, const unsigned int & xt,
68  const unsigned int & yt, const unsigned int & zt,
69  const unsigned int & xs, const unsigned int & ys,
70  const unsigned int & zs, const unsigned int & t,
71  const unsigned int & ch, const std::string & iFile):
72  m_PCoord(p), m_RCoord(r), m_CCoord(c), m_XTileCoord(xt),
73  m_YTileCoord(yt), m_ZTileCoord(zt), m_XCoord(xs),
74  m_YCoord(ys), m_ZCoord(zs), m_TCoord(t), m_Channel(ch),
75  m_Filename(iFile)
76  {}
77 
78  GoFigureFileInfoHelper():m_PCoord(0), m_RCoord(0), m_CCoord(0),
79  m_XTileCoord(0), m_YTileCoord(0), m_ZTileCoord(0), m_XCoord(0),
80  m_YCoord(0), m_ZCoord(0), m_TCoord(0), m_Channel(0), m_Filename("")
81  {}
82 
84 };
85 
86 #ifndef DOXYGEN_SHOULD_SKIP_THIS
87 struct m_PCoord {};
88 struct m_RCoord {};
89 struct m_CCoord {};
90 struct m_XTileCoord {};
91 struct m_YTileCoord {};
92 struct m_ZTileCoord {};
93 struct m_XCoord {};
94 struct m_YCoord {};
95 struct m_ZCoord {};
96 struct m_TCoord {};
97 struct m_Channel {};
98 #endif
99 
104 typedef boost::multi_index::multi_index_container<
106  boost::multi_index::indexed_by<
107  boost::multi_index::ordered_non_unique<
108  boost::multi_index::tag<m_PCoord>,
109  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper,unsigned int,m_PCoord)
110  >,
111  boost::multi_index::ordered_non_unique<
112  boost::multi_index::tag<m_RCoord>,
113  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper,unsigned int,m_RCoord)
114  >,
115  boost::multi_index::ordered_non_unique<
116  boost::multi_index::tag<m_CCoord>,
117  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper,unsigned int,m_CCoord)
118  >,
119  boost::multi_index::ordered_non_unique<
120  boost::multi_index::tag<m_XTileCoord>,
121  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper,unsigned int,m_XTileCoord)
122  >,
123  boost::multi_index::ordered_non_unique<
124  boost::multi_index::tag<m_YTileCoord>,
125  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper,unsigned int,m_YTileCoord)
126  >,
127  boost::multi_index::ordered_non_unique<
128  boost::multi_index::tag<m_ZTileCoord>,
129  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper,unsigned int,m_ZTileCoord)
130  >,
131  boost::multi_index::ordered_non_unique<
132  boost::multi_index::tag< m_ZCoord >,
133  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper, unsigned int, m_ZCoord)
134  >,
135  boost::multi_index::ordered_non_unique<
136  boost::multi_index::tag< m_Channel >,
137  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper, unsigned int, m_Channel)
138  >,
139  boost::multi_index::ordered_non_unique<
140  boost::multi_index::tag< m_TCoord >,
141  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper, unsigned int, m_TCoord)
142  >
143  >
145 
146 typedef boost::multi_index::multi_index_container<
147  const GoFigureFileInfoHelper *,
148  boost::multi_index::indexed_by<
149  boost::multi_index::ordered_non_unique<
150  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper, const unsigned int, m_ZCoord)
151  >
152  >
154 
155 typedef boost::multi_index::multi_index_container<
156  const GoFigureFileInfoHelper *,
157  boost::multi_index::indexed_by<
158  boost::multi_index::ordered_non_unique<
159  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper, const unsigned int, m_TCoord)
160  >
161  >
163 
164 typedef boost::multi_index::multi_index_container<
165  const GoFigureFileInfoHelper *,
166  boost::multi_index::indexed_by<
167  boost::multi_index::ordered_non_unique<
168  BOOST_MULTI_INDEX_MEMBER(GoFigureFileInfoHelper, const unsigned int, m_Channel)
169  >
170  >
172 
173 QGOIO_EXPORT
174 std::map< unsigned int, std::list< std::string > >
177  const unsigned int & iT,
178  const unsigned int & iMinCh,
179  const unsigned int & iMaxCh
180 );
181 
182 QGOIO_EXPORT
183 std::map< unsigned int, std::list< std::string > >
186  const unsigned int & iZ,
187  const unsigned int & iMinCh,
188  const unsigned int & iMaxCh
189 );
190 
191 QGOIO_EXPORT
192 std::list< std::string > GetAllFileNamesForGivenTCoordAndChannel(
194  const unsigned int & iT,
195  const unsigned int & iCh
196 );
197 
198 QGOIO_EXPORT
199 std::list< std::string > GetAllFileNamesForGivenZCoordPointAndChannel(
201  const unsigned int & iZ,
202  const unsigned int & iCh
203 );
204 
205 QGOIO_EXPORT
206 std::map< unsigned int, std::list< std::string > >
209  const unsigned int & iCh,
210  const std::set< unsigned int > & iT
211 );
212 
213 #endif
GoFigureFileInfoHelper(const unsigned int &p, const unsigned int &r, const unsigned int &c, const unsigned int &xt, const unsigned int &yt, const unsigned int &zt, const unsigned int &xs, const unsigned int &ys, const unsigned int &zs, const unsigned int &t, const unsigned int &ch, const std::string &iFile)
boost::multi_index::multi_index_container< const GoFigureFileInfoHelper *, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< > >> GoFigureFileInfoHelperChannelViewContainer
std::list< std::string > GetAllFileNamesForGivenZCoordPointAndChannel(const GoFigureFileInfoHelperMultiIndexContainer &iContainer, const unsigned int &iZ, const unsigned int &iCh)
boost::multi_index::multi_index_container< const GoFigureFileInfoHelper *, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< > >> GoFigureFileInfoHelperZCoordViewContainer
std::map< unsigned int, std::list< std::string > > GetAllFileNamesForGivenTCoord(const GoFigureFileInfoHelperMultiIndexContainer &iContainer, const unsigned int &iT, const unsigned int &iMinCh, const unsigned int &iMaxCh)
std::map< unsigned int, std::list< std::string > > GetAllFileNamesForGivenZCoord(const GoFigureFileInfoHelperMultiIndexContainer &iContainer, const unsigned int &iZ, const unsigned int &iMinCh, const unsigned int &iMaxCh)
boost::multi_index::multi_index_container< const GoFigureFileInfoHelper *, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< > >> GoFigureFileInfoHelperTCoordViewContainer
std::list< std::string > GetAllFileNamesForGivenTCoordAndChannel(const GoFigureFileInfoHelperMultiIndexContainer &iContainer, const unsigned int &iT, const unsigned int &iCh)
boost::multi_index::multi_index_container< GoFigureFileInfoHelper, boost::multi_index::indexed_by< boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_PCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_RCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_CCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_XTileCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_YTileCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_ZTileCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_ZCoord >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_Channel >, >, boost::multi_index::ordered_non_unique< boost::multi_index::tag< m_TCoord >, > >> GoFigureFileInfoHelperMultiIndexContainer
std::map< unsigned int, std::list< std::string > > GetAllFileNamesForGivenChannelAndTCoords(const GoFigureFileInfoHelperMultiIndexContainer &iContainer, const unsigned int &iCh, const std::set< unsigned int > &iTCoordList)