43 inline QImage&
data() {
return m_image; }
45 inline const QImage&
data()
const {
return m_image; }
51 inline unsigned getW()
const {
return m_width; }
54 inline unsigned getH()
const {
return m_height; }
60 inline float getAlpha()
const {
return m_texAlpha; }
76 return m_associatedSensor;
int64_t CV_CLASS_ENUM
Type of object type flags (64 bits)
std::shared_ptr< core::Tensor > image
Camera (projective) sensor.
Hierarchical CLOUDVIEWER Object.
unsigned getW() const
Returns image width.
virtual void drawMeOnly(CC_DRAW_CONTEXT &context) override
Draws the entity only (not its children)
virtual void onDeletionOf(const ccHObject *obj) override
This method is called when another object is deleted.
float m_texAlpha
Texture transparency.
bool load(const QString &filename, QString &error)
Loads image from file.
unsigned m_height
Image height (in pixels)
virtual bool isSerializable() const override
Returns whether object is serializable of not.
ccImage()
Default constructor.
void setData(const QImage &image)
Sets image data.
unsigned getH() const
Returns image height.
void setAspectRatio(float ar)
Manually sets aspect ratio.
ccImage(const QImage &image, const QString &name=QString("unknown"))
Constructor from QImage.
ccCameraSensor * getAssociatedSensor()
Returns associated sensor.
bool toFile_MeOnly(QFile &out, short dataVersion) const override
Save own object data.
short minimumFileVersion_MeOnly() const override
const QImage & data() const
Returns image data (const version)
bool fromFile_MeOnly(QFile &in, short dataVersion, int flags, LoadedIDMap &oldToNewIDMap) override
Loads own object data.
float getAspectRatio() const
Returns aspect ratio.
QImage & data()
Returns image data.
float getAlpha() const
Returns image texture transparency.
ccCameraSensor * m_associatedSensor
Associated sensor.
void setAlpha(float value)
Sets image texture transparency.
float m_aspectRatio
Aspect ratio w/h.
void setAssociatedSensor(ccCameraSensor *sensor)
Sets associated sensor.
unsigned m_width
Image width (in pixels)
void updateAspectRatio()
Updates aspect ratio.
QImage m_image
Image data.
virtual CV_CLASS_ENUM getClassID() const override
Returns unique class ID.
const ccCameraSensor * getAssociatedSensor() const
Returns associated sensor (const version)
QMultiMap< unsigned, unsigned > LoadedIDMap
Map of loaded unique IDs (old ID --> new ID)
static void error(char *msg)