Orfeo Toolbox  3.16
Public Types | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
itk::Brains2HeaderBase Class Reference

#include <itkBrains2HeaderBase.h>

+ Inheritance diagram for itk::Brains2HeaderBase:
+ Collaboration diagram for itk::Brains2HeaderBase:

List of all members.

Public Types

typedef const SelfConstPointer
typedef SelfPointer
typedef Brains2HeaderBase Self
typedef std::list< std::pair
< std::string, std::string > > 
Superclass

Public Member Functions

 Brains2HeaderBase ()
virtual ~Brains2HeaderBase ()
void ClearHeader (void)
bool DoesKeyExist (const std::string &KeyID) const
float getFloat (const std::string &KeyID) const
int getInt (const std::string &KeyID) const
std::string getString (const std::string &KeyID) const
virtual void PrintSelf (std::ostream &os) const
virtual void ReadBrains2Header (std::string filename)
virtual std::ifstream & ReadBrains2Header (std::ifstream &inputstream)
virtual void WriteBrains2Header (std::string filename) const
virtual std::ofstream & WriteBrains2Header (std::ofstream &outputstream) const

Public Attributes

elements
 STL member.

Protected Member Functions

virtual std::string GetHeaderBeginTag (void) const =0
virtual std::string GetHeaderEndTag (void) const =0

Protected Attributes

std::list< Brains2HeaderBase * > m_Child

Detailed Description

An abstract class to define b2 header information. This just adds file reading and writing routines to the standard STL std::list< std::pair<std::string, std::string> >

Definition at line 36 of file itkBrains2HeaderBase.h.


Member Typedef Documentation

Definition at line 43 of file itkBrains2HeaderBase.h.

Definition at line 42 of file itkBrains2HeaderBase.h.

Standard class typedefs.

Definition at line 40 of file itkBrains2HeaderBase.h.

typedef std::list< std::pair<std::string, std::string> > itk::Brains2HeaderBase::Superclass

Definition at line 41 of file itkBrains2HeaderBase.h.


Constructor & Destructor Documentation

itk::Brains2HeaderBase::Brains2HeaderBase ( )

Default constructor

Author:
Hans J. Johnson

Definition at line 27 of file itkBrains2HeaderBase.cxx.

itk::Brains2HeaderBase::~Brains2HeaderBase ( )
virtual

Default destructor

Author:
Hans J. Johnson

Definition at line 31 of file itkBrains2HeaderBase.cxx.

References ClearHeader().


Member Function Documentation

void itk::Brains2HeaderBase::ClearHeader ( void  )

A function to clear the header of all values

Author:
Hans J. Johnson
Postcondition:
After this function is completed, the lists will all be empty.

Definition at line 48 of file itkBrains2HeaderBase.cxx.

References m_Child.

Referenced by itk::Brains2MaskImageIO::CanReadFile(), and ~Brains2HeaderBase().

bool itk::Brains2HeaderBase::DoesKeyExist ( const std::string &  KeyID) const

A funtion to determine if a tag exists

Author:
Hans J. Johnson
Parameters:
KeyID
Returns:
true if a key is found, and false otherwise

Definition at line 158 of file itkBrains2HeaderBase.cxx.

References m_Child.

Referenced by itk::Brains2MaskImageIO::CanReadFile().

float itk::Brains2HeaderBase::getFloat ( const std::string &  KeyID) const

A function to return the value associated with a key as a floating point number.

Author:
Hans J. Johnson
Parameters:
KeyIDA string that identifies the desired key.
Returns:
The requested floating point number, or 0.0F if KeyID not found.

Definition at line 212 of file itkBrains2HeaderBase.cxx.

References getString().

Referenced by itk::Brains2MaskImageIO::CanReadFile().

virtual std::string itk::Brains2HeaderBase::GetHeaderBeginTag ( void  ) const
protectedpure virtual
virtual std::string itk::Brains2HeaderBase::GetHeaderEndTag ( void  ) const
protectedpure virtual
int itk::Brains2HeaderBase::getInt ( const std::string &  KeyID) const

A function to return the value associated with a key as an integer number.

Author:
Hans J. Johnson
Parameters:
KeyIDA string that identifies the desired key.
Returns:
The requested integer number, or 0. if KeyID not found.

Definition at line 222 of file itkBrains2HeaderBase.cxx.

References getString().

Referenced by itk::Brains2MaskImageIO::CanReadFile().

std::string itk::Brains2HeaderBase::getString ( const std::string &  KeyID) const

A function to return the value associated with a key as a string.

Author:
Hans J. Johnson
Parameters:
KeyIDA string that identifies the desired key.
Returns:
The requested string, or "" if KeyID not found.

Definition at line 184 of file itkBrains2HeaderBase.cxx.

References m_Child.

Referenced by itk::Brains2MaskImageIO::CanReadFile(), getFloat(), and getInt().

void itk::Brains2HeaderBase::PrintSelf ( std::ostream &  os) const
virtual

A routine for printing Brains2 header information to a standard stream

Author:
Hans J. Johnson
Parameters:
osThe stream to print to

Definition at line 139 of file itkBrains2HeaderBase.cxx.

References m_Child.

void itk::Brains2HeaderBase::ReadBrains2Header ( std::string  filename)
virtual

A routine for reading Brains2 header information from a file

Author:
Hans J. Johnson
Parameters:
filenameThe name of the file to read header information from

Definition at line 36 of file itkBrains2HeaderBase.cxx.

Referenced by itk::Brains2MaskImageIO::CanReadFile().

std::ifstream & itk::Brains2HeaderBase::ReadBrains2Header ( std::ifstream &  inputstream)
virtual

A routine for reading Brains2 header information from a file

Author:
Hans J. Johnson
Parameters:
inputstreamThe file stream to read from.
Returns:
the current location in the input stream
Precondition:
The file must already have been opened and be prepared to reading
Postcondition:
The file stream is left open.

Definition at line 76 of file itkBrains2HeaderBase.cxx.

References itk::Brains2HeaderFactory::CreateBrains2HeaderReader(), GetHeaderEndTag(), m_Child, NULL, and itk::value_type().

void itk::Brains2HeaderBase::WriteBrains2Header ( std::string  filename) const
virtual

A routine for writing Brains2 header information from a file

Author:
Hans J. Johnson
Parameters:
filenameThe name of the file to write header information to

Definition at line 64 of file itkBrains2HeaderBase.cxx.

std::ofstream & itk::Brains2HeaderBase::WriteBrains2Header ( std::ofstream &  outputstream) const
virtual

A routine for writing Brains2 header information from a file

Author:
Hans J. Johnson
Parameters:
outputstreamThe file stream to write to.
Returns:
the current location in the input stream
Precondition:
The file must already have been opened and be prepared to reading
Postcondition:
The file stream is left open.

Definition at line 135 of file itkBrains2HeaderBase.cxx.


Member Data Documentation

template<typename T>
T std::list< T >::elements
inherited

STL member.

std::list<Brains2HeaderBase *> itk::Brains2HeaderBase::m_Child
protected

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

Generated at Sun Feb 3 2013 01:16:56 for Orfeo Toolbox with doxygen 1.8.1.1