IMP.bff
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Attributes | List of all members
PathMapTile Class Reference

#include <PathMapTile.h>

Collaboration diagram for PathMapTile:
Collaboration graph

Public Member Functions

 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.
 

Public Attributes

float density
 AV density.
 

Protected Attributes

long idx
 
float penalty
 
float cost
 
PathMapTileprevious
 
std::map< std::string, float > features
 
std::vector< PathMapTileEdgeedges
 

Constructor & Destructor Documentation

◆ 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
indexIdentifier of the tile (corresponds to index of voxel)
visit_penaltyPenalty for visiting (used for implementing obstacles)
tile_densityAdditional information of tile (can be used to implement weighted AVs)

Member Function Documentation

◆ 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_typeSpecifies 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.
boundsBound for cropping the output values.
feature_nameName of a feature (when accessing additional information).
grid_spacingSpacing 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_typeType of the value
valuevalue that will be written
namename of the value (only used for user-defined tile features)

Member Data Documentation

◆ cost

float PathMapTile::cost
protected

◆ density

float PathMapTile::density

AV density.

◆ edges

std::vector<PathMapTileEdge> PathMapTile::edges
protected

◆ features

std::map<std::string, float> PathMapTile::features
protected

◆ idx

long PathMapTile::idx
protected

◆ penalty

float PathMapTile::penalty
protected

◆ previous

PathMapTile* PathMapTile::previous
protected

The documentation for this class was generated from the following file: