IMP logo
IMP Reference Guide  develop.d97d4ead1f,2024/11/21
The Integrative Modeling Platform
IMP::bff::PathMapTile Class Reference

#include <IMP/bff/PathMapTile.h>

Detailed Description

  • Tile used in path search by PathMap

Definition at line 50 of file PathMapTile.h.

Public Member Functions

 PathMapTile (long index=-1, float visit_penalty=0.0, float tile_density=1.0)
 Construct an accessible volume tile. More...
 
std::vector< long > backtrack_to_path ()
 Computes the path from a tile to the origin. More...
 
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. More...
 
void set_value (int value_type, float value, const std::string &name="")
 Set the value of a tile. More...
 

Public Attributes

float density
 AV density. More...
 

Protected Attributes

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

Constructor & Destructor Documentation

IMP::bff::PathMapTile::PathMapTile ( long  index = -1,
float  visit_penalty = 0.0,
float  tile_density = 1.0 
)
explicit

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)

Definition at line 133 of file PathMapTile.h.

Member Function Documentation

std::vector<long> IMP::bff::PathMapTile::backtrack_to_path ( )

Computes the path from a tile to the origin.

Returns
A vector of long integers representing the path.
float IMP::bff::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.
void IMP::bff::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

float IMP::bff::PathMapTile::density

AV density.

Definition at line 114 of file PathMapTile.h.


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