#include <PathMapTile.h>
|
| | PathMapTile (long index=-1, float visit_penalty=0.0, float tile_density=1.0) |
| | Construct an accessible volume tile.
|
| |
| std::vector< long > | backtrack_to_path () |
| | Computes the path from a tile to the origin.
|
| |
| float | get_value (int value_type, std::pair< float, float > bounds=std::pair< float, float >({std::numeric_limits< float >::min(), std::numeric_limits< float >::max()}), const std::string &feature_name="", float grid_spacing=1.0) |
| | Get the value of a tile.
|
| |
| void | set_value (int value_type, float value, const std::string &name="") |
| | Set the value of a tile.
|
| |
◆ PathMapTile()
| PathMapTile::PathMapTile |
( |
long |
index = -1, |
|
|
float |
visit_penalty = 0.0, |
|
|
float |
tile_density = 1.0 |
|
) |
| |
|
inlineexplicit |
Construct an accessible volume tile.
An accessible volume (AV) tile relates to a voxel in an AV. A set of interconnected tiles (neighboring tiles) is used to compute an optimal path from the labeling site to all other positions the the AV. A path is a sequence of tiles. The cost of a path the the sum of all costs (associated to tiles and edges connecting tiles). Visiting a tile in a path adds to the cost of a path. The visiting penalty is defined when constructing a tile.
- Parameters
-
| index | Identifier of the tile (corresponds to index of voxel) |
| visit_penalty | Penalty for visiting (used for implementing obstacles) |
| tile_density | Additional information of tile (can be used to implement weighted AVs) |
◆ backtrack_to_path()
| std::vector< long > PathMapTile::backtrack_to_path |
( |
| ) |
|
Computes the path from a tile to the origin.
- Returns
- A vector of long integers representing the path.
◆ get_value()
| float PathMapTile::get_value |
( |
int |
value_type, |
|
|
std::pair< float, float > |
bounds = std::pair< float, float >({std::numeric_limits< float >::min(), std::numeric_limits< float >::max()}), |
|
|
const std::string & |
feature_name = "", |
|
|
float |
grid_spacing = 1.0 |
|
) |
| |
Get the value of a tile.
A tile in an accessible volume contains information on the penalty for visiting a tile, the cost of a path from the origin of a path search to the tile, the density of the tile, and other user-defined information.
When getting information from a tile, the returned values can be cropped to a range.
- Parameters
-
| value_type | Specifies the type of the returned information (see: PathMapTileOutputs). Depending on the value type, the output can be the penalty for visiting the tile, the total cost of a path to the tile, or the density of the tile. Additionally, user-defined content can be accessed. |
| bounds | Bound for cropping the output values. |
| feature_name | Name of a feature (when accessing additional information). |
| grid_spacing | Spacing between the tiles (important to specify when accessing path length). |
- Returns
- Value of the tile for the specified parameters.
◆ set_value()
| void PathMapTile::set_value |
( |
int |
value_type, |
|
|
float |
value, |
|
|
const std::string & |
name = "" |
|
) |
| |
Set the value of a tile.
Sets the value of a tile.
- Parameters
-
| value_type | Type of the value |
| value | value that will be written |
| name | name of the value (only used for user-defined tile features) |
◆ cost
◆ density
| float PathMapTile::density |
◆ edges
◆ features
| std::map<std::string, float> PathMapTile::features |
|
protected |
◆ idx
◆ penalty
| float PathMapTile::penalty |
|
protected |
◆ previous
The documentation for this class was generated from the following file: