STIRA  0.1
Public Member Functions | Static Public Member Functions | List of all members
stira::imagedata::GridConverter Class Reference

class to convert a grid of one data type to another More...

#include <GridConverter.h>

Public Member Functions

 GridConverter ()
 constructor
 

Static Public Member Functions

static ArrayGrid< int > * ConvertToInt (ArrayGrid< bool > *pGrid)
 converts a grid of booleans (0 or 1) to a grid of integers (0 or 255) More...
 
static ArrayGrid< int > * ConvertToInt (ArrayGrid< double > *pGrid)
 converts a grid of doubles to a grid of integers More...
 
static ArrayGrid< double > * ConvertToDouble (ArrayGrid< bool > *pGrid, double factor=1.0)
 converts a grid of booleans (0 or 1) to a grid of integers (0 or factor) More...
 
static ArrayGrid< double > * ConvertToDouble (ArrayGrid< int > *pGrid)
 converts a grid of integers to a grid of doubles More...
 

Detailed Description

class to convert a grid of one data type to another

Member Function Documentation

ArrayGrid< double > * stira::imagedata::GridConverter::ConvertToDouble ( ArrayGrid< bool > *  pGrid,
double  factor = 1.0 
)
static

converts a grid of booleans (0 or 1) to a grid of integers (0 or factor)

Parameters
pGridinput grid of booleans
factornumber to scale the boolean values with

References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().

ArrayGrid< double > * stira::imagedata::GridConverter::ConvertToDouble ( ArrayGrid< int > *  pGrid)
static
ArrayGrid< int > * stira::imagedata::GridConverter::ConvertToInt ( ArrayGrid< bool > *  pGrid)
static

converts a grid of booleans (0 or 1) to a grid of integers (0 or 255)

Parameters
pGridinput grid of booleans

References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().

ArrayGrid< int > * stira::imagedata::GridConverter::ConvertToInt ( ArrayGrid< double > *  pGrid)
static

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