#include <stdDomains.h>
Public Member Functions | |
ISquareDomains interface | |
void | initPools (const PlaneBlock &planeBlock) |
Initializes the pools for given PlaneBlock, assumes settings are OK. | |
void | fillPixelsInPools (PlaneBlock &planeBlock) |
Prepares domains in already initialized pools (and invalidates summers, etc. ). | |
const PoolList & | getPools () const |
Returns a reference to internal list of domain pools. | |
std::vector< short > | getLevelDensities (int level, int stdDomCountLog2) |
Gets densities for all domain pools on a particular level (with size 2^level - zoomed), returns unzoomed densities. | |
void | writeSettings (std::ostream &file) |
Writes all settings (data needed for reconstruction that don't depend on the input). | |
void | readSettings (std::istream &file) |
Reads all settings (like writeSettings). | |
void | writeData (std::ostream &) |
Writes all input-dependent data. | |
void | readData (std::istream &) |
Reads all data, assumes the settings have already been read. | |
Protected Types | |
enum | Settings |
Indices for settings. | |
Protected Member Functions | |
~MStdDomains () | |
Only frees the pools. | |
Protected Attributes | |
PoolList | pools |
The list of domain pools, pool IDs are the indices, the Pool::pixels are owned. | |
int | width |
Width of the original image (not zoomed). | |
int | height |
Height of the original image (not zoomed). | |
int | zoom |
the zoom | |
Related Functions | |
(Note that these are not member functions.) | |
void | shrinkToHalf (CSMatrix src, SMatrix dest, int width, int height) |
Performs a simple 50%^2 image shrink (dimensions belong to the destination). | |
void | shrinkHorizontally (CSMatrix src, SMatrix dest, int width, int height) |
Performs a simple 33%x66% image horizontal shrink (dimensions belong to the destination). | |
void | shrinkVertically (CSMatrix src, SMatrix dest, int width, int height) |
Performs a simple 66%x33% image vertical shrink (dimensions belong to the destination). | |
void | shrinkToDiamond (CSMatrix src, SMatrix dest, int side) |
Performs 50% shrink with 45-degree anticlockwise rotation (side - the length of the destination square; sx0 , sy0 - the top-left of the enclosing source square). | |
static int | bestDomainDensity (PoolIt pool, int level, int maxCount, int zoom, vector< short > &result) |
Computes the ideal domain density for pool, level and max. domain count, the density is push_back-ed, returns the generated domain count (used once). | |
static int | divideDomsInType (PoolIt begin, PoolIt end, int maxCount, int level, char divType, int zoom, vector< short > &results) |
Generates (results.push_back ) densities for domains on level level for all pools of one type. |
Available settings:
Definition at line 12 of file stdDomains.h.
static int bestDomainDensity | ( | PoolIt | pool, | |
int | level, | |||
int | maxCount, | |||
int | zoom, | |||
vector< short > & | result | |||
) | [related] |
Computes the ideal domain density for pool, level and max. domain count, the density is push_back-ed, returns the generated domain count (used once).
Definition at line 184 of file stdDomains.cpp.
static int divideDomsInType | ( | PoolIt | begin, | |
PoolIt | end, | |||
int | maxCount, | |||
int | level, | |||
char | divType, | |||
int | zoom, | |||
vector< short > & | results | |||
) | [related] |
Generates (results.push_back
) densities for domains on level level
for all pools of one type.
It distributes at most maxCount
domains among the pools' scale-levels in one of three ways (divType
) and returns the number of generated domains
Definition at line 216 of file stdDomains.cpp.
Referenced by getLevelDensities().
void shrinkHorizontally | ( | CSMatrix | src, | |
SMatrix | dest, | |||
int | width, | |||
int | height | |||
) | [related] |
Performs a simple 33%x66% image horizontal shrink (dimensions belong to the destination).
Definition at line 20 of file stdDomains.cpp.
References MatrixWalkers::walkOperate().
Referenced by fillPixelsInPools().
void shrinkToDiamond | ( | CSMatrix | src, | |
SMatrix | dest, | |||
int | side | |||
) | [related] |
Performs 50% shrink with 45-degree anticlockwise rotation (side
- the length of the destination square; sx0
, sy0
- the top-left of the enclosing source square).
Definition at line 33 of file stdDomains.cpp.
References MatrixWalkers::walkOperate().
Referenced by fillPixelsInPools().
void shrinkToHalf | ( | CSMatrix | src, | |
SMatrix | dest, | |||
int | width, | |||
int | height | |||
) | [related] |
Performs a simple 50%^2 image shrink (dimensions belong to the destination).
Definition at line 14 of file stdDomains.cpp.
References MatrixWalkers::walkOperate().
Referenced by fillPixelsInPools().
void shrinkVertically | ( | CSMatrix | src, | |
SMatrix | dest, | |||
int | width, | |||
int | height | |||
) | [related] |
Performs a simple 66%x33% image vertical shrink (dimensions belong to the destination).
Definition at line 26 of file stdDomains.cpp.
References MatrixWalkers::walkOperate().
Referenced by fillPixelsInPools().