refinery
RAW file processor
Public Types | Public Member Functions

refinery::ImageTile< T > Class Template Reference

A scratch-pad partial Image with coordinate data to relate to a real one. More...

#include <refinery/image_tile.h>

Collaboration diagram for refinery::ImageTile< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef T ImageType
 Image type.
typedef T::PixelType PixelType
 Pixel type.
typedef T::ValueType ValueType
 Color value type.
typedef T::ColorType ColorType
 Color index type.

Public Member Functions

 ImageTile (const Point &imageSize, const Point &topLeft, const Point &size, unsigned int border, unsigned int margin)
 Constructor.
unsigned int top () const
 Top pixel we can modify, relative to the full Image.
unsigned int left () const
 Leftmost pixel we can modify, relative to the full Image.
unsigned int height () const
 The number of pixel rows in the tile.
unsigned int width () const
 Number of pixel columns in the tile.
unsigned int bottom () const
 Bottom pixel we can modify, relative to the full Image.
unsigned int right () const
 Rightmost pixel we can modify, relative to the full Image.
void setTopLeft (const Point &topLeft)
 Sets a new top-left, repurposing this scratch-pad.
PixelTypepixelsAtImageCoords (const Point &point)
 Pixel pointer in original image using this tile's relative coordinates.
PixelTypepixelsAtImageCoords (int row, int col)
 Pixel pointer in original image using this tile's relative coordinates.
const PixelTypeconstPixelsAtImageCoords (const Point &point) const
 Pixel pointer in original image using this tile's relative coordinates.
const PixelTypeconstPixelsAtImageCoords (int row, int col) const
 Pixel pointer in original image using this tile's relative coordinates.

Detailed Description

template<typename T>
class refinery::ImageTile< T >

A scratch-pad partial Image with coordinate data to relate to a real one.

Template Parameters:
TImage type.

Definition at line 12 of file image_tile.h.


Member Typedef Documentation

template<typename T >
typedef T::ColorType refinery::ImageTile< T >::ColorType

Color index type.

Definition at line 17 of file image_tile.h.

template<typename T >
typedef T refinery::ImageTile< T >::ImageType

Image type.

Definition at line 14 of file image_tile.h.

template<typename T >
typedef T::PixelType refinery::ImageTile< T >::PixelType

Pixel type.

Definition at line 15 of file image_tile.h.

template<typename T >
typedef T::ValueType refinery::ImageTile< T >::ValueType

Color value type.

Definition at line 16 of file image_tile.h.


Constructor & Destructor Documentation

template<typename T >
refinery::ImageTile< T >::ImageTile ( const Point imageSize,
const Point topLeft,
const Point size,
unsigned int  border,
unsigned int  margin 
) [inline]

Constructor.

This will allocate memory corresponding to the size.

Parameters:
[in]imageSizePixel value one past the bottom-right of the Image.
[in]topLeftImage-realm pixel corresponding to this tile's (0,0).
[in]sizeWidth and height of this tile.
[in]borderNumber of pixels in the full Image edges we never modify.
[in]marginNumber of pixels we overlap adjacent tiles (read-only).

Definition at line 50 of file image_tile.h.


The documentation for this class was generated from the following file:
 All Classes Functions Variables Typedefs Enumerations Enumerator