Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

NamedImage< T > Class Template Reference

#include <Image/NamedImage.H>

Inheritance diagram for NamedImage< T >:

Inheritance graph
[legend]
Collaboration diagram for NamedImage< T >:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class T>
class NamedImage< T >

NamedImage is an Image with a name. It inherits all functionality of Image.

A copy of the name string is made at construction, and is held in a shared_ptr, so that further copying NamedImage objects arround will not copy again the name string.

Definition at line 48 of file NamedImage.H.

Public Member Functions

template<class T2>
 NamedImage (const Image< T2 > &img, const std::string &name)
 Construct from an existing Image, possibly converting along the way.
template<class T2>
 NamedImage (const Image< T2 > &img, const char *name)
 Construct from an existing Image, possibly converting along the way.
 NamedImage (const std::string &name)
 Construct an empty (0-by-0) image (useful for arrays of Images).
 NamedImage (const char *name="")
 Construct an empty (0-by-0) image (useful for arrays of Images).
template<class T2>
 NamedImage (const NamedImage< T2 > &A)
 Conversion and copy constructor.
template<class T2>
NamedImage< T > & operator= (const NamedImage< T2 > &A)
 Conversion and assigment operator.
template<class TT>
NamedImage< T > & operator= (const Image< TT > &img)
 Assign from an image, preserving our name and doing a clamped convert.
virtual ~NamedImage ()
 Destructor.
const std::stringname () const
 Get the name.
void setName (const std::string &name)
 Set the name post hoc.
void setName (const char *name)
 Set the name post hoc.
const rutz::shared_ptr< std::string > & namePtr () const
 Access our pointer to our name.


Constructor & Destructor Documentation

template<class T>
template<class T2>
NamedImage< T >::NamedImage const Image< T2 > &  img,
const std::string name
[inline]
 

Construct from an existing Image, possibly converting along the way.

Definition at line 98 of file NamedImage.H.

template<class T>
template<class T2>
NamedImage< T >::NamedImage const Image< T2 > &  img,
const char *  name
[inline]
 

Construct from an existing Image, possibly converting along the way.

Definition at line 103 of file NamedImage.H.

template<class T>
NamedImage< T >::NamedImage const std::string name  )  [inline]
 

Construct an empty (0-by-0) image (useful for arrays of Images).

Definition at line 108 of file NamedImage.H.

template<class T>
NamedImage< T >::NamedImage const char *  name = ""  )  [inline]
 

Construct an empty (0-by-0) image (useful for arrays of Images).

Definition at line 113 of file NamedImage.H.

template<class T>
template<class T2>
NamedImage< T >::NamedImage const NamedImage< T2 > &  A  )  [inline]
 

Conversion and copy constructor.

Definition at line 118 of file NamedImage.H.

template<class T>
NamedImage< T >::~NamedImage  )  [inline, virtual]
 

Destructor.

Definition at line 138 of file NamedImage.H.


Member Function Documentation

template<class T>
const std::string & NamedImage< T >::name  )  const [inline]
 

Get the name.

Definition at line 142 of file NamedImage.H.

References rutz::shared_ptr< T >::get().

Referenced by GetSaliency::getSubMaps(), SimulationViewerStd::prepMapForDisplay(), and SimulationViewerStats::save1().

template<class T>
const rutz::shared_ptr< std::string > & NamedImage< T >::namePtr  )  const [inline]
 

Access our pointer to our name.

Definition at line 154 of file NamedImage.H.

Referenced by NamedImage< T >::operator=().

template<class T>
template<class TT>
NamedImage< T > & NamedImage< T >::operator= const Image< TT > &  img  )  [inline]
 

Assign from an image, preserving our name and doing a clamped convert.

This is potentially dangerous, and mostly provided so that we can inherit all of the Image free functions that return images (e.g., those of Image/MathOps.H).

Definition at line 131 of file NamedImage.H.

References Image< T >::operator=().

template<class T>
template<class T2>
NamedImage< T > & NamedImage< T >::operator= const NamedImage< T2 > &  A  )  [inline]
 

Conversion and assigment operator.

Definition at line 123 of file NamedImage.H.

References NamedImage< T >::namePtr(), and Image< T >::operator=().

template<class T>
void NamedImage< T >::setName const char *  name  )  [inline]
 

Set the name post hoc.

Definition at line 150 of file NamedImage.H.

References rutz::shared_ptr< T >::reset().

template<class T>
void NamedImage< T >::setName const std::string name  )  [inline]
 

Set the name post hoc.

Definition at line 146 of file NamedImage.H.

References rutz::shared_ptr< T >::reset().


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 13:46:06 2009 for iLab Neuromorphic Vision Toolkit by  doxygen 1.4.4