VR-Forces 4.0.4 Class Documentation
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtLargeImageReader Class Reference
Inheritance diagram for DtLargeImageReader:
Inheritance graph
[legend]

List of all members.

Public Types

enum  DtLargeImageFlags { DtKeepSize = 1, DtAutoFitLargeImage = 2 }

Public Member Functions

 DtLargeImageReader (QIODevice *device, DtLargeImageFlags fl=DtAutoFitLargeImage, int stepSize=2, const QByteArray &format=QByteArray())
 DtLargeImageReader (const QString &fileName, DtLargeImageFlags fl=DtAutoFitLargeImage, int stepSize=2, const QByteArray &format=QByteArray())
 ~DtLargeImageReader ()
void setImageSize (const QSize &)
const QSize & imageSize () const
void setStepSize (int)
int stepSize () const
virtual QImage read ()
 If useThread is true, then puts image read into a thread.
virtual QSize imageSizeToUse (const QSize &expectedSize) const
 Calculates the size to create of our smaller image based on supplied size.
virtual QSize minimumImageSize (const QSize &basedOn, int stepSize=2) const
 Give the image size, return a size that can be used to load the image and fit it into memory.
virtual QImage loadImage (const QSize &imageSize)
 Loads the image into the specified image size.
virtual QSize determineSize () const
 Given a particular extension, try and use native format calls to get the image size.
virtual QSize size () const
 If QImageHandler size() does not return a valid size, try some internal routines.
virtual bool supportsOption (QImageIOHandler::ImageOption option) const
 Override to implement ClipRect for Jpeg.
virtual QRect clipRect () const
virtual void setClipRect (const QRect &)
virtual bool isJpeg () const
virtual QImage loadClippedImage (const QRect &clipRect, const QSize &outputSize)
 Currently only jpeg clip loading is supported through this extended method.
virtual bool canImportImage () const
 Returns true if the image can be clipped or scaled.

Static Public Member Functions

static bool canCreateImageOfSize (const QSize &, int imageDepth=32)

Protected Member Functions

virtual QImage loadClippedJpeg (const QRect &clipRect, const QSize &outputSize)

Protected Attributes

DtLargeImageFlags myFlags
QSize myImageSize
QRect myClipRect
int myStepSize
int myImageDepth
jpegClippedReader * myScaler

Member Enumeration Documentation

Enumerator:
DtKeepSize 
DtAutoFitLargeImage 

Constructor & Destructor Documentation

DtLargeImageReader::DtLargeImageReader ( QIODevice *  device,
DtLargeImageFlags  fl = DtAutoFitLargeImage,
int  stepSize = 2,
const QByteArray &  format = QByteArray() 
)
DtLargeImageReader::DtLargeImageReader ( const QString &  fileName,
DtLargeImageFlags  fl = DtAutoFitLargeImage,
int  stepSize = 2,
const QByteArray &  format = QByteArray() 
)

Member Function Documentation

static bool DtLargeImageReader::canCreateImageOfSize ( const QSize &  ,
int  imageDepth = 32 
) [static]
void DtLargeImageReader::setImageSize ( const QSize &  sz) [inline]

References myImageSize.

const QSize & DtLargeImageReader::imageSize ( ) const [inline]

References myImageSize.

void DtLargeImageReader::setStepSize ( int  i) [inline]

References myStepSize.

int DtLargeImageReader::stepSize ( ) const [inline]

References myStepSize.

virtual QImage DtLargeImageReader::read ( ) [virtual]

If useThread is true, then puts image read into a thread.

Will emit a signal when load is complete

virtual QSize DtLargeImageReader::imageSizeToUse ( const QSize &  expectedSize) const [virtual]

Calculates the size to create of our smaller image based on supplied size.

If supplied size is NULL, calls minimumImageSize(size()) to calculate the minimum size needed to load image. This call might return a different size than expectedSize if the size() of the image does not divide into expectedSize

virtual QSize DtLargeImageReader::minimumImageSize ( const QSize &  basedOn,
int  stepSize = 2 
) const [virtual]

Give the image size, return a size that can be used to load the image and fit it into memory.

The supplied step size will determine how the width/height is divided at each iteration to find the correct size

virtual QImage DtLargeImageReader::loadImage ( const QSize &  imageSize) [virtual]

Loads the image into the specified image size.

Can still return a NULL image if the specified image size is too large

virtual QSize DtLargeImageReader::determineSize ( ) const [virtual]

Given a particular extension, try and use native format calls to get the image size.

This can be used if size() is not supported (or returns an invalid value) for a particular image

virtual QSize DtLargeImageReader::size ( ) const [virtual]

If QImageHandler size() does not return a valid size, try some internal routines.

virtual bool DtLargeImageReader::supportsOption ( QImageIOHandler::ImageOption  option) const [virtual]

Override to implement ClipRect for Jpeg.

virtual QRect DtLargeImageReader::clipRect ( ) const [virtual]
virtual void DtLargeImageReader::setClipRect ( const QRect &  ) [virtual]
virtual bool DtLargeImageReader::isJpeg ( ) const [virtual]
virtual QImage DtLargeImageReader::loadClippedImage ( const QRect &  clipRect,
const QSize &  outputSize 
) [virtual]

Currently only jpeg clip loading is supported through this extended method.

GeoTiff uses the geotiff loader to load clipped images

virtual bool DtLargeImageReader::canImportImage ( ) const [virtual]

Returns true if the image can be clipped or scaled.

virtual QImage DtLargeImageReader::loadClippedJpeg ( const QRect &  clipRect,
const QSize &  outputSize 
) [protected, virtual]

Member Data Documentation

Referenced by imageSize(), and setImageSize().

QRect DtLargeImageReader::myClipRect [protected]

Referenced by setStepSize(), and stepSize().

jpegClippedReader* DtLargeImageReader::myScaler [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)