OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimRectanglePartitioner.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 // Copyright (C) 2004 David Burken, all rights reserved.
3 //
4 // License: MIT
5 //
6 // See LICENSE.txt file in the top level directory for more details.
7 //
8 // Author: David Burken
9 //
10 // Description:
11 // Utility class to partition up a rectangle.
12 //
13 // $Id: ossimRectanglePartitioner.h 9094 2006-06-13 19:12:40Z dburken $
14 //----------------------------------------------------------------------------
15 #ifndef ossimRectanglePartitioner_HEADER
16 #define ossimRectanglePartitioner_HEADER
17 
19 #include <vector>
20 
21 class ossimIrect;
22 
28 {
29 public:
30 
33 
36 
62  void binaryPartition(const ossimIrect& inputRectangle,
63  std::vector<ossimIrect>& result,
64  ossim_uint64 maxSizeInBytes,
65  ossim_uint32 bands,
66  ossim_uint32 bytesPerPixel,
67  ossim_uint32 internalOverlapPixels = 0) const;
68 
69 private:
70 
90  void splitUntilLessThanMax(ossimIrect& rect,
91  ossim_uint64 maxSizeInBytes,
92  ossim_uint32 bands,
93  ossim_uint32 bytesPerPixel,
94  ossim_uint32 internalOverlapPixels = 0) const;
95 
106  void splitRect(ossimIrect& rect) const;
107 
120  ossim_uint64 getSize(const ossimIrect& rect,
121  ossim_uint32 bands,
122  ossim_uint32 bytesPerPixel,
123  ossim_uint32 internalOverlapPixels = 0) const;
124 
139  void trace(const ossimIrect& r,
140  const std::vector<ossimIrect>& v,
141  ossim_uint64 maxSizeInBytes,
142  ossim_uint32 bands,
143  ossim_uint32 bytesPerPixel) const;
144 
145 };
146 
147 #endif /* End of "#ifndef ossimRectanglePartitioner_HEADER" */
#define OSSIMDLLEXPORT
class ossimRectanglePartitioner Utility class to partition up a rectangle.
unsigned long long ossim_uint64
unsigned int ossim_uint32