FotoSHOCK
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Types | Public Member Functions | Friends | List of all members
FotoSHOCKcore::Tile< PixelFormat > Class Template Reference

Class used to store one tile. More...

#include <Tile.hpp>

Public Types

typedef ValueTypeInfo
< PixelFormat >::Type 
format
 
typedef TileIterator< PixelFormat > Iterator
 Iterator used for data traversal in a Tile.
 

Public Member Functions

 Tile (unsigned int extent, unsigned int bands) throw (bad_alloc)
 A constructor. More...
 
 Tile (const Tile< PixelFormat > &other) throw (bad_alloc)
 A copy constructor. More...
 
virtual ~Tile ()
 A destructor. More...
 
Tile< PixelFormat > & operator= (const Tile< PixelFormat > &other) throw (bad_alloc)
 An assignment operator. More...
 
void setStamp (long stamp)
 Set a stamp for data stored in the Tile. More...
 
const long getStamp () const
 Return a stamp. More...
 
Iterator upperLeft ()
 Return TileIterator for the upper left corner of the Tile. More...
 
Iterator lowerRight ()
 Return TileIterator for the lower right corner of the Tile. More...
 
Iterator getIterator (unsigned int x=0, unsigned int y=0)
 Return TileIterator at the given position in the Tile. More...
 

Friends

class TileIterator< PixelFormat >
 

Detailed Description

template<ValueType::Enum PixelFormat>
class FotoSHOCKcore::Tile< PixelFormat >

Class used to store one tile.

Tile is used to store image data of a tile and defines access to the data. The template parameter is a format in which data are stored (see ValueTypeEnum)

Constructor & Destructor Documentation

template<ValueType::Enum PixelFormat>
FotoSHOCKcore::Tile< PixelFormat >::Tile ( unsigned int  extent,
unsigned int  bands 
)
throw (bad_alloc
)

A constructor.

Allocates memory for storing image data.

Parameters
extentsize in pixels of a side of a tile
bandsnumber of bands
template<ValueType::Enum PixelFormat>
FotoSHOCKcore::Tile< PixelFormat >::Tile ( const Tile< PixelFormat > &  other)
throw (bad_alloc
)

A copy constructor.

Performs a deep copy.

Parameters
otherthe Tile to copy
template<ValueType::Enum PixelFormat>
FotoSHOCKcore::Tile< PixelFormat >::~Tile ( )
virtual

A destructor.

Frees any allocated memory

Member Function Documentation

template<ValueType::Enum PixelFormat>
Tile< PixelFormat >::Iterator FotoSHOCKcore::Tile< PixelFormat >::getIterator ( unsigned int  x = 0,
unsigned int  y = 0 
)

Return TileIterator at the given position in the Tile.

Parameters
xx coordinate
yy coordinate
Returns
iterator at the [x, y] coordinate
template<ValueType::Enum PixelFormat>
const long FotoSHOCKcore::Tile< PixelFormat >::getStamp ( ) const

Return a stamp.

Returns
number representing the stamp or -1 if no stamp was set
template<ValueType::Enum PixelFormat>
Tile< PixelFormat >::Iterator FotoSHOCKcore::Tile< PixelFormat >::lowerRight ( )

Return TileIterator for the lower right corner of the Tile.

Returns
iterator to the lower right corner
template<ValueType::Enum PixelFormat>
Tile< PixelFormat > & FotoSHOCKcore::Tile< PixelFormat >::operator= ( const Tile< PixelFormat > &  other)
throw (bad_alloc
)

An assignment operator.

Performs a deep copy of the data.

Parameters
otherthe Tile used as a source for the data
template<ValueType::Enum PixelFormat>
void FotoSHOCKcore::Tile< PixelFormat >::setStamp ( long  stamp)

Set a stamp for data stored in the Tile.

The stamp is used in operations to determine whether the operation has been applied on the Tile. To make sure that multiple operations doesn't use the same stamp on one image, the stamp has to be obtained using the ImageBufferBase::newStamp() function.

Parameters
stampnumber used as an indentifier
template<ValueType::Enum PixelFormat>
Tile< PixelFormat >::Iterator FotoSHOCKcore::Tile< PixelFormat >::upperLeft ( )

Return TileIterator for the upper left corner of the Tile.

Returns
iterator to the upper left corner

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