itk::MetaDataDictionary Class Reference

#include <itkMetaDataDictionary.h>

Collaboration diagram for itk::MetaDataDictionary:

Collaboration graph
[legend]

List of all members.

Public Types

typedef MetaDataDictionary Self
typedef
MetaDataDictionaryMapType::iterator 
Iterator
typedef
MetaDataDictionaryMapType::const_iterator 
ConstIterator

Public Member Functions

virtual void Print (std::ostream &os) const
 MetaDataDictionary (const MetaDataDictionary &)
void operator= (const MetaDataDictionary &)
std::vector< std::string > GetKeys () const
MetaDataObjectBase::Pointeroperator[] (const std::string &)
const MetaDataObjectBaseoperator[] (const std::string &) const
bool HasKey (const std::string &) const
Iterator Begin ()
ConstIterator Begin () const
Iterator End ()
ConstIterator End () const
Iterator Find (const std::string &key)
ConstIterator Find (const std::string &key) const

Private Attributes

MetaDataDictionaryMapType * m_Dictionary

Classes

class  MetaDataDictionaryMapType


Detailed Description

Author:
Hans J. Johnson The MetaDataDictionary, along with the MetaDataObject derived template classes, is designed to provide a mechanism for storing a collection of arbitrary data types. The main motivation for such a collection is to associate arbitrary data elements with itk DataObjects.

Definition at line 35 of file itkMetaDataDictionary.h.


Member Function Documentation

void itk::MetaDataDictionary::Print ( std::ostream &  os  )  const [virtual]

Defines the default behavior for printing out this element

Parameters:
os An output stream

Definition at line 53 of file itkMetaDataDictionary.cxx.

00054 {
00055   for(MetaDataDictionaryMapType::const_iterator it=m_Dictionary->begin();
00056       it != m_Dictionary->end();
00057       it++)
00058     {
00059     os << (*it).first <<  "  ";
00060     (*it).second->Print(os);
00061     }
00062 }

std::vector< std::string > itk::MetaDataDictionary::GetKeys (  )  const

Returns a vector of keys to the key/value entries in the dictionary. Iterate through the dictionary using these keys.

Definition at line 90 of file itkMetaDataDictionary.cxx.

Referenced by itk::GDCMImageIO::Write(), itk::NrrdImageIO::Write(), and itk::VoxBoCUBImageIO::WriteImageInformation().

00091 {
00092   typedef std::vector<std::string> VectorType;
00093   VectorType ans;
00094 
00095   for (MetaDataDictionaryMapType::const_iterator it = m_Dictionary->begin();
00096        it != m_Dictionary->end(); ++it)
00097     {
00098     ans.push_back( (*it).first );
00099     }
00100 
00101   return ans;
00102 }

MetaDataDictionary::Iterator itk::MetaDataDictionary::Begin ( void   ) 

Warning:
the following functions SHOULD NOT be used with the visual studio 6 compiler since iterator outside of the dll context cannot be dereferenced safely Returns an iterator to the beginning of the map

Definition at line 106 of file itkMetaDataDictionary.cxx.

Referenced by itk::GDCMImageIO::Write().

00107 {
00108   return m_Dictionary->begin();
00109 }

MetaDataDictionary::Iterator itk::MetaDataDictionary::End ( void   ) 

Returns an iterator to the end of the map

Definition at line 122 of file itkMetaDataDictionary.cxx.

Referenced by itk::GDCMImageIO::Write().

00123 {
00124   return m_Dictionary->end();
00125 }

MetaDataDictionary::Iterator itk::MetaDataDictionary::Find ( const std::string &  key  ) 

Returns an iterator matching the string key

Definition at line 137 of file itkMetaDataDictionary.cxx.

00138 {
00139   return m_Dictionary->find(key);
00140 }


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

Generated at Wed Jul 14 07:23:39 2010 for OTB with doxygen 1.5.6