te::qt::widgets::ImageItem Class Referenceabstract

#include <ImageItem.h>

Inheritance diagram for te::qt::widgets::ImageItem:
te::qt::widgets::AnimationItem te::qt::widgets::Eta5kmItem te::qt::widgets::GoesItem te::qt::widgets::HidroItem te::qt::widgets::QtKnowItem

Public Member Functions

void adjustDataToAnimationTemporalExtent ()
 Adjust data for a given time animation period. More...
 
void calculateCurrentFile (const unsigned int &curTime)
 Calculate current file. More...
 
void draw ()
 Draw the current image item. More...
 
virtual void drawCurrentImage (QPainter *p)
 Get current image. More...
 
void drawForward (const unsigned int &curTime)
 Draw current image item. curTime The animation current time. More...
 
void erase (const unsigned int &curTime)
 Draw current image item. curTime The animation current time. More...
 
void generateRoute ()
 It generate the raster route. More...
 
virtual bool getCtlParameters ()
 Get control parameters. More...
 
QAbstractAnimation::Direction getDirection ()
 Gets the Animation Item direction. More...
 
unsigned int getDuration ()
 Gets the Animation Item duration. More...
 
QPoint getPosInDeviceCoordinate ()
 It returns the Animation Item position in device coordinate. More...
 
QRect getRect ()
 It gets image rect in device coordinate. More...
 
 ImageItem ()
 Empty Constructor. More...
 
 ImageItem (const QString &title, const QString &folder, te::qt::widgets::MapDisplay *display)
 Constructor It constructs a Image Item. More...
 
virtual void loadCurrentImage ()
 Get current image. More...
 
virtual bool loadData ()
 Load temporal raster data. More...
 
void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *)
 Paint a image item. More...
 
void setDirection (const QAbstractAnimation::Direction &direction)
 Sets the Animation Item direction. More...
 
void setDuration (const unsigned int &duration)
 Sets the Animation Item duration. More...
 
void setImagePosition (const QPointF &p, const QRectF &dr)
 
void setLUT (const std::vector< std::pair< int, QColor > > &tab)
 Sets the LUT. tab The LUT information. More...
 
void tryDoReprojectionUsingAffineTransform (QPainter *painter)
 It try do reprojection using affine transfom. For small areas it gives a good result, however, for larger areas the result is not good. More...
 
virtual ~ImageItem ()
 Destructor It destructs a Image Item. More...
 

Public Attributes

Animationm_animation
 The animation this item. More...
 
QVector< QString > m_animationFiles
 The png files in display projection. It contains only the portions to be animated. More...
 
QVector< QPointF > m_animationRoute
 It contains only the portions to be animated. More...
 
QVector< te::dt::TimeInstantm_animationTime
 The animation time. It contains only the portions to be animated. More...
 
bool m_automaticPan
 True if automatic pan over this item. More...
 
QString m_baseFile
 Base file name. More...
 
QString m_currentImageFile
 Image to be displayed on paint event animation. More...
 
unsigned int m_curTimeDuration
 Current time (ms). Its value is between 0 and the total duration. More...
 
QDir m_dir
 The image data directory. More...
 
QAbstractAnimation::Direction m_direction
 The direction. More...
 
te::qt::widgets::MapDisplaym_display
 Indicates where the icon item is displayed. More...
 
unsigned int m_duration
 The duration this item. More...
 
QVector< QString > m_files
 The input files. More...
 
QImage * m_image
 current image More...
 
QPointF m_imageCenterPos
 Center of the image. More...
 
QRectF m_imaRect
 Image location. More...
 
std::map< uchar, QColor > m_lut
 LUT. More...
 
QMatrix m_matrix
 The display transformation matrix. More...
 
size_t m_ncols
 number of colunms. More...
 
size_t m_nlines
 number of lines. More...
 
double m_norFinalTime
 Normalized final time (between 0 and 1). More...
 
double m_norInitialTime
 Normalized initial time (between 0 and 1). More...
 
int m_opacity
 Opacity. More...
 
double m_panFactor
 the range is between 0.002 and 0.5 More...
 
QPointF m_pos
 The icon position. More...
 
te::gm::LineStringm_route
 The input path in world coordenates. More...
 
int m_SRID
 The input route srid. More...
 
QString m_suffix
 File suffix. More...
 
QVector< te::dt::TimeInstantm_time
 The input time. More...
 
QString m_title
 The icon item title. More...
 
float m_undef
 undef value. More...
 

Properties

QPointF pos
 

Private Member Functions

virtual te::dt::TimeInstant getTime (QString file)=0
 Get time of the raster data. More...
 

Detailed Description

Definition at line 62 of file ImageItem.h.

Constructor & Destructor Documentation

te::qt::widgets::ImageItem::ImageItem ( )

Empty Constructor.

Definition at line 14 of file ImageItem.cpp.

te::qt::widgets::ImageItem::ImageItem ( const QString &  title,
const QString &  folder,
te::qt::widgets::MapDisplay display 
)

Constructor It constructs a Image Item.

Parameters
titleThe image item title.
folderThe absolute folder path name.
displayWhere the pixmap item is displayed.

Definition at line 20 of file ImageItem.cpp.

References m_baseFile, m_dir, m_lut, and m_suffix.

te::qt::widgets::ImageItem::~ImageItem ( )
virtual

Destructor It destructs a Image Item.

Definition at line 37 of file ImageItem.cpp.

Member Function Documentation

void te::qt::widgets::ImageItem::adjustDataToAnimationTemporalExtent ( )
virtual

Adjust data for a given time animation period.

Reimplemented from te::qt::widgets::AnimationItem.

Definition at line 343 of file ImageItem.cpp.

References te::qt::widgets::AnimationItem::adjustDataToAnimationTemporalExtent().

void te::qt::widgets::ImageItem::calculateCurrentFile ( const unsigned int &  curTime)

Calculate current file.

Parameters
curTimecurrent time

Definition at line 413 of file ImageItem.cpp.

void te::qt::widgets::ImageItem::draw ( )
virtual

Draw the current image item.

Implements te::qt::widgets::AnimationItem.

Definition at line 407 of file ImageItem.cpp.

void te::qt::widgets::ImageItem::drawCurrentImage ( QPainter *  p)
virtual

Get current image.

p Pointer to QPainter. r Image rect in device coordinate. ima Pointer to QImage.

Definition at line 187 of file ImageItem.cpp.

Referenced by te::qt::widgets::TimeSliderWidget::onDisplayPaintEvent().

void te::qt::widgets::ImageItem::drawForward ( const unsigned int &  curTime)
virtual

Draw current image item. curTime The animation current time.

Implements te::qt::widgets::AnimationItem.

Definition at line 394 of file ImageItem.cpp.

void te::qt::widgets::ImageItem::erase ( const unsigned int &  curTime)
virtual

Draw current image item. curTime The animation current time.

Implements te::qt::widgets::AnimationItem.

Definition at line 402 of file ImageItem.cpp.

void te::qt::widgets::ImageItem::generateRoute ( )

It generate the raster route.

animation The animation control.

Parameters
countThe temporal data size.

Definition at line 465 of file ImageItem.cpp.

References te::gm::LineStringType.

bool te::qt::widgets::ImageItem::getCtlParameters ( )
virtual

Get control parameters.

Reimplemented in te::qt::widgets::Eta5kmItem, and te::qt::widgets::HidroItem.

Definition at line 95 of file ImageItem.cpp.

QAbstractAnimation::Direction te::qt::widgets::AnimationItem::getDirection ( )
inherited

Gets the Animation Item direction.

Returns
The Animation Item direction.

Definition at line 67 of file AnimationItem.cpp.

unsigned int te::qt::widgets::AnimationItem::getDuration ( )
inherited

Gets the Animation Item duration.

Returns
The Animation Item duration.

Definition at line 62 of file AnimationItem.cpp.

QPoint te::qt::widgets::AnimationItem::getPosInDeviceCoordinate ( )
inherited

It returns the Animation Item position in device coordinate.

Returns
Position in device coordinate.

Definition at line 33 of file AnimationItem.cpp.

References TE_UNKNOWN_SRS, and te::gm::AbstractPoint::transform().

QRect te::qt::widgets::ImageItem::getRect ( )

It gets image rect in device coordinate.

Definition at line 428 of file ImageItem.cpp.

References TE_UNKNOWN_SRS, and te::gm::Envelope::transform().

Referenced by te::qt::widgets::TimeSliderWidget::onDisplayPaintEvent().

virtual te::dt::TimeInstant te::qt::widgets::ImageItem::getTime ( QString  file)
privatepure virtual

Get time of the raster data.

file raster data file name.

The time instant.

Implemented in te::qt::widgets::Eta5kmItem, te::qt::widgets::HidroItem, te::qt::widgets::GoesItem, and te::qt::widgets::QtKnowItem.

void te::qt::widgets::ImageItem::loadCurrentImage ( )
virtual

Get current image.

pointer to current image.

Reimplemented in te::qt::widgets::Eta5kmItem, and te::qt::widgets::HidroItem.

Definition at line 174 of file ImageItem.cpp.

Referenced by te::qt::widgets::TimeSliderWidget::onDisplayPaintEvent().

bool te::qt::widgets::ImageItem::loadData ( )
virtual

Load temporal raster data.

True if success.

Reimplemented in te::qt::widgets::Eta5kmItem, and te::qt::widgets::HidroItem.

Definition at line 56 of file ImageItem.cpp.

Referenced by te::qt::widgets::TimeSliderWidget::loadImageData().

void te::qt::widgets::ImageItem::paint ( QPainter *  ,
const QStyleOptionGraphicsItem *  ,
QWidget *   
)
virtual

Paint a image item.

Implements te::qt::widgets::AnimationItem.

Definition at line 385 of file ImageItem.cpp.

void te::qt::widgets::AnimationItem::setDirection ( const QAbstractAnimation::Direction &  direction)
inherited

Sets the Animation Item direction.

Parameters
directionThe Animation Item direction.

Definition at line 56 of file AnimationItem.cpp.

Referenced by te::qt::widgets::TimeSliderWidget::setDirection().

void te::qt::widgets::AnimationItem::setDuration ( const unsigned int &  duration)
inherited

Sets the Animation Item duration.

Parameters
durationThe Animation Item duration.

Definition at line 46 of file AnimationItem.cpp.

Referenced by te::qt::widgets::TimeSliderWidget::setDirection(), and te::qt::widgets::AnimationScene::setDuration().

void te::qt::widgets::ImageItem::setImagePosition ( const QPointF &  p,
const QRectF &  dr 
)
void te::qt::widgets::ImageItem::setLUT ( const std::vector< std::pair< int, QColor > > &  tab)

Sets the LUT. tab The LUT information.

Definition at line 441 of file ImageItem.cpp.

Referenced by te::qt::widgets::Eta5kmItem::setLUT(), and te::qt::widgets::HidroItem::setLUT().

void te::qt::widgets::ImageItem::tryDoReprojectionUsingAffineTransform ( QPainter *  painter)

It try do reprojection using affine transfom. For small areas it gives a good result, however, for larger areas the result is not good.

Parameters
painterPainter that will be configured to try do reprojection.

Definition at line 244 of file ImageItem.cpp.

References te::gm::LineString::getPointN(), te::gm::Point::getX(), te::gm::Point::getY(), te::gm::LineStringType, PI, te::gm::LineString::setPoint(), TE_UNKNOWN_SRS, and te::gm::LineString::transform().

Member Data Documentation

QVector<QString> te::qt::widgets::ImageItem::m_animationFiles

The png files in display projection. It contains only the portions to be animated.

Definition at line 197 of file ImageItem.h.

QVector<QPointF> te::qt::widgets::AnimationItem::m_animationRoute
inherited

It contains only the portions to be animated.

Definition at line 150 of file AnimationItem.h.

Referenced by te::qt::widgets::Animation::setDataKeyValues().

QVector<te::dt::TimeInstant> te::qt::widgets::AnimationItem::m_animationTime
inherited

The animation time. It contains only the portions to be animated.

Definition at line 148 of file AnimationItem.h.

Referenced by te::qt::widgets::Animation::getAnimationDataIndex(), te::qt::widgets::TimeSliderWidget::onDisplayPaintEvent(), and te::qt::widgets::Animation::setDataKeyValues().

bool te::qt::widgets::AnimationItem::m_automaticPan
inherited

True if automatic pan over this item.

Definition at line 152 of file AnimationItem.h.

Referenced by te::qt::widgets::TimeSliderWidget::adjustPropertyDialog(), and te::qt::widgets::TimeSliderWidget::onAutoPanCheckBoxClicked().

QString te::qt::widgets::ImageItem::m_baseFile

Base file name.

Definition at line 200 of file ImageItem.h.

Referenced by ImageItem().

QString te::qt::widgets::ImageItem::m_currentImageFile

Image to be displayed on paint event animation.

Definition at line 198 of file ImageItem.h.

unsigned int te::qt::widgets::AnimationItem::m_curTimeDuration
inherited

Current time (ms). Its value is between 0 and the total duration.

Definition at line 154 of file AnimationItem.h.

Referenced by te::qt::widgets::AnimationScene::draw().

QAbstractAnimation::Direction te::qt::widgets::AnimationItem::m_direction
inherited

The direction.

Definition at line 159 of file AnimationItem.h.

te::qt::widgets::MapDisplay* te::qt::widgets::AnimationItem::m_display
inherited

Indicates where the icon item is displayed.

Definition at line 144 of file AnimationItem.h.

unsigned int te::qt::widgets::AnimationItem::m_duration
inherited

The duration this item.

Definition at line 158 of file AnimationItem.h.

QVector<QString> te::qt::widgets::ImageItem::m_files

The input files.

Definition at line 196 of file ImageItem.h.

QImage* te::qt::widgets::ImageItem::m_image

current image

Definition at line 199 of file ImageItem.h.

QPointF te::qt::widgets::ImageItem::m_imageCenterPos

Center of the image.

Definition at line 204 of file ImageItem.h.

QRectF te::qt::widgets::ImageItem::m_imaRect

Image location.

Definition at line 202 of file ImageItem.h.

std::map<uchar, QColor> te::qt::widgets::ImageItem::m_lut

LUT.

Definition at line 203 of file ImageItem.h.

Referenced by ImageItem().

QMatrix te::qt::widgets::AnimationItem::m_matrix
inherited

The display transformation matrix.

Definition at line 151 of file AnimationItem.h.

Referenced by te::qt::widgets::AnimationView::setMatrix().

size_t te::qt::widgets::ImageItem::m_ncols

number of colunms.

Definition at line 194 of file ImageItem.h.

size_t te::qt::widgets::ImageItem::m_nlines

number of lines.

Definition at line 193 of file ImageItem.h.

double te::qt::widgets::AnimationItem::m_norFinalTime
inherited

Normalized final time (between 0 and 1).

Definition at line 156 of file AnimationItem.h.

Referenced by te::qt::widgets::Animation::setDataKeyValues().

double te::qt::widgets::AnimationItem::m_norInitialTime
inherited

Normalized initial time (between 0 and 1).

Definition at line 155 of file AnimationItem.h.

Referenced by te::qt::widgets::Animation::setDataKeyValues().

int te::qt::widgets::AnimationItem::m_opacity
inherited
double te::qt::widgets::AnimationItem::m_panFactor
inherited
QPointF te::qt::widgets::AnimationItem::m_pos
inherited

The icon position.

Definition at line 146 of file AnimationItem.h.

te::gm::LineString* te::qt::widgets::AnimationItem::m_route
inherited

The input path in world coordenates.

Definition at line 149 of file AnimationItem.h.

int te::qt::widgets::AnimationItem::m_SRID
inherited
QString te::qt::widgets::ImageItem::m_suffix

File suffix.

Definition at line 201 of file ImageItem.h.

Referenced by ImageItem().

QVector<te::dt::TimeInstant> te::qt::widgets::AnimationItem::m_time
inherited

The input time.

Definition at line 147 of file AnimationItem.h.

Referenced by te::qt::widgets::TimeSliderWidget::onAnimationComboBoxActivated().

QString te::qt::widgets::AnimationItem::m_title
inherited
float te::qt::widgets::ImageItem::m_undef

undef value.

Definition at line 195 of file ImageItem.h.

Property Documentation

QPointF te::qt::widgets::AnimationItem::pos
readwriteinherited

Definition at line 65 of file AnimationItem.h.


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