Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
BIAS::ImageAttributes Class Reference

contains all atribute info and values of e.g. a file. More...

#include <Base/Image/ImageAttributes.hh>

+ Inheritance diagram for BIAS::ImageAttributes:
+ Collaboration diagram for BIAS::ImageAttributes:

Public Member Functions

void AddDebugLevel (const long int lv)
 
void AddDebugLevel (const std::string &name)
 
bool DebugLevelIsSet (const long int lv) const
 
bool DebugLevelIsSet (const std::string &name) const
 
int GetDebugLevel () const
 
std::ostream & GetDebugStream () const
 
void GetDebugStream (std::ostream &os) const
 
int GetFieldOfViewDegree (double &x, double &y)
 compute field of view in degree More...
 
int GetFocalLengthMeter (double &fm)
 compute focallength in meters More...
 
int GetFocalLengthXPixel (double &fp)
 compute focallength in pixels More...
 
int GetFocalLengthYPixel (double &fp)
 compute focallength in pixels More...
 
int GetHardwareName (std::string &Make, std::string &Model)
 look up camera make and model More...
 
std::string GetIdentifier ()
 combine Make, Model and focallength to one special identifier More...
 
int GetImageDimensions (int &width, int &height)
 get width and height of image More...
 
int GetPixelSizeXMeter (double &p)
 compute pixel size in meter More...
 
int GetPixelSizeYMeter (double &p)
 compute pixel size in meter More...
 
int GetPrincipalPoint (double &x, double &y)
 look up principal point More...
 
 ImageAttributes ()
 
void InitExifTags ()
 initialize me vector with all known EXIF tags More...
 
long int Name2DebugLevel (const std::string &name) const
 looks up a debuglevel in the internal map, returns 0 if not found More...
 
long int NewDebugLevel (const std::string &name)
 creates a new debuglevel More...
 
std::ostream & Print (std::ostream &os=std::cout, const bool printAll=false) const
 print the content of this to os More...
 
void PrintDebugLevel (std::ostream &os=std::cout) const
 
int Read (const std::string &filename)
 main entry routine to read all EXIF tags from the header of image file. More...
 
int ReadMagickPP (const std::string &filename)
 
int ReadMagickPP (Magick::Image &img)
 direct interface to Magick::IMage to be able to read the XIF tags of an already opened image. More...
 
void RemoveDebugLevel (const long int lv)
 
void RemoveDebugLevel (const std::string &name)
 
void SetDebugLevel (const long int lv)
 
void SetDebugLevel (const std::string &name)
 
void SetDebugStream (const std::ostream &os)
 
void ShowDebugLevel (std::ostream &os=std::cout) const
 prints all internally known debuglevels More...
 
 ~ImageAttributes ()
 

Static Public Member Functions

static long int GetGlobalDebugLevel ()
 
static void SetGlobalDebugLevel (long int lev)
 

Public Attributes

elements
 STL member. More...
 

Protected Member Functions

long ConsumeNextFreeDebuglevel_ ()
 returns the next available debuglevel More...
 
bool GetRational_ (const std::string &key, double &value)
 
bool GetShort_ (const std::string &key, int &value)
 
bool GetString_ (const std::string &key, std::string &value)
 

Protected Attributes

long int _liDebugLevel
 
long int _liNextDebugLevel
 new concept, debuglevel are managed here in the debug class More...
 
std::map< std::string, long int > _String2Debuglevel
 

Static Protected Attributes

static std::ostream _zDebugStream
 
static long int GlobalDebugLevel = 0
 

Detailed Description

contains all atribute info and values of e.g. a file.

Todo:
Add Image Attributes write functionality to write meta data directly to images EXIF Tags, comments etc.
Author
Jan Woetzel 10/2004
Examples:
ExampleImageAttributes.cpp.

Definition at line 33 of file ImageAttributes.hh.

Constructor & Destructor Documentation

BIAS::ImageAttributes::~ImageAttributes ( )
inline

Definition at line 37 of file ImageAttributes.hh.

BIAS::ImageAttributes::ImageAttributes ( )
inline

Definition at line 38 of file ImageAttributes.hh.

Member Function Documentation

void BIAS::Debug::AddDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::AddDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 362 of file Debug.hh.

long BIAS::Debug::ConsumeNextFreeDebuglevel_ ( )
inlineprotectedinherited

returns the next available debuglevel

Author
woelk 09/2006

Definition at line 521 of file Debug.hh.

bool BIAS::Debug::DebugLevelIsSet ( const long int  lv) const
inlineinherited
bool BIAS::Debug::DebugLevelIsSet ( const std::string &  name) const
inlineinherited

Definition at line 350 of file Debug.hh.

int BIAS::Debug::GetDebugLevel ( ) const
inlineinherited
std::ostream& BIAS::Debug::GetDebugStream ( ) const
inlineinherited

Definition at line 405 of file Debug.hh.

void BIAS::Debug::GetDebugStream ( std::ostream &  os) const
inlineinherited

Definition at line 414 of file Debug.hh.

int ImageAttributes::GetFieldOfViewDegree ( double &  x,
double &  y 
)

compute field of view in degree

Returns
0:ok, <0:information missing, >0:missing information guessed
Author
koeser 07/2005

Definition at line 378 of file ImageAttributes.cpp.

int ImageAttributes::GetFocalLengthMeter ( double &  fm)

compute focallength in meters

Returns
0:ok, <0:information missing, >0:missing information guessed
Author
koeser 07/2005

Definition at line 304 of file ImageAttributes.cpp.

int ImageAttributes::GetFocalLengthXPixel ( double &  fp)

compute focallength in pixels

Returns
0:ok, <0:information missing, >0:missing information guessed
Author
koeser 07/2005

Definition at line 313 of file ImageAttributes.cpp.

Referenced by BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::GetFocalLengthYPixel ( double &  fp)

compute focallength in pixels

Returns
0:ok, <0:information missing, >0:missing information guessed
Author
koeser 07/2005

Definition at line 324 of file ImageAttributes.cpp.

static long int BIAS::Debug::GetGlobalDebugLevel ( )
inlinestaticinherited

Definition at line 431 of file Debug.hh.

int ImageAttributes::GetHardwareName ( std::string &  Make,
std::string &  Model 
)

look up camera make and model

Returns
0:ok, <0:information missing, >0:missing information guessed
Author
koeser 07/2005

Definition at line 414 of file ImageAttributes.cpp.

Referenced by BIAS::ProjectionParametersIO::ReadFromEXIF().

std::string ImageAttributes::GetIdentifier ( )

combine Make, Model and focallength to one special identifier

Author
evers 2009-07

Definition at line 424 of file ImageAttributes.cpp.

Referenced by BIAS::VideoSource_Disk::OpenDevice().

int ImageAttributes::GetImageDimensions ( int &  width,
int &  height 
)

get width and height of image

Returns
0:ok, <0:information missing, >0:missing information guessed
Author
koeser 07/2005

Definition at line 391 of file ImageAttributes.cpp.

Referenced by BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::GetPixelSizeXMeter ( double &  p)

compute pixel size in meter

Returns
0:ok, <0:information missing, >0:missing information guessed
Author
koeser 07/2005

Definition at line 335 of file ImageAttributes.cpp.

Referenced by BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::GetPixelSizeYMeter ( double &  p)

compute pixel size in meter

Returns
0:ok, <0:information missing, >0:missing information guessed
Author
koeser 07/2005

Definition at line 355 of file ImageAttributes.cpp.

Referenced by BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::GetPrincipalPoint ( double &  x,
double &  y 
)

look up principal point

Returns
0:ok, <0:information missing, >0:missing information guessed
Author
koeser 07/2005

Definition at line 406 of file ImageAttributes.cpp.

Referenced by BIAS::ProjectionParametersIO::ReadFromEXIF().

bool ImageAttributes::GetRational_ ( const std::string &  key,
double &  value 
)
protected

Definition at line 275 of file ImageAttributes.cpp.

bool ImageAttributes::GetShort_ ( const std::string &  key,
int &  value 
)
protected

Definition at line 288 of file ImageAttributes.cpp.

bool ImageAttributes::GetString_ ( const std::string &  key,
std::string &  value 
)
protected

Definition at line 264 of file ImageAttributes.cpp.

void ImageAttributes::InitExifTags ( )
long int BIAS::Debug::Name2DebugLevel ( const std::string &  name) const
inlineinherited

looks up a debuglevel in the internal map, returns 0 if not found

Author
woelk 09/2006

Definition at line 454 of file Debug.hh.

long int BIAS::Debug::NewDebugLevel ( const std::string &  name)
inlineinherited
std::ostream & ImageAttributes::Print ( std::ostream &  os = std::cout,
const bool  printAll = false 
) const

print the content of this to os

Parameters
printAlltrue prints all tags, false only those whose value is not empty.
Examples:
ExampleImageAttributes.cpp.

Definition at line 241 of file ImageAttributes.cpp.

void BIAS::Debug::PrintDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

Definition at line 383 of file Debug.hh.

int ImageAttributes::Read ( const std::string &  filename)

main entry routine to read all EXIF tags from the header of image file.

Returns
BIAS_IMAGEATTRIBUTES_SUCCESS if OK.
Parameters
filenameimage to ping and read header from.
Author
Jan Woetzel
Examples:
ExampleImageAttributes.cpp.

Definition at line 169 of file ImageAttributes.cpp.

Referenced by BIAS::VideoSource_Disk::OpenDevice(), and BIAS::ProjectionParametersIO::ReadFromEXIF().

int ImageAttributes::ReadMagickPP ( const std::string &  filename)
@return  BIAS_IMAGEATTRIBUTES_SUCCESS if reading was OK, negative number in case of error.
Parameters
filenameimage file to read attributes form header.
Returns
0 = ok, -1=Getting Attr. with ImageMagick failed, -2=Failed unspecified, -3=mip image, no attributes
Author
Jan Woetzel

Definition at line 175 of file ImageAttributes.cpp.

References BIAS::FileHandling::Extension().

int ImageAttributes::ReadMagickPP ( Magick::Image &  img)

direct interface to Magick::IMage to be able to read the XIF tags of an already opened image.

Returns
BIAS_IMAGEATTRIBUTES_SUCCESS;BIAS_EXIFTAGTABLE_SUCCESS
Parameters
filenameimage to ping and read header from.
Author
Jan Woetzel

Definition at line 207 of file ImageAttributes.cpp.

void BIAS::Debug::RemoveDebugLevel ( const long int  lv)
inlineinherited

Definition at line 369 of file Debug.hh.

void BIAS::Debug::RemoveDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 376 of file Debug.hh.

void BIAS::Debug::SetDebugLevel ( const long int  lv)
inlineinherited
void BIAS::Debug::SetDebugLevel ( const std::string &  name)
inlineinherited

Definition at line 325 of file Debug.hh.

void BIAS::Debug::SetDebugStream ( const std::ostream &  os)
inlineinherited

Definition at line 398 of file Debug.hh.

static void BIAS::Debug::SetGlobalDebugLevel ( long int  lev)
inlinestaticinherited

Definition at line 424 of file Debug.hh.

void BIAS::Debug::ShowDebugLevel ( std::ostream &  os = std::cout) const
inlineinherited

prints all internally known debuglevels

Author
woelk 09/2006

Definition at line 496 of file Debug.hh.

Member Data Documentation

long int BIAS::Debug::_liDebugLevel
protectedinherited

Definition at line 510 of file Debug.hh.

Referenced by BIAS::Debug::operator=(), and BIAS::ImageBase::operator=().

long int BIAS::Debug::_liNextDebugLevel
protectedinherited

new concept, debuglevel are managed here in the debug class

Definition at line 516 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::map<std::string, long int> BIAS::Debug::_String2Debuglevel
protectedinherited

Definition at line 517 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

std::ostream BIAS::Debug::_zDebugStream
staticprotectedinherited

Definition at line 511 of file Debug.hh.

Referenced by BIAS::Debug::operator=().

T std::vector< T >::elements
inherited

STL member.

long int BIAS::Debug::GlobalDebugLevel = 0
staticprotectedinherited

Definition at line 513 of file Debug.hh.


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