Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
BIAS::ConvertHDR< StorageType > Class Template Reference

This class handles conversions of HDR images to for example unsigned char. More...

#include <Image/ConvertHDR.hh>

Public Member Functions

 ConvertHDR ()
 std Con-/Destructor More...
 
int ToUnsignedChar (BIAS::Image< StorageType > &src, BIAS::Image< unsigned char > &dst)
 simple conversion to unsigned char, assumed bit depth is 16 -> all pixel values are divided by 65535 supports unsigned short int images. More...
 
int ToUnsignedCharGamma (BIAS::Image< StorageType > &src, BIAS::Image< unsigned char > &dst, float gamma, unsigned int currentMaxVal)
 Conversion to unsigned char image, leaves min/max part intact. More...
 
 ~ConvertHDR ()
 

Detailed Description

template<class StorageType>
class BIAS::ConvertHDR< StorageType >

This class handles conversions of HDR images to for example unsigned char.

Needed for some tools and displaying HDR images. In the future this class will be expanded to incorporate white balance and gamma functions

Author
Anne Sedlazeck untested
Examples:
ExampleConvertHDR.cpp.

Definition at line 47 of file ConvertHDR.hh.

Constructor & Destructor Documentation

template<class StorageType >
BIAS::ConvertHDR< StorageType >::ConvertHDR ( )

std Con-/Destructor

This class handles special conversions for HDR images.

Author
Anne Sedlazeck
Date
feb 2009

Definition at line 40 of file ConvertHDR.cpp.

template<class StorageType >
BIAS::ConvertHDR< StorageType >::~ConvertHDR ( )

Definition at line 45 of file ConvertHDR.cpp.

Member Function Documentation

template<class StorageType >
int BIAS::ConvertHDR< StorageType >::ToUnsignedChar ( BIAS::Image< StorageType > &  src,
BIAS::Image< unsigned char > &  dst 
)

simple conversion to unsigned char, assumed bit depth is 16 -> all pixel values are divided by 65535 supports unsigned short int images.

deprecated, use other method

Definition at line 53 of file ConvertHDR.cpp.

References BIAS::ImageBase::ST_float, BIAS::ImageBase::ST_unsignedchar, and BIAS::ImageBase::ST_unsignedshortint.

template<class StorageType >
int BIAS::ConvertHDR< StorageType >::ToUnsignedCharGamma ( BIAS::Image< StorageType > &  src,
BIAS::Image< unsigned char > &  dst,
float  gamma,
unsigned int  currentMaxVal 
)

Conversion to unsigned char image, leaves min/max part intact.

Parameters
gamma= gamma value for gamma correction (gamma = 1 means no gamma correction)
currentMaxVal= current maximun possible value - caused by bit depth for example bit depth 12 means a currentMaxVal of 4095 the actual min and max values of the image are incorporated, meaning, the image is not stretched to fill the whole range of values between 0 and 255.

Definition at line 119 of file ConvertHDR.cpp.

References BIAS::ImageConvert::ConvertST(), BIAS::ImageBase::GetChannelCount(), BIAS::ImageBase::GetColorModel(), BIAS::ImageBase::GetHeight(), BIAS::Image< StorageType >::GetImageData(), BIAS::Image< StorageType >::GetMinMaxPixelValue(), BIAS::ImageBase::GetPixelCount(), BIAS::ImageBase::GetROI(), BIAS::ImageBase::GetStorageType(), BIAS::ImageBase::GetWidth(), BIAS::Image< StorageType >::Init(), BIAS::ImageBase::IsEmpty(), BIAS::Image< StorageType >::Release(), BIAS::Image< StorageType >::ScaleShiftBetween(), BIAS::ImageBase::SetColorModel(), BIAS::ImageBase::SetROI(), BIAS::ImageBase::ST_float, and BIAS::ImageBase::ST_unsignedchar.


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