CARLA
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | List of all members
carla::sensor::data::ImageTmpl< PixelT > Class Template Reference

Templated image for any type of pixel. More...

#include <ImageTmpl.h>

+ Inheritance diagram for carla::sensor::data::ImageTmpl< PixelT >:
+ Collaboration diagram for carla::sensor::data::ImageTmpl< PixelT >:

Public Types

using pixel_type = PixelT
 
- Public Types inherited from carla::sensor::data::Array< PixelT >
using const_iterator = typename std::add_const< value_type >::type *
 
using const_pointer = typename std::add_const< value_type >::type *
 
using const_reference = typename std::add_const< value_type >::type &
 
using const_reverse_iterator = std::reverse_iterator< const_iterator >
 
using iterator = value_type *
 
using pointer = value_type *
 
using reference = value_type &
 
using reverse_iterator = std::reverse_iterator< iterator >
 
using size_type = size_t
 
using value_type = PixelT
 

Public Member Functions

auto GetFOVAngle () const
 Get horizontal field of view of the image in degrees. More...
 
auto GetHeight () const
 Get image height in pixels. More...
 
auto GetWidth () const
 Get image width in pixels. More...
 
- Public Member Functions inherited from carla::sensor::data::Array< PixelT >
reference at (size_type pos)
 
const_reference at (size_type pos) const
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
const_reverse_iterator crbegin () const
 
const_reverse_iterator crend () const
 
value_typedata ()
 
const value_typedata () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
reference operator[] (size_type pos)
 
const_reference operator[] (size_type pos) const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
size_type size () const
 
- Public Member Functions inherited from carla::sensor::SensorData
size_t GetFrame () const
 Frame count when the data was generated. More...
 
const rpc::TransformGetSensorTransform () const
 Sensor's transform when the data was generated. More...
 
double GetTimestamp () const
 Simulation-time when the data was generated. More...
 
virtual ~SensorData ()=default
 

Protected Types

using Serializer = s11n::ImageSerializer
 
using SerializerNormals = s11n::NormalsImageSerializer
 
using SerializerOpticalFlow = s11n::OpticalFlowImageSerializer
 

Protected Member Functions

 ImageTmpl (RawData &&data)
 
- Protected Member Functions inherited from carla::sensor::data::Array< PixelT >
 Array (RawData &&data, FuncT get_offset)
 
 Array (size_t offset, RawData &&data)
 
const RawDataGetRawData () const
 
- Protected Member Functions inherited from carla::sensor::SensorData
const auto & GetEpisode () const
 
 SensorData (size_t frame, double timestamp, const rpc::Transform &sensor_transform)
 
 SensorData (const RawData &data)
 

Protected Attributes

friend Serializer
 
friend SerializerNormals
 
friend SerializerOpticalFlow
 

Private Types

using Super = Array< PixelT >
 

Private Member Functions

const auto & GetHeader () const
 

Detailed Description

template<typename PixelT>
class carla::sensor::data::ImageTmpl< PixelT >

Templated image for any type of pixel.

Definition at line 21 of file ImageTmpl.h.

Member Typedef Documentation

◆ pixel_type

template<typename PixelT>
using carla::sensor::data::ImageTmpl< PixelT >::pixel_type = PixelT

Definition at line 46 of file ImageTmpl.h.

◆ Serializer

template<typename PixelT>
using carla::sensor::data::ImageTmpl< PixelT >::Serializer = s11n::ImageSerializer
protected

Definition at line 25 of file ImageTmpl.h.

◆ SerializerNormals

template<typename PixelT>
using carla::sensor::data::ImageTmpl< PixelT >::SerializerNormals = s11n::NormalsImageSerializer
protected

Definition at line 27 of file ImageTmpl.h.

◆ SerializerOpticalFlow

template<typename PixelT>
using carla::sensor::data::ImageTmpl< PixelT >::SerializerOpticalFlow = s11n::OpticalFlowImageSerializer
protected

Definition at line 26 of file ImageTmpl.h.

◆ Super

template<typename PixelT>
using carla::sensor::data::ImageTmpl< PixelT >::Super = Array<PixelT>
private

Definition at line 22 of file ImageTmpl.h.

Constructor & Destructor Documentation

◆ ImageTmpl()

template<typename PixelT>
carla::sensor::data::ImageTmpl< PixelT >::ImageTmpl ( RawData &&  data)
inlineexplicitprotected

Definition at line 33 of file ImageTmpl.h.

References DEBUG_ASSERT, carla::sensor::data::ImageTmpl< PixelT >::GetHeight(), carla::sensor::data::ImageTmpl< PixelT >::GetWidth(), and carla::sensor::data::Array< PixelT >::size().

+ Here is the call graph for this function:

Member Function Documentation

◆ GetFOVAngle()

template<typename PixelT>
auto carla::sensor::data::ImageTmpl< PixelT >::GetFOVAngle ( ) const
inline

Get horizontal field of view of the image in degrees.

Definition at line 59 of file ImageTmpl.h.

References carla::sensor::data::ImageTmpl< PixelT >::GetHeader().

+ Here is the call graph for this function:

◆ GetHeader()

template<typename PixelT>
const auto& carla::sensor::data::ImageTmpl< PixelT >::GetHeader ( ) const
inlineprivate

Definition at line 40 of file ImageTmpl.h.

References carla::sensor::s11n::ImageSerializer::DeserializeHeader(), and carla::sensor::data::Array< PixelT >::GetRawData().

Referenced by carla::sensor::data::ImageTmpl< PixelT >::GetFOVAngle(), carla::sensor::data::ImageTmpl< PixelT >::GetHeight(), and carla::sensor::data::ImageTmpl< PixelT >::GetWidth().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetHeight()

template<typename PixelT>
auto carla::sensor::data::ImageTmpl< PixelT >::GetHeight ( ) const
inline

Get image height in pixels.

Definition at line 54 of file ImageTmpl.h.

References carla::sensor::data::ImageTmpl< PixelT >::GetHeader().

Referenced by carla::sensor::data::ImageTmpl< PixelT >::ImageTmpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetWidth()

template<typename PixelT>
auto carla::sensor::data::ImageTmpl< PixelT >::GetWidth ( ) const
inline

Get image width in pixels.

Definition at line 49 of file ImageTmpl.h.

References carla::sensor::data::ImageTmpl< PixelT >::GetHeader().

Referenced by carla::sensor::data::ImageTmpl< PixelT >::ImageTmpl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ Serializer

template<typename PixelT>
friend carla::sensor::data::ImageTmpl< PixelT >::Serializer
protected

Definition at line 29 of file ImageTmpl.h.

◆ SerializerNormals

template<typename PixelT>
friend carla::sensor::data::ImageTmpl< PixelT >::SerializerNormals
protected

Definition at line 31 of file ImageTmpl.h.

◆ SerializerOpticalFlow

template<typename PixelT>
friend carla::sensor::data::ImageTmpl< PixelT >::SerializerOpticalFlow
protected

Definition at line 30 of file ImageTmpl.h.


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