#include <SlidingWindowIterator.hpp>

Public Types | |
| enum | EdgeHandling { EdgeHandling::INSIDE, EdgeHandling::CROP, EdgeHandling::EMPTY, EdgeHandling::MEAN } |
Public Member Functions | |
| const Matrix | getData () const |
| SlidingWindowIterator & | operator++ () |
| void | setWindowLength (const GridMap &gridMap, const double windowLength) |
| SlidingWindowIterator (const GridMap &gridMap, const std::string &layer, const EdgeHandling &edgeHandling=EdgeHandling::CROP, const size_t windowSize=3) | |
| SlidingWindowIterator (const SlidingWindowIterator *other) | |
Public Member Functions inherited from grid_map::GridMapIterator | |
| GridMapIterator | end () const |
| const size_t & | getLinearIndex () const |
| const Index | getUnwrappedIndex () const |
| GridMapIterator (const grid_map::GridMap &gridMap) | |
| GridMapIterator (const GridMapIterator *other) | |
| GridMapIterator (const GridMapIterator &other)=default | |
| bool | isPastEnd () const |
| bool | operator!= (const GridMapIterator &other) const |
| const Index | operator* () const |
| GridMapIterator & | operator= (const GridMapIterator &other) |
Private Member Functions | |
| bool | dataInsideMap () const |
| Check if data for current index is fully inside map. More... | |
| void | setup (const GridMap &gridMap) |
| Setup members. More... | |
Private Attributes | |
| const Matrix & | data_ |
| Data. More... | |
| const EdgeHandling | edgeHandling_ |
| Edge handling method. More... | |
| size_t | windowMargin_ |
| Size of the border of the window around the center cell. More... | |
| size_t | windowSize_ |
| Size of the sliding window. More... | |
Additional Inherited Members | |
Protected Attributes inherited from grid_map::GridMapIterator | |
| bool | isPastEnd_ |
| Is iterator out of scope. More... | |
| size_t | linearIndex_ |
| Linear index. More... | |
| size_t | linearSize_ |
| Linear size of the data. More... | |
| Size | size_ |
| Size of the buffer. More... | |
| Index | startIndex_ |
| Start index of the circular buffer. More... | |
Iterator class to iterate trough the entire grid map with access to a layer's data through a sliding window. Note: This iterator only works with maps with zero start index.
Definition at line 24 of file SlidingWindowIterator.hpp.
|
strong |
| Enumerator | |
|---|---|
| INSIDE | |
| CROP | |
| EMPTY | |
| MEAN | |
Definition at line 28 of file SlidingWindowIterator.hpp.
| grid_map::SlidingWindowIterator::SlidingWindowIterator | ( | const GridMap & | gridMap, |
| const std::string & | layer, | ||
| const EdgeHandling & | edgeHandling = EdgeHandling::CROP, |
||
| const size_t | windowSize = 3 |
||
| ) |
Constructor.
| gridMap | the grid map to iterate on. |
| layer | the layer on which the data is accessed. |
| edgeHandling | the method to handle edges of the map. |
| windowSize | the size of the moving window in number of cells (has to be an odd number!). |
Definition at line 16 of file SlidingWindowIterator.cpp.
| grid_map::SlidingWindowIterator::SlidingWindowIterator | ( | const SlidingWindowIterator * | other | ) |
Copy constructor.
| other | the object to copy. |
Definition at line 26 of file SlidingWindowIterator.cpp.
|
private |
Check if data for current index is fully inside map.
Definition at line 99 of file SlidingWindowIterator.cpp.
| const Matrix grid_map::SlidingWindowIterator::getData | ( | ) | const |
Return the data of the sliding window.
Definition at line 55 of file SlidingWindowIterator.cpp.
|
virtual |
Increase the iterator to the next element.
Reimplemented from grid_map::GridMapIterator.
Definition at line 42 of file SlidingWindowIterator.cpp.
|
private |
Setup members.
Definition at line 84 of file SlidingWindowIterator.cpp.
| void grid_map::SlidingWindowIterator::setWindowLength | ( | const GridMap & | gridMap, |
| const double | windowLength | ||
| ) |
Set the side length of the moving window (in m).
| gridMap | the grid map to iterate on. |
| windowLength | the side length of the window (in m). |
Definition at line 35 of file SlidingWindowIterator.cpp.
|
private |
Data.
Definition at line 82 of file SlidingWindowIterator.hpp.
|
private |
Edge handling method.
Definition at line 79 of file SlidingWindowIterator.hpp.
|
private |
Size of the border of the window around the center cell.
Definition at line 88 of file SlidingWindowIterator.hpp.
|
private |
Size of the sliding window.
Definition at line 85 of file SlidingWindowIterator.hpp.