ome-files 0.1.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

TileInfo.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_TIFF_TILEINFO_H
39 #define OME_FILES_TIFF_TILEINFO_H
40
41 #include <ome/files/PlaneRegion.h>
42 #include <ome/files/tiff/Types.h>
43
44 #include <ome/compat/memory.h>
45
46 namespace ome
47 {
48 namespace files
49 {
50 namespace tiff
51 {
52
53 class IFD;
54
61 class TileInfo
62 {
63 protected:
64 friend class IFD;
65
71 TileInfo(ome::compat::shared_ptr<IFD> ifd);
72
73 public:
75 virtual ~TileInfo();
76
82 TileType
83 tileType() const;
84
90 dimension_size_type
91 tileWidth() const;
92
98 dimension_size_type
99 tileHeight() const;
100
106 dimension_size_type
107 tileCount() const;
108
114 dimension_size_type
115 tileRowCount() const;
116
122 dimension_size_type
123 tileColumnCount() const;
124
130 dimension_size_type
131 bufferSize() const;
132
141 dimension_size_type
142 tileIndex(dimension_size_type x,
143 dimension_size_type y,
144 dimension_size_type s = 0) const;
145
152 dimension_size_type
153 tileColumn(dimension_size_type index) const;
154
161 dimension_size_type
162 tileRow(dimension_size_type index) const;
163
172 dimension_size_type
173 tileSample(dimension_size_type index) const;
174
192 PlaneRegion
193 tileRegion(dimension_size_type index,
194 const PlaneRegion& clip) const;
195
211 PlaneRegion
212 tileRegion(dimension_size_type index) const;
213
224 std::vector<dimension_size_type>
225 tileCoverage(PlaneRegion region) const;
226
227 protected:
228 class Impl;
230 ome::compat::shared_ptr<Impl> impl;
231 };
232
233 }
234 }
235 }
236
237 #endif // OME_FILES_TIFF_TILEINFO_H
238
239 /*
240 * Local Variables:
241 * mode:C++
242 * End:
243 */
ome::files::tiff::TileType
TileType
Type of tile.
Definition: Types.h:208
memory.h
ome::files::dimension_size_type
std::size_t dimension_size_type
Size type for image dimensions.
Definition: Types.h:59
ome::files::tiff::TileInfo::tileRow
dimension_size_type tileRow(dimension_size_type index) const
Get the row index for the given tile index.
Definition: TileInfo.cpp:248
ome::files::tiff::TileInfo::tileCount
dimension_size_type tileCount() const
Get the total number of tiles.
Definition: TileInfo.cpp:204
ome::files::tiff::TileInfo::tileWidth
dimension_size_type tileWidth() const
Get the width of a tile.
Definition: TileInfo.cpp:192
ome::files::tiff::TileInfo
Tile information for an IFD.
Definition: TileInfo.h:61
ome::files::tiff::TileInfo::tileType
TileType tileType() const
Get the type of a tile.
Definition: TileInfo.cpp:186
ome::files::tiff::TileInfo::impl
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: TileInfo.h:228
ome::files::tiff::TileInfo::tileHeight
dimension_size_type tileHeight() const
Get the height of a tile.
Definition: TileInfo.cpp:198
ome::files::tiff::TileInfo::TileInfo
TileInfo(ome::compat::shared_ptr< IFD > ifd)
Constructor.
Definition: TileInfo.cpp:176
ome::files::tiff::TileInfo::bufferSize
dimension_size_type bufferSize() const
Get the buffer size needed to contain a single tile.
Definition: TileInfo.cpp:222
ome
ome::files::tiff::TileInfo::tileColumnCount
dimension_size_type tileColumnCount() const
Get the total number of columns.
Definition: TileInfo.cpp:216
ome::files::tiff::TileInfo::tileIndex
dimension_size_type tileIndex(dimension_size_type x, dimension_size_type y, dimension_size_type s=0) const
Get the tile index covering the given coordinates.
Definition: TileInfo.cpp:228
ome::files::tiff::TileInfo::~TileInfo
virtual ~TileInfo()
Destructor.
Definition: TileInfo.cpp:181
ome::files::tiff::TileInfo::tileRegion
PlaneRegion tileRegion(dimension_size_type index, const PlaneRegion &clip) const
Get the region covered by the given tile index.
Definition: TileInfo.cpp:278
ome::files::tiff::TileInfo::tileRowCount
dimension_size_type tileRowCount() const
Get the total number of rows.
Definition: TileInfo.cpp:210
ome::files::tiff::IFD
Image File Directory (IFD).
Definition: IFD.h:71
ome::files::tiff::TileInfo::tileColumn
dimension_size_type tileColumn(dimension_size_type index) const
Get the column index for the given tile index.
Definition: TileInfo.cpp:239
ome::files::tiff::TileInfo::tileSample
dimension_size_type tileSample(dimension_size_type index) const
Get the sample index for the given tile index.
Definition: TileInfo.cpp:257
ome::files::tiff::TileInfo::Impl
Internal implementation details of TileInfo.
Definition: TileInfo.cpp:62
ome::files::PlaneRegion
A rectangular region.
Definition: PlaneRegion.h:56
ome::files::tiff::TileInfo::tileCoverage
std::vector< dimension_size_type > tileCoverage(PlaneRegion region) const
Get a list of the tiles covering an image region.
Definition: TileInfo.cpp:286