iLand
Functions
grid.cpp File Reference
#include "grid.h"
#include "exception.h"
#include "global.h"

Functions

QString gridToString (const FloatGrid &grid, const QChar sep, const int newline_after)
 dumps a FloatGrid to a String. More...
 
bool loadGridFromImage (const QString &fileName, FloatGrid &rGrid)
 load into 'rGrid' the content of the image pointed at by 'fileName'. More...
 

Function Documentation

◆ gridToString()

QString gridToString ( const FloatGrid grid,
const QChar  sep = QChar(';'),
const int  newline_after = -1 
)

dumps a FloatGrid to a String.

rows will be y-lines, columns x-values. (see grid.cpp)

◆ loadGridFromImage()

bool loadGridFromImage ( const QString &  fileName,
FloatGrid rGrid 
)

load into 'rGrid' the content of the image pointed at by 'fileName'.

Pixels are converted to grey-scale and then transformend to a value ranging from 0..1 (black..white).