Container for specifying rectangular section of image. More...
#include <spatmod/imagesection.h>
Public Types | |
| enum | POSITION { POSITION_Unknown = 0, POSITION_TileColumnFirst = 0x0001, POSITION_TileColumnInterior = 0x0002, POSITION_TileColumnLast = 0x0004, POSITION_TileRowFirst = 0x0010, POSITION_TileRowInterior = 0x0020, POSITION_TileRowLast = 0x0040, POSITION_StripFirst = 0x0100, POSITION_StripInterior = 0x0200, POSITION_StripLast = 0x0400 } |
Public Member Functions | |
| SECTION (double MinX, double MinY, double SizeX, double SizeY, double zoom=1, POSITION position=POSITION_Unknown) | |
| SECTION (const LRECT2D &rect, double zoom=1) | |
| SECTION (const DRECT2D &rect, double zoom=1) | |
| SECTION (const BASE &image, double zoom=1) | |
| SECTION () | |
| INT32 | ComputeMaxColumn () const |
| INT32 | ComputeMaxRow () const |
| INT32 | ComputeMinColumn () const |
| INT32 | ComputeMinRow () const |
| INT32 | ComputeNumColumns () const |
| INT32 | ComputeNumRows () const |
| void | ComputeRect (LRECT2D &rect) const |
| MISTRING | GetLogString (bool showzoom=true) const |
| double | GetMaxX () const |
| double | GetMaxY () const |
| double | GetMinX () const |
| double | GetMinY () const |
| POSITION | GetPosition () const |
| void | GetRect (DRECT2D &rect) const |
| double | GetSizeX () const |
| double | GetSizeY () const |
| double | GetZoom () const |
| bool | IsEqual (const SECTION &rhs) const |
| void | SetMin (double MinX, double MinY) |
Container for specifying rectangular section of image.
Section position when used from SECTION_ITERATOR.
| SPATMOD::IMAGE::SECTION::SECTION | ( | ) |
Default contructor, creates invalid/empty section.
| SPATMOD::IMAGE::SECTION::SECTION | ( | const BASE & | image, | |
| double | zoom = 1 | |||
| ) |
Construct section for entire image (implicit).
Will construct invalid section if image does not support specified zoom value
| SPATMOD::IMAGE::SECTION::SECTION | ( | const DRECT2D & | rect, | |
| double | zoom = 1 | |||
| ) | [explicit] |
Construct using DRECT2D.
| SPATMOD::IMAGE::SECTION::SECTION | ( | const LRECT2D & | rect, | |
| double | zoom = 1 | |||
| ) | [explicit] |
Construct using LRECT2D.
| SPATMOD::IMAGE::SECTION::SECTION | ( | double | MinX, | |
| double | MinY, | |||
| double | SizeX, | |||
| double | SizeY, | |||
| double | zoom = 1, |
|||
| POSITION | position = POSITION_Unknown | |||
| ) |
Construct using specified values.
| INT32 SPATMOD::IMAGE::SECTION::ComputeMaxColumn | ( | ) | const |
Compute maximum image column.
If maximum X position is not an integer this will be the column containing the maximum X position.
| INT32 SPATMOD::IMAGE::SECTION::ComputeMaxRow | ( | ) | const |
Compute maximum image row.
If maximum Y position is not an integer this will be the row containing the maximum Y position.
| INT32 SPATMOD::IMAGE::SECTION::ComputeMinColumn | ( | ) | const |
Compute minimum image column.
If minimum X position is not an integer this will be the column containing the minimum X position.
| INT32 SPATMOD::IMAGE::SECTION::ComputeMinRow | ( | ) | const |
Compute minimum image row.
If minimum Y position is not an integer this will be the row containing the minimum Y position.
| INT32 SPATMOD::IMAGE::SECTION::ComputeNumColumns | ( | ) | const |
Compute number of whole or partial columns in section.
Equivalent to ComputeMaxColumn() - ComputeMinColumn() + 1.
| INT32 SPATMOD::IMAGE::SECTION::ComputeNumRows | ( | ) | const |
Compute number of whole or partial rows in section.
Equivalent to ComputeMaxRow() - ComputeMinRow() + 1.
| void SPATMOD::IMAGE::SECTION::ComputeRect | ( | LRECT2D & | rect | ) | const |
Compute rectangle covering all whole or partial rows/columns.
| rect | Rectangle returned |
| MISTRING SPATMOD::IMAGE::SECTION::GetLogString | ( | bool | showzoom = true |
) | const |
Get string for use in log.
| double SPATMOD::IMAGE::SECTION::GetMaxX | ( | ) | const [inline] |
Get maximum X position.
Equivalent to GetMinX() + GetSizeX().
| double SPATMOD::IMAGE::SECTION::GetMaxY | ( | ) | const [inline] |
Get maximum Y position.
Equivalent to GetMinY() + GetSizeY().
| double SPATMOD::IMAGE::SECTION::GetMinX | ( | ) | const [inline] |
Get minimum X position.
| double SPATMOD::IMAGE::SECTION::GetMinY | ( | ) | const [inline] |
Get minimum Y position.
| POSITION SPATMOD::IMAGE::SECTION::GetPosition | ( | ) | const [inline] |
Get position as set by SECTION_ITERATOR.
| void SPATMOD::IMAGE::SECTION::GetRect | ( | DRECT2D & | rect | ) | const |
Get rectangle as X/Y ranges.
| rect | Rectangle returned |
| double SPATMOD::IMAGE::SECTION::GetSizeX | ( | ) | const [inline] |
Get X size of section.
| double SPATMOD::IMAGE::SECTION::GetSizeY | ( | ) | const [inline] |
Get Y size of section.
| double SPATMOD::IMAGE::SECTION::GetZoom | ( | ) | const [inline] |
Get zoom factor.
| bool SPATMOD::IMAGE::SECTION::IsEqual | ( | const SECTION & | rhs | ) | const |
Compare for equality.
| void SPATMOD::IMAGE::SECTION::SetMin | ( | double | MinX, | |
| double | MinY | |||
| ) | [inline] |
Set minimum X/Y values.
1.6.1