LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::viewerFunctor Class Reference

This viewerFunctor has as task to prepare an image, that will be visualized in the lti::viewer. More...

#include <ltiViewerFunctor.h>

Inheritance diagram for lti::viewerFunctor:
Inheritance graph
[legend]
Collaboration diagram for lti::viewerFunctor:
Collaboration graph
[legend]

List of all members.

Public Types

typedef viewer::parameters parameters

Public Member Functions

 viewerFunctor ()
 viewerFunctor (const parameters &par)
 viewerFunctor (const viewerFunctor &other)
virtual ~viewerFunctor ()
virtual const char * getTypeName () const
bool apply (const matrix< ubyte > &src, image &dest, const bool doStat=true)
bool apply (const matrix< int > &src, image &dest, const bool doStat=true)
bool apply (const matrix< float > &src, image &dest, const bool doStat=true)
bool apply (const matrix< double > &src, image &dest, const bool doStat=true)
bool apply (const image &src, image &dest, const bool doStat=true)
bool apply (const histogram1D &src, image &dest, const bool doStat=true)
bool apply (const histogram2D &src, image &dest, const bool doStat=true)
bool apply (const dvector &src, image &dest, const bool doStat=true)
bool apply (const vector< float > &src, image &dest, const bool doStat=true)
bool apply (const vector< int > &src, image &dest, const bool doStat=true)
bool apply (const vector< ubyte > &src, image &dest, const bool doStat=true)
viewerFunctorcopy (const viewerFunctor &other)
viewerFunctoroperator= (const viewerFunctor &other)
virtual functorclone () const
const parametersgetParameters () const
parametersgetParameters ()
void computeContrastBrightness (const float minp, const float maxp, const float norm, float &c, float &b) const

Protected Member Functions

bool scalarToImage (const matrix< ubyte > &chnl, image &img, const bool doStat)
bool scalarToImage (const matrix< int > &chnl, image &img, const bool doStat)
bool scalarToImage (const matrix< float > &chnl, image &img, const bool doStat)
bool scalarToImage (const matrix< double > &chnl, image &img, const bool doStat)
bool scalarToImage (const dvector &vct, image &img, const bool doStat)
bool imageToImage (const image &chnl, image &img, const bool doStat)
bool labelsToImage (const matrix< ubyte > &chnl, image &img, const bool doStat)
bool labelsToImage (const matrix< int > &chnl, image &img, const bool doStat)
bool zoom (image &img)
bool statistics (const matrix< ubyte > &chnl, parameters &par) const
bool statistics (const matrix< int > &chnl, parameters &par) const
bool statistics (const matrix< float > &chnl, parameters &par) const
bool statistics (const matrix< double > &chnl, parameters &par) const
bool statistics (const image &img, parameters &par) const
bool statistics (const dvector &img, parameters &par) const
void computeLinearTrans (const float norm, float &m, float &b) const
void computeContrastExtrema (const float norm, const float c, float &minp, float &maxp) const

Static Protected Member Functions

static void computePalettes ()

Static Protected Attributes



static palette grayPalette
static palette redPalette
static palette greenPalette
static palette bluePalette
static palette huePalette

Detailed Description

This viewerFunctor has as task to prepare an image, that will be visualized in the lti::viewer.

For this reason, it uses the same parameters as the viewer, but it ignores those ones which control widget specific stuff like window size and so on.

This way, you can also generate images that you do with your viewer but without showing them.

Due to the fact, that viewer alter the "informational" part of the parameters, this functor will also do this. This means, after calling an apply method, the parameters can contain (if specified to do so) new information in the parameters corresponding to the statistics.


Member Typedef Documentation

the parameters for the class viewerFunctor are the same parameters of the lti::viewer


Constructor & Destructor Documentation

lti::viewerFunctor::viewerFunctor (  ) 

default constructor

lti::viewerFunctor::viewerFunctor ( const parameters par  ) 

Construct a functor using the given parameters.

lti::viewerFunctor::viewerFunctor ( const viewerFunctor other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::viewerFunctor::~viewerFunctor (  )  [virtual]

destructor


Member Function Documentation

bool lti::viewerFunctor::apply ( const vector< ubyte > &  src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src vector<float> with the source data.
dest image where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
bool lti::viewerFunctor::apply ( const vector< int > &  src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src vector<float> with the source data.
dest image where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
bool lti::viewerFunctor::apply ( const vector< float > &  src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src vector<float> with the source data.
dest image where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
bool lti::viewerFunctor::apply ( const dvector src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src vector<double> with the source data.
dest image where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
bool lti::viewerFunctor::apply ( const histogram2D src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src histogram1D with the source data.
dest image where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
bool lti::viewerFunctor::apply ( const histogram1D src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src histogram1D with the source data.
dest image where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
bool lti::viewerFunctor::apply ( const image src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src image with the source data.
dest image where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
bool lti::viewerFunctor::apply ( const matrix< double > &  src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src matrix<double> with the source data.
dest matrix<double> where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
bool lti::viewerFunctor::apply ( const matrix< float > &  src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src matrix<float> with the source data.
dest matrix<float> where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
bool lti::viewerFunctor::apply ( const matrix< int > &  src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src matrix<int> with the source data.
dest matrix<int> where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
bool lti::viewerFunctor::apply ( const matrix< ubyte > &  src,
image dest,
const bool  doStat = true 
)

create a visualization image for the the input data

Parameters:
src matrix<ubyte> with the source data.
dest matrix<ubyte> where the result will be left.
doStat if true, the statistics for the src will be computed and leaved in the informational part of the parameters object.
Returns:
true if apply successful or false otherwise.
virtual functor* lti::viewerFunctor::clone (  )  const [virtual]

returns a pointer to a clone of this functor.

Implements lti::functor.

void lti::viewerFunctor::computeContrastBrightness ( const float  minp,
const float  maxp,
const float  norm,
float &  c,
float &  b 
) const

compute the values for contrast and brightness necessary to map the minI and maxI attributes in the parameters to the given minp and maxp values.

Note that must be minp <= maxp.

void lti::viewerFunctor::computeContrastExtrema ( const float  norm,
const float  c,
float &  minp,
float &  maxp 
) const [protected]

compute, for the contrast argument c and the minI and maxI attributes in the parameters object, the values to which this two extrema are mapped, if the brightness = 0;

void lti::viewerFunctor::computeLinearTrans ( const float  norm,
float &  m,
float &  b 
) const [protected]

compute, using the informational data in the parameters, the required linear transformation to change the contrast of an image intensity.

Parameters:
norm the norm used for the current type (255 or 1)
m slope
b offset
static void lti::viewerFunctor::computePalettes (  )  [static, protected]

compute the static color palettes used to create the images

viewerFunctor& lti::viewerFunctor::copy ( const viewerFunctor other  ) 

copy data of "other" functor.

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

parameters& lti::viewerFunctor::getParameters (  ) 

returns a read/write-reference of the used parameters.

This is required by the viewer, in order to write in the parameters the options specified by the user in the Configuration Dialogs and to write the statistics (informational data) into the parameters object.

Reimplemented from lti::functor.

const parameters& lti::viewerFunctor::getParameters (  )  const

returns used parameters

Reimplemented from lti::transform.

virtual const char* lti::viewerFunctor::getTypeName (  )  const [virtual]

returns the name of this type ("viewerFunctor")

Reimplemented from lti::transform.

bool lti::viewerFunctor::imageToImage ( const image chnl,
image img,
const bool  doStat 
) [protected]

The input channel is a scalar matrix.

bool lti::viewerFunctor::labelsToImage ( const matrix< int > &  chnl,
image img,
const bool  doStat 
) [protected]

The input channel is a label map.

bool lti::viewerFunctor::labelsToImage ( const matrix< ubyte > &  chnl,
image img,
const bool  doStat 
) [protected]

The input channel is a label map.

viewerFunctor& lti::viewerFunctor::operator= ( const viewerFunctor other  ) 

alias for copy member

Parameters:
other the functor to be copied
Returns:
a reference to this functor object

Reimplemented from lti::functor.

bool lti::viewerFunctor::scalarToImage ( const dvector vct,
image img,
const bool  doStat 
) [protected]

The input channel is a scalar matrix.

bool lti::viewerFunctor::scalarToImage ( const matrix< double > &  chnl,
image img,
const bool  doStat 
) [protected]

The input channel is a scalar matrix.

bool lti::viewerFunctor::scalarToImage ( const matrix< float > &  chnl,
image img,
const bool  doStat 
) [protected]

The input channel is a scalar matrix.

bool lti::viewerFunctor::scalarToImage ( const matrix< int > &  chnl,
image img,
const bool  doStat 
) [protected]

The input channel is a scalar matrix.

bool lti::viewerFunctor::scalarToImage ( const matrix< ubyte > &  chnl,
image img,
const bool  doStat 
) [protected]

The input channel is a scalar matrix.

bool lti::viewerFunctor::statistics ( const dvector img,
parameters par 
) const [protected]

statistics

bool lti::viewerFunctor::statistics ( const image img,
parameters par 
) const [protected]

statistics

bool lti::viewerFunctor::statistics ( const matrix< double > &  chnl,
parameters par 
) const [protected]

statistics

bool lti::viewerFunctor::statistics ( const matrix< float > &  chnl,
parameters par 
) const [protected]

statistics

bool lti::viewerFunctor::statistics ( const matrix< int > &  chnl,
parameters par 
) const [protected]

statistics

bool lti::viewerFunctor::statistics ( const matrix< ubyte > &  chnl,
parameters par 
) const [protected]

statistics

bool lti::viewerFunctor::zoom ( image img  )  [protected]

Zoom the image.


Member Data Documentation

The gray palette.

the static color palettes

The gray palette

The gray palette.

The gray palette.

The gray palette.


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

Generated on Sat Apr 10 15:29:13 2010 for LTI-Lib by Doxygen 1.6.1