|
A templated Image class. More...
#include <SurgSim/DataStructures/Image.h>
Public Member Functions | |
| Image () | |
| Default Constructor. More... | |
| Image (size_t width, size_t height, size_t channels) | |
| Constructor. More... | |
| Image (size_t width, size_t height, size_t channels, const T *const data) | |
| Copy constructor from a data pointer. More... | |
| template<class D > | |
| Image (size_t width, size_t height, size_t channels, const D *const data) | |
| Copy constructor from a data pointer of a different type. More... | |
| Image (const Image< T > &other) | |
| Copy constructor. More... | |
| Image (Image< T > &&other) | |
| Move constructor. More... | |
| virtual | ~Image () |
| Destructor. More... | |
| Image< T > & | operator= (const Image< T > &other) |
| Assignment Operator. More... | |
| Image< T > & | operator= (Image< T > &&other) |
| Move Assignment Operator. More... | |
| T *const | getData () override |
| Get the pointer to the data. More... | |
| const T *const | getData () const override |
| Get the pointer to the data, constant version. More... | |
Public Member Functions inherited from SurgSim::DataStructures::ImageBase< T > | |
| virtual | ~ImageBase () |
| Destructor. More... | |
| size_t | getWidth () const |
| Get the Image width. More... | |
| size_t | getHeight () const |
| Get the Image height. More... | |
| std::array< size_t, 3 > | getSize () const |
| Get the Image size. More... | |
| size_t | getNumChannels () const |
| Get the number of channels in this Image. More... | |
| Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, 1 > > | operator() (size_t x, size_t y) |
| Get the pixel value at (x, y) More... | |
| Eigen::Map< const Eigen::Matrix< T, Eigen::Dynamic, 1 > > | operator() (size_t x, size_t y) const |
| Get the pixel value at (x, y), constant version. More... | |
| Eigen::Map< ChannelType, Eigen::Unaligned, Eigen::Stride<-1, -1 > > | getChannel (size_t index) |
| Get the 2D image channel data. More... | |
| Eigen::Map< const ChannelType, Eigen::Unaligned, Eigen::Stride<-1, -1 > > | getChannel (size_t index) const |
| Get the 2D image channel data, constant version. More... | |
| void | setChannel (size_t index, const Eigen::Ref< const ChannelType > &data) |
| Set the image data in the channel. More... | |
| Eigen::Map< VectorType, Eigen::Unaligned > | getAsVector () |
| Get the data as a 1D Vector. More... | |
| Eigen::Map< const VectorType, Eigen::Unaligned > | getAsVector () const |
| Get the data as a 1D Vector, constant version. More... | |
| void | setAsVector (const Eigen::Ref< const VectorType > &data) |
| Set the image data as a 1D Vector. More... | |
Private Attributes | |
| std::unique_ptr< T[]> | m_data |
Additional Inherited Members | |
Public Types inherited from SurgSim::DataStructures::ImageBase< T > | |
| typedef Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > | ChannelType |
| 2D Channel Type; More... | |
| typedef Eigen::Matrix< T, Eigen::Dynamic, 1 > | VectorType |
| 1D Vector Type; More... | |
Protected Member Functions inherited from SurgSim::DataStructures::ImageBase< T > | |
| void | setSize (size_t width, size_t height, size_t channels) |
| Set the Image size. More... | |
A templated Image class.
| T | the data type of the image data |
| SurgSim::DataStructures::Image< T >::Image | ( | ) |
Default Constructor.
| SurgSim::DataStructures::Image< T >::Image | ( | size_t | width, |
| size_t | height, | ||
| size_t | channels | ||
| ) |
Constructor.
| width | the image width |
| height | the image height |
| channels | the number of channels in the image |
| SurgSim::DataStructures::Image< T >::Image | ( | size_t | width, |
| size_t | height, | ||
| size_t | channels, | ||
| const T *const | data | ||
| ) |
Copy constructor from a data pointer.
| width | the image width |
| height | the image height |
| channels | the number of channels in the image |
| data | pointer to the data to copy from |
| SurgSim::DataStructures::Image< T >::Image | ( | size_t | width, |
| size_t | height, | ||
| size_t | channels, | ||
| const D *const | data | ||
| ) |
Copy constructor from a data pointer of a different type.
| D | type of data stored in the pointer |
| width | the image width |
| height | the image height |
| channels | the number of channels in the image |
| data | pointer to the data to copy from |
| SurgSim::DataStructures::Image< T >::Image | ( | const Image< T > & | other | ) |
Copy constructor.
| other | Image to copy from |
| SurgSim::DataStructures::Image< T >::Image | ( | Image< T > && | other | ) |
Move constructor.
| other | Image to move data from |
|
virtual |
Destructor.
|
overridevirtual |
|
overridevirtual |
Get the pointer to the data, constant version.
Implements SurgSim::DataStructures::ImageBase< T >.
| Image< T > & SurgSim::DataStructures::Image< T >::operator= | ( | const Image< T > & | other | ) |
| Image< T > & SurgSim::DataStructures::Image< T >::operator= | ( | Image< T > && | other | ) |
|
private |
1.8.13