NamedImage is an Image with a name. It inherits all functionality of Image. More...
#include <Image/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::string & | name () 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. |
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.
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.
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.
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.
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.
NamedImage< T >::NamedImage | ( | const NamedImage< T2 > & | A | ) | [inline] |
Conversion and copy constructor.
Definition at line 118 of file NamedImage.H.
NamedImage< T >::~NamedImage | ( | ) | [inline, virtual] |
Destructor.
Definition at line 138 of file NamedImage.H.
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().
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=().
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 NamedImage< T >::operator=().
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().
Referenced by NamedImage< T >::operator=().
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().
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().