Rogue Wave Views
Foundation Package API Reference Guide
Product Documentation:

Rogue Wave Views
Documentation Home
List of all members | Public Member Functions
IlvTIFFStreamer Class Reference

Bitmap streamer class. More...

#include <ilviews/bitmaps/tiff.h>

Inheritance diagram for IlvTIFFStreamer:
IlvBitmapStreamer IlvValueInterface

Public Member Functions

 IlvTIFFStreamer ()
 Constructor.
 
IlBoolean canRead () const
 Indicates that the instance can read from a stream. More...
 
IlBoolean canWrite () const
 Indicates that the instance can write to a stream. More...
 
IlBoolean checkSignature (const IlUChar *data, IlUInt size)
 Indicates whether the instance can handle the stream. More...
 
virtual void closeStream (IlAny identifier)
 Closes a stream. More...
 
Compression getCompression () const
 Returns the compression mode. More...
 
IlUInt getRowsPerStrip () const
 Returns The number of rows per strip used when saving. More...
 
IlBoolean getTagValue (IlAny identifier, IlUInt tag, IlUInt &count, IlAny value=0)
 Returns the value of a given tag in a stream. More...
 
IlUInt getTileHeight () const
 Returns The tile height used when saving. More...
 
IlUInt getTileWidth () const
 Returns the tile width used when saving. More...
 
Mode getWriteMode () const
 Returns the write mode. More...
 
virtual IlAny openStream (ILVSTDPREF istream &stream)
 Opens the stream. More...
 
IlvBitmapDataread (ILVSTDPREF istream &stream)
 Reads a TIFF image from a stream. More...
 
IlvBitmapInformationreadInfo (ILVSTDPREF istream &stream)
 Reads image information from a stream. More...
 
IlvBitmapDatareadTile (ILVSTDPREF istream &stream, IlUShort x, IlUShort y)
 Reads a TIFF tile from a stream. More...
 
void setCompression (Compression compression)
 Sets the compression mode used when writing. More...
 
void setRowsPerStrip (IlUInt rowsperstrip)
 Sets the number of rows per strip used when saving. More...
 
void setTileHeight (IlUInt tileheight)
 Sets the tile height used when saving. More...
 
void setTileWidth (IlUInt tilewidth)
 Sets the tile width used when saving. More...
 
void setWriteMode (Mode mode)
 Sets the write mode. More...
 
IlBoolean write (IlvBitmapData *data, ILVSTDPREF ostream &stream)
 Writes an IlvBitmapData to a TIFF stream. More...
 
virtual void writeCustomData (IlAny identifier)
 Allows custom data to be written in the stream. More...
 
IlBoolean writeTagValue (IlAny identifier, IlUInt tag, IlUInt count, IlAny value=0)
 Writes a tag in the stream. More...
 
- Public Member Functions inherited from IlvBitmapStreamer
virtual void callReadProgressCallback (IlUInt current, IlUInt max)
 Calls the callback for read progression. More...
 
virtual void callWriteProgressCallback (IlUInt current, IlUInt max)
 Calls the callback for write progression. More...
 
virtual const char * getName () const
 Returns the internal name of the streamer. More...
 
IlvQuantizergetQuantizer () const
 Returns the quantizer used by this streamer. More...
 
virtual IlvBitmapDataread (std::istream &stream)
 Reads from a stream. More...
 
virtual IlvBitmapInformationreadInfo (std::istream &stream)
 Reads information from a stream. More...
 
void setQuantizer (IlvQuantizer *quantizer)
 Sets the quantizer used (if needed) by this streamer. More...
 
virtual void setReadProgressCallback (IlvProgressCallback rpCallback, IlAny arg=0)
 Sets the callback for read progression. More...
 
virtual void setWriteProgressCallback (IlvProgressCallback wpCallback, IlAny arg=0)
 Sets the callback for write progression. More...
 
virtual IlBoolean write (IlvBitmapData *bitmapData, std::ostream &stream)
 Writes an IlvBitmapData to a stream. More...
 
- Public Member Functions inherited from IlvValueInterface
virtual IlBoolean applyValue (const IlvValue &value)
 Apply an accessor. More...
 
virtual IlBoolean changeValue (const IlvValue &val)
 Changes the value of an accessor. More...
 
virtual IlBoolean changeValues (const IlvValue *values, IlUShort count=0)
 Changes several accessor values simultaneously. More...
 
virtual void getAccessors (const IlSymbol *const **names, const IlvValueTypeClass *const **types, IlUInt &count) const
 Retrieves the list of available accessors of an object. More...
 
virtual IlvValuequeryValue (IlvValue &val) const
 Retrieves an accessor value. More...
 
virtual void queryValues (IlvValue *values, IlUShort count) const
 Retrieves multiple accessor values simultaneously. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from IlvBitmapStreamer
static IlvBitmapStreamerGet (const char *name)
 Returns a streamer from its name. More...
 
static IlvBitmapStreamer ** GetRegisteredStreamers (IlUInt &count)
 Returns the registered streamers. More...
 
static IlvBitmapRead (IlvDisplay *display, std::istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads a bitmap using the registered streamers. More...
 
static IlvBitmapDataReadBitmapData (std::istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads bitmap data using the registered streamers. More...
 
static IlvBitmapInformationReadInfo (std::istream &stream, const IlUChar *signature, IlUInt signatureLen)
 Reads bitmap information using the registered streamers. More...
 
static void Register (IlvBitmapStreamer *streamer)
 Registers the given streamer. More...
 
static IlBoolean UnRegister (IlvBitmapStreamer *streamer)
 Unregisters the given streamer. More...
 

Detailed Description

Bitmap streamer class.

Library: xviews or winviews or mviews (mutually exclusive)

This streamer provides methods to deal with a stream containing a TIFF image. This streamer can read and write.

Member Function Documentation

IlBoolean IlvTIFFStreamer::canRead ( ) const
virtual

Indicates that the instance can read from a stream.

Returns
IlTrue.

Reimplemented from IlvBitmapStreamer.

IlBoolean IlvTIFFStreamer::canWrite ( ) const
virtual

Indicates that the instance can write to a stream.

Returns
IlTrue.

Reimplemented from IlvBitmapStreamer.

IlBoolean IlvTIFFStreamer::checkSignature ( const IlUChar data,
IlUInt  size 
)
virtual

Indicates whether the instance can handle the stream.

Parameters
dataThe stream signature.
sizeThe size of the stream signature.
Returns
IlTrue if the instance recognizes the signature.

Implements IlvBitmapStreamer.

virtual void IlvTIFFStreamer::closeStream ( IlAny  identifier)
virtual

Closes a stream.

Parameters
identifierThe stream identifier.
Compression IlvTIFFStreamer::getCompression ( ) const

Returns the compression mode.

Returns
The compression mode.
IlUInt IlvTIFFStreamer::getRowsPerStrip ( ) const

Returns The number of rows per strip used when saving.

Returns
The number of rows per strip.
IlBoolean IlvTIFFStreamer::getTagValue ( IlAny  identifier,
IlUInt  tag,
IlUInt count,
IlAny  value = 0 
)

Returns the value of a given tag in a stream.

This method must be called between openStream and closeStream. The tag value must be known by the underlying TIFF library. Values must be copied.

Parameters
identifierThe stream identifier.
tagThe tag
countThe number of elements.
valueThe tag value.
Returns
IlTrue if the tag is known and its value has been found.
IlUInt IlvTIFFStreamer::getTileHeight ( ) const

Returns The tile height used when saving.

Returns
The tile height.
IlUInt IlvTIFFStreamer::getTileWidth ( ) const

Returns the tile width used when saving.

Returns
The tile width.
Mode IlvTIFFStreamer::getWriteMode ( ) const

Returns the write mode.

Returns
The write mode.
virtual IlAny IlvTIFFStreamer::openStream ( ILVSTDPREF istream &  stream)
virtual

Opens the stream.

Parameters
streamThe stream to open.
Returns
A stream identifier.
IlvBitmapData* IlvTIFFStreamer::read ( ILVSTDPREF istream &  stream)

Reads a TIFF image from a stream.

Parameters
streamThe stream to read from.
Returns
An instance of IlvBitmapData.
IlvBitmapInformation* IlvTIFFStreamer::readInfo ( ILVSTDPREF istream &  stream)

Reads image information from a stream.

Parameters
streamThe stream to read from.
Returns
An instance of IlvBitmapInformation.
IlvBitmapData* IlvTIFFStreamer::readTile ( ILVSTDPREF istream &  stream,
IlUShort  x,
IlUShort  y 
)

Reads a TIFF tile from a stream.

Parameters
streamThe stream to read from.
xThe horizontal position of the tile.
yThe vertical position of the tile.
Returns
An instance of IlvBitmapData.
void IlvTIFFStreamer::setCompression ( Compression  compression)

Sets the compression mode used when writing.

The compression can be one of IlvTIFFstreamer::None, IlvTIFFstreamer::Packbits, or IlvTIFFstreamer::Zip.

Parameters
compressionThe new compression mode.
void IlvTIFFStreamer::setRowsPerStrip ( IlUInt  rowsperstrip)

Sets the number of rows per strip used when saving.

Parameters
rowsperstripThe new rows per strip value.
void IlvTIFFStreamer::setTileHeight ( IlUInt  tileheight)

Sets the tile height used when saving.

Parameters
tileheightThe new tile height.
void IlvTIFFStreamer::setTileWidth ( IlUInt  tilewidth)

Sets the tile width used when saving.

Parameters
tilewidthThe new tile width.
void IlvTIFFStreamer::setWriteMode ( Mode  mode)

Sets the write mode.

The mode can be either IlvTIFFStreamer::Tile or IlvTIFFStreamer::Strip.

Parameters
modeThe new write mode.
IlBoolean IlvTIFFStreamer::write ( IlvBitmapData data,
ILVSTDPREF ostream &  stream 
)

Writes an IlvBitmapData to a TIFF stream.

Parameters
dataThe bitmap data to write.
streamThe stream to write to.
Returns
IlTrue if the bitmap data has been written.
virtual void IlvTIFFStreamer::writeCustomData ( IlAny  identifier)
virtual

Allows custom data to be written in the stream.

This method will be called by the write method.

Parameters
identifierThe stream identifier.
IlBoolean IlvTIFFStreamer::writeTagValue ( IlAny  identifier,
IlUInt  tag,
IlUInt  count,
IlAny  value = 0 
)

Writes a tag in the stream.

Parameters
identifierThe stream identifier.
tagThe tag
countthe number of elements.
valueThe tag value.
Returns
IlTrue if the tag is known and its value has been written.

© Copyright 2016, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.