16 #ifndef SURGSIM_DATASTRUCTURES_IMAGE_H 17 #define SURGSIM_DATASTRUCTURES_IMAGE_H 27 namespace DataStructures
44 Image(
size_t width,
size_t height,
size_t channels);
51 Image(
size_t width,
size_t height,
size_t channels,
const T*
const data);
84 std::array<size_t, 3>
getSize()
const;
91 typedef Eigen::Map<Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic>, 0, Eigen::InnerStride<>>
ChannelType;
104 const T*
const getData()
const;
120 #endif //SURGSIM_DATASTRUCTURES_IMAGE_H Definition: DriveElementFromInputBehavior.cpp:27
std::unique_ptr< T[]> m_data
Definition: Image.h:110
A templated Image class.
Definition: Image.h:34
size_t getHeight() const
Get the Image height.
Definition: Image-inl.h:117
size_t m_width
Definition: Image.h:107
std::array< size_t, 3 > getSize() const
Get the Image size.
Definition: Image-inl.h:123
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic >, 0, Eigen::InnerStride<> > ChannelType
Type of the channel returned by getChannel.
Definition: Image.h:91
Image< T > & operator=(const Image< T > &other)
Assignment Operator.
Definition: Image-inl.h:63
size_t m_height
Definition: Image.h:108
Image()
Default Constructor.
Definition: Image-inl.h:28
size_t m_channels
Definition: Image.h:109
size_t getWidth() const
Get the Image width.
Definition: Image-inl.h:111
Image< float > Imagef
Definition: Image.h:113
virtual ~Image()
Destructor.
Definition: Image-inl.h:99
T *const getData()
Get the pointer to the data.
Definition: Image-inl.h:136
ChannelType getChannel(size_t channel)
Get the data in the channel as an eigen matrix.
Definition: Image-inl.h:104
size_t getNumChannels() const
Get the number of channels in this Image.
Definition: Image-inl.h:130