iLand
Functions
stamp.cpp File Reference
#include "global.h"
#include "stamp.h"
#include "grid.h"
#include "stampcontainer.h"
#include "helper.h"

Functions

StampstampFromGrid (const FloatGrid &grid, const int width)
 create a stamp from a FloatGrid with any size More...
 

Function Documentation

◆ stampFromGrid()

Stamp * stampFromGrid ( const FloatGrid grid,
const int  width 
)

create a stamp from a FloatGrid with any size

Parameters
gridsource grid. It is assumed the actual stamp data is around the center point and the grid has an uneven size (e.g 13x13 or 25x25)
widthnumber of pixels that should actually be used. e.g: grid 25x25, width=7 -> data is located from 9/9 to 16/16 (12+-3)
Returns
a stamp created on the heap with the fitting size. The data rect is aligned to 0/0. above example: stamp will be 8x8, with a 7x7-data-block from 0/0 to 6/6.