Registry
NumberRaster Class Reference

Public Member Functions

void blur (double alpha, size_t iterations)
 Blurs the raster data by repeatedly averaging between neighbored cells. More...
 
void create ()
 Creates the raster according to the set number of nodes (use 'set_num_nodes'). More...
 
int dim () const
 Returns the dimension of the raster. More...
 
double extension (int dim) const
 returns the extension of the raster for the given dimension. More...
 
double interpolate_at_cursor (int unnamed) const
 returns the interpolated value (using the given order) at the cursor (use 'set_cursor' to set the cursor). More...
 
void load_from_asc (const char *filename)
 Loads the given file and creates the raster accordingly. More...
 
double min_corner (int dim) const
 returns the coordinate of the minimum corner of the raster for the given dimension. More...
 
double no_data_value () const
 returns the 'no-data-value'of the raster. Nodes with this value are ignored in some applications. More...
 
size_t num_nodes (int dim) const
 returns the number of nodes for the given dimension. More...
 
 NumberRaster ()
 
void save_to_asc (const char *filename) const
 Saves the given raster to an 'asc' file. More...
 
void select_node (int dim, size_t index)
 select a node by specifying the index in each dimension. More...
 
double selected_node_value () const
 returns the value of the selected node (use 'select_node' to select a node). More...
 
void set_cursor (int dim, double coordinate)
 set the coordinate of the cursor for each dimension. More...
 
void set_extension (int dim, double coordinate)
 set the extension of the raster for the given dimension. More...
 
void set_min_corner (int dim, double coordinate)
 set the coordinate of the minimum corner of the raster for the given dimension. More...
 
void set_no_data_value (double value)
 set the 'no-data-value'of the raster. Nodes with this value are ignored in some applications. More...
 
void set_num_nodes (int dim, size_t numNodes)
 set the number of nodes for the given dimension. More...
 
void set_selected_node_value (double value)
 set the value of the selected node (use 'select_node' to select a node). More...
 

Detailed Description

Note
default specialization is NumberRaster2d
See also
ug::NumberRaster

Constructor & Destructor Documentation

◆ NumberRaster()

Member Function Documentation

◆ blur()

void blur ( double  alpha,
size_t  iterations 
)
inline

Blurs the raster data by repeatedly averaging between neighbored cells.

Parameters
[in]alpha
[in]iterations

References alpha.

◆ create()

void create ( )
inline

Creates the raster according to the set number of nodes (use 'set_num_nodes').

◆ dim()

◆ extension()

double extension ( int  dim) const
inline

returns the extension of the raster for the given dimension.

Parameters
[in]dim
Returns
coordinate

References NumberRaster::dim().

◆ interpolate_at_cursor()

double interpolate_at_cursor ( int  unnamed) const
inline

returns the interpolated value (using the given order) at the cursor (use 'set_cursor' to set the cursor).

Parameters
[in]unnamed
Returns
value

◆ load_from_asc()

void load_from_asc ( const char *  filename)
inline

Loads the given file and creates the raster accordingly.

Parameters
[in]filename

◆ min_corner()

double min_corner ( int  dim) const
inline

returns the coordinate of the minimum corner of the raster for the given dimension.

Parameters
[in]dim
Returns
coordinate

References NumberRaster::dim().

◆ no_data_value()

double no_data_value ( ) const
inline

returns the 'no-data-value'of the raster. Nodes with this value are ignored in some applications.

Returns
value

◆ num_nodes()

size_t num_nodes ( int  dim) const
inline

returns the number of nodes for the given dimension.

Parameters
[in]dim
Returns
numNodes

References NumberRaster::dim().

◆ save_to_asc()

void save_to_asc ( const char *  filename) const
inline

Saves the given raster to an 'asc' file.

Parameters
[in]filename

◆ select_node()

void select_node ( int  dim,
size_t  index 
)
inline

select a node by specifying the index in each dimension.

Parameters
[in]dim
[in]index

References NumberRaster::dim().

◆ selected_node_value()

double selected_node_value ( ) const
inline

returns the value of the selected node (use 'select_node' to select a node).

Returns
value

◆ set_cursor()

void set_cursor ( int  dim,
double  coordinate 
)
inline

set the coordinate of the cursor for each dimension.

Parameters
[in]dim
[in]coordinate

References NumberRaster::dim().

◆ set_extension()

void set_extension ( int  dim,
double  coordinate 
)
inline

set the extension of the raster for the given dimension.

Parameters
[in]dim
[in]coordinate

References NumberRaster::dim().

◆ set_min_corner()

void set_min_corner ( int  dim,
double  coordinate 
)
inline

set the coordinate of the minimum corner of the raster for the given dimension.

Parameters
[in]dim
[in]coordinate

References NumberRaster::dim().

◆ set_no_data_value()

void set_no_data_value ( double  value)
inline

set the 'no-data-value'of the raster. Nodes with this value are ignored in some applications.

Parameters
[in]value

◆ set_num_nodes()

void set_num_nodes ( int  dim,
size_t  numNodes 
)
inline

set the number of nodes for the given dimension.

Parameters
[in]dim
[in]numNodes

References NumberRaster::dim().

◆ set_selected_node_value()

void set_selected_node_value ( double  value)
inline

set the value of the selected node (use 'select_node' to select a node).

Parameters
[in]value