User Documentation
RAVL, Recognition And Vision Library
DEVELOP HOME PAGE CLASS LIST CONTENTS
Ravl - Images - ImageC<class PixelT>
 

  PUBLIC
ImageC::ImageC(void)
ImageC::ImageC(const Array2dC &)
ImageC::ImageC(const Array2dC &,const IndexRange2dC &)
ImageC::ImageC(UIntT,UIntT)
ImageC::ImageC(IndexC,IndexC)
ImageC::ImageC(const IndexRangeC &,const IndexRangeC &)
ImageC::ImageC(UIntT,UIntT,const BufferC &)
ImageC::ImageC(UIntT,UIntT,PixelT *,bool)
ImageC::Rows(void) const
ImageC::Cols(void) const
ImageC::TRow(void) const
ImageC::LCol(void) const
ImageC::BRow(void) const
ImageC::RCol(void) const
ImageC::Row(IndexC)
ImageC::BiLinear(const TFVectorC &) const
ImageC::Rotate180(Index2dC) const
Array2dC::Copy(void) const
Array2dC::SArray2d(bool)
Array2dC::AsVector(bool)
Array2dC::SliceRow(IndexC)
Array2dC::SliceColumn(IndexC)
Array2dC::Diagonal(void)
Array2dC::Array2d(void) const
Array2dC::Array2d(void)
Array2dC::ShiftIndexes1(IndexC)
Array2dC::ShiftIndexes2(IndexC)
Array2dC::CopyAccess(IndexC,IndexC)
Array2dC::operator +(const Array2dC &) const
Array2dC::operator -(const Array2dC &) const
Array2dC::operator *(const Array2dC &) const
Array2dC::operator /(const Array2dC &) const
Array2dC::operator *(const DataT &) const
Array2dC::operator /(const DataT &) const
Array2dC::operator +(const DataT &) const
Array2dC::operator -(const DataT &) const
Array2dC::operator +=(const Array2dC &)
Array2dC::operator -=(const Array2dC &)
Array2dC::operator *=(const Array2dC &)
Array2dC::operator /=(const Array2dC &)
Array2dC::operator +=(const DataT &)
Array2dC::operator -=(const DataT &)
Array2dC::operator *=(const DataT &)
Array2dC::operator /=(const DataT &)
Array2dC::SumSqr(void) const
Array2dC::Buffer2d(void)
RangeBufferAccess2dC::operator [](const Index2dC &)
RangeBufferAccess2dC::operator [](const Index2dC &) const
RangeBufferAccess2dC::operator [](IndexC)
RangeBufferAccess2dC::operator [](IndexC) const
RangeBufferAccess2dC::Range1(void) const
RangeBufferAccess2dC::Range2(void) const
RangeBufferAccess2dC::Size(void) const
RangeBufferAccess2dC::Fill(const DataT &)
RangeBufferAccess2dC::Rectangle(void) const
RangeBufferAccess2dC::Frame(void) const
RangeBufferAccess2dC::Contains(const Index2dC &) const
RangeBufferAccess2dC::Stride(void) const
RangeBufferAccess2dC::IsContinuous(void) const
RangeBufferAccess2dC::IsEmpty(void) const
RangeBufferAccess2dC::Iter(void)
RangeBufferAccess2dC::RowPtr(IndexC)
RangeBufferAccess2dC::SetRowPtr(IndexC,BufferAccessC &)
RangeBufferAccessC::operator =(DataT *)
RangeBufferAccessC::DataStart(void)
RangeBufferAccessC::DataStart(void) const
RangeBufferAccessC::Size(void) const
RangeBufferAccessC::Range(void) const
RangeBufferAccessC::IMin(void) const
RangeBufferAccessC::IMax(void) const
RangeBufferAccessC::operator [](IndexC) const
RangeBufferAccessC::operator [](IndexC)
RangeBufferAccessC::RAccess(void) const
RangeBufferAccessC::IsEmpty(void) const
RangeBufferAccessC::Contains(IndexC) const
RangeBufferAccessC::IsOverlapping(const RangeBufferAccessC &) const
RangeBufferAccessC::operator +=(SizeT)
RangeBufferAccessC::operator +(SizeT) const
RangeBufferAccessC::ShrinkHigh(SizeT)
RangeBufferAccessC::ShiftIndexes(IndexC)
RangeBufferAccessC::SetSubRange(IndexC,IndexC)
RangeBufferAccessC::Swap(RangeBufferAccessC &)
RangeBufferAccessC::Swap(IndexC,IndexC)
RangeBufferAccessC::Attach(const RangeBufferAccessC &)
RangeBufferAccessC::Attach(const BufferAccessC &,const IndexRangeC &)
RangeBufferAccessC::BufferFrom(IndexC)
RangeBufferAccessC::BufferFrom(IndexC,UIntT)
RangeBufferAccessC::Fill(const DataT &)
RangeBufferAccessC::Reverse(void)
RangeBufferAccessC::operator ==(const RangeBufferAccessC &) const
BufferAccessC::ReferenceElm(void) const
BufferAccessC::ReferenceVoid(void) const
BufferAccessC::IsValid(void) const
BufferAccessC::operator [](const IndexC) const
BufferAccessC::operator [](const IndexC)
BufferAccessC::operator +=(IndexC)
BufferAccessC::operator -=(IndexC)
BufferAccessC::operator -(IndexC) const
BufferAccessC::operator +(IndexC) const
BufferAccessC::operator ==(const BufferAccessC &) const
BufferAccessC::operator !=(const BufferAccessC &) const

   ImageC<class PixelT>   
 
Basic Image
 
include "Ravl/Image/Image.hh"
Created:24/01/2001 
User Level:Normal
Library:RavlImage
Example:exImage.cc
In Scope:RavlImageN

Parent Classes: Derived Classes: Methods:
ImageC()
Default constructor.
creates an empty image.

ImageC(const Array2dC<PixelT> & oth)
Base constructor.

ImageC(const Array2dC<PixelT> & oth,const IndexRange2dC & rect)
Construct an image as a sub rectangle 'rect' on oth.

ImageC(UIntT rows,UIntT cols)
Construct an image with origin 0,0 and size rows cols.

ImageC(IndexC rows,IndexC cols)
Construct an image with origin 0,0 and size rows cols.

ImageC(const IndexRangeC & rows,const IndexRangeC & cols)
Construct an image with the given range of indexes.

ImageC(UIntT rows,UIntT cols,const BufferC<PixelT> & buf)
Construct an image with origin 0,0 and size rows cols with space in 'buf'

ImageC(UIntT rows,UIntT cols,PixelT * data,bool deletable = true)
Construct an image with origin 0,0 and size rows cols with space in 'buf'

UIntT Rows() const
Number of rows in image.

UIntT Cols() const
Number of rows in image.

IndexC TRow() const
Returns the top row index.

IndexC LCol() const
Returns the left side column index.

IndexC BRow() const
Returns the bottom row index.

IndexC RCol() const
Returns the right side column index.

PixelT * Row(IndexC row)
Get a pointer to begining of row.

PixelT BiLinear(const TFVectorC<RealT,2> & pnt) const
Get a bi linearly interpolated pixel value.

ImageC<PixelT> Rotate180(Index2dC centre = Index2dC (0)) const
Create a copy of the image which is rotated 180 degree's.
The image is rotated around the center given.

#include "Ravl/Array2d.hh"
Array2dC<PixelT> Copy() const
Make a copy of the array.

SArray2dC<PixelT> SArray2d(bool doShift = false)
Create an access as an SArray.
Note: This does NOT copy the data, it only make a new access to it. If doShift is true element Range1().Min(),Range2().Min() will become 0,0 of the sarray. Otherwise if the array does not contain element '0,0' an error will occure in check mode, when optimised is enabled an empty array will be returned.

SArray1dC<PixelT> AsVector(bool alwaysCopy = false)
Access 2d array as 1d vector.
This will only copy the data if the data isn't continuous or alwaysCopy is true, this can make it much more effecient than a straigh copy.

Array1dC<PixelT> SliceRow(IndexC i)
Access row as 1d array.
Note: Changes made to the slice will also affect this array!

Slice1dC<PixelT> SliceColumn(IndexC i)
Access columb as 1d slice.
NB. Changes made to the slice will also affect this array!

Slice1dC<PixelT> Diagonal()
Take a slice along the diagonal of the array.
NB. Changes made to the slice will also affect this array!

const Array2dC<PixelT> & Array2d() const
access to the constant object

Array2dC<PixelT> & Array2d()
access to the object

void ShiftIndexes1(IndexC offset)
All indexes of Range1() will be changed by 'offset'.
The range will be shifted by -offset. Note: this affects the access for all arrays accessing this data, use with care.

void ShiftIndexes2(IndexC offset)
All indexes of Range2() will be changed by 'offset'.
The range will be shifted by -offset. Note: this affects the access for all arrays accessing this data, use with care.

Array2dC<PixelT> CopyAccess(IndexC shift1 = 0,IndexC shift2 = 0)
This will create a copy of the access structure without copying the data itself.
The access is shifted by shift1 in dimention 1 and shift2 in dimention 2.

Array2dC<PixelT> operator +(const Array2dC<PixelT> & arr) const
Sums 2 numerical arrays.
The operator returns the result as a new array.

Array2dC<PixelT> operator -(const Array2dC<PixelT> & arr) const
Subtracts 2 numerical arrays.
The operator returns the result as a new array.

Array2dC<PixelT> operator *(const Array2dC<PixelT> & arr) const
Mutliplies 2 numerical arrays.
The operator returns the result as a new array.

Array2dC<PixelT> operator /(const Array2dC<PixelT> & arr) const
Divides 2 numerical arrays.
The operator returns the result as a new array.

Array2dC<PixelT> operator *(const PixelT & number) const
Multiplys the array by the 'number'.
The operator returns the result as a new array.

Array2dC<PixelT> operator /(const PixelT & number) const
Divides all array items by the 'number'.
The operator returns the result as a new array.

Array2dC<PixelT> operator +(const PixelT & number) const
Adds 'number' to the array.
The operator returns the result as a new array.

Array2dC<PixelT> operator -(const PixelT & number) const
Subtracts 'number' from all array items.
The operator returns the result as a new array.

const Array2dC<PixelT> & operator +=(const Array2dC<PixelT> & arr)
Adds the 2nd array to this array.

const Array2dC<PixelT> & operator -=(const Array2dC<PixelT> & arr)
Subtracts the 2nd array from this array.

const Array2dC<PixelT> & operator *=(const Array2dC<PixelT> & arr)
Multiplies the 2nd array to this array.

const Array2dC<PixelT> & operator /=(const Array2dC<PixelT> & arr)
Divides the 2nd array from this array.

const Array2dC<PixelT> & operator +=(const PixelT & number)
Adds 'number' to all array items.

const Array2dC<PixelT> & operator -=(const PixelT & number)
Subtracts 'number' from all array items.

const Array2dC<PixelT> & operator *=(const PixelT & number)
Multiplies the array by the 'number'.

const Array2dC<PixelT> & operator /=(const PixelT & number)
Divides the array elements by the 'number'.

PixelT SumSqr() const
Calculate the sum of the squares of all elements in the array

Buffer2dC<PixelT> & Buffer2d()
Access raw 2d buffer.

#include "Ravl/RBfAcc2d.hh"
PixelT & operator [](const Index2dC & i)
access to the item array[(i)]

const PixelT & operator [](const Index2dC & i) const
return the item array[(i)]

RangeBufferAccessC<PixelT> operator [](IndexC i)
access to the item array[(i)]

const RangeBufferAccessC<PixelT> operator [](IndexC i) const
return the item array[(i)]

const IndexRangeC & Range1() const
Range of first index.

const IndexRangeC & Range2() const
Range of second index.

UIntT Size() const
Get the total number of elements in the array.

void Fill(const PixelT & d)
Fill array with value.

IndexRange2dC Rectangle() const
Return ranges of indexes

IndexRange2dC Frame() const
Return ranges of indexes

bool Contains(const Index2dC & i) const
Returns TRUE if there is an item of the 2D array

IntT Stride() const
Get the stide of the 2d array.

bool IsContinuous() const
Test if the array is allocated in a continous area of memory.
Note: this only checks the first two rows follow each other in memory, this may miss other discontunities.

bool IsEmpty() const
Is rectangle empty ?

BufferAccess2dIterC<PixelT> Iter()
Creat an iterator for this buffer.

BufferAccessC<PixelT> & RowPtr(IndexC i)
Access element 0 of row i.
Note: The element may not actually exist.

Advanced uses only!


void SetRowPtr(IndexC i,BufferAccessC<PixelT> & rowPtr)
Set element 0 of row i to 'rowPtr'.
Advanced uses only!

This directly manipulates the row pointer table. It can be used to change the way the array is stored. NOTE: Many of the numerical operations in RAVL assume the data is stored in linearly in a contiguous chunk of memory. Manipulating the layout with this method will break this method will break this assumption. This method is provided to allow operations like deinterlacing image to be done without copying large amounts of memory.


#include "Ravl/RBfAcc.hh"
const RangeBufferAccessC<BufferAccessC<DataT>> & operator =(BufferAccessC<DataT> * bp)
Changes the reference element to the element pointed by 'bp'.
Access to the object -------------------- inline const BufferAccessC & Access(void) const; Returns this object.

BufferAccessC<DataT> * DataStart()
Returns the address of the first element of the buffer.

const BufferAccessC<DataT> * DataStart() const
Returns the address of the first element of the buffer.

SizeT Size() const
Returns the number of elements of the array.

const IndexRangeC & Range() const
Returns the usable range of indeces expressed by this object.

IndexC IMin() const
Returns the minimum index of the range of this access.

IndexC IMax() const
Returns the maximum index of the range of this access.

const BufferAccessC<DataT> & operator [](IndexC i) const
Read-only access to the ('i'+1)-th element of the buffer.

BufferAccessC<DataT> & operator [](IndexC i)
Read-write access to the ('i'+1)-th element of the buffer.

const RangeBufferAccessC<BufferAccessC<DataT>> & RAccess(void) const
Returns this object. Logical functions -----------------

bool IsEmpty() const
Returns TRUE if the size of the array is zero.

bool Contains(IndexC i) const
Returns TRUE if the array contains an item with the index 'i'.

bool IsOverlapping(const RangeBufferAccessC<BufferAccessC<DataT>> & acc) const
Returns TRUE if this access has an item with the same index as an item of the access 'acc'. Modifications of the access ---------------------------

const RangeBufferAccessC<BufferAccessC<DataT>> & operator +=(SizeT i)
Changes indeces of the access to be 'i' units higher.

RangeBufferAccessC<BufferAccessC<DataT>> operator +(SizeT i) const
Creates the new access object with the indeces 'i' units higher than those used in this access object.

const IndexRangeC & ShrinkHigh(SizeT k)
Changes the number of elements by subtracting the last 'k' elements.

void ShiftIndexes(IndexC offset)
All indexes of the items will be changed by 'offset'.
The range will be shifted by -offset.

void SetSubRange(IndexC newMin,IndexC newMax)
Constrain the indexs that can be accessed from the array.
The range of indexes of this array will be constrained to cover the index range at most.

const RangeBufferAccessC<BufferAccessC<DataT>> & Swap(RangeBufferAccessC<BufferAccessC<DataT>> & a)
Exchanges the contents of this buffer with buffer 'a'.

void Swap(IndexC i1,IndexC i2)
Exchanges the contents of elements with indeces 'i1' and 'i2'.

void Attach(const RangeBufferAccessC<BufferAccessC<DataT>> & b)
Changes this buffer access to have the same access rights as 'b'.

void Attach(const BufferAccessC<BufferAccessC<DataT>> & b,const IndexRangeC & r)
Changes this buffer access to have the access rights as 'b' limited by range 'r'. so the first element in 'b' is accessed at 'r.Min()'.

RangeBufferAccessC<BufferAccessC<DataT>> BufferFrom(IndexC first)
Get an access for this buffer starting from the 'first' element to the end of the buffer.

RangeBufferAccessC<BufferAccessC<DataT>> BufferFrom(IndexC first,UIntT len)
Get an access for this buffer starting from the 'first' element for 'len' elements.
An error will be generated if the requested buffer isn't contains within this one. Modifications of the buffer contents ------------------------------------

void Fill(const BufferAccessC<DataT> & d)
Fill the buffer with the value 'd'.

void Reverse()
Reverse the order of elements in this array in place.

bool operator ==(const RangeBufferAccessC<BufferAccessC<DataT>> & ba) const
Are two accesses the same ?

#include "Ravl/BufferAccess.hh"
BufferAccessC<DataT> * ReferenceElm() const
Returns the pointer to the reference element of the attached buffer. The reference element need not to be the valid element of the buffer.

void * ReferenceVoid() const
Returns the pointer to the reference element of the attached buffer. The reference element need not to be the valid element of the buffer. The function is intended to be used in printing.

bool IsValid() const
Returns TRUE if this buffer access is not a default access object.

const BufferAccessC<DataT> & operator [](const IndexC i) const
Read-only access to the ('i'+1)-th element of the buffer.

BufferAccessC<DataT> & operator [](const IndexC i)
Read-write access to the ('i'+1)-th element of the buffer.

const BufferAccessC<BufferAccessC<DataT>> & operator +=(IndexC ind)
Inplace Add index to start position.

const BufferAccessC<BufferAccessC<DataT>> & operator -=(IndexC ind)
Inplace Subtract index from start position.

BufferAccessC<BufferAccessC<DataT>> operator -(IndexC ind) const
Substract value from position, and return it as a new value.

BufferAccessC<BufferAccessC<DataT>> operator +(IndexC ind) const
Substract value from position, and return it as a new value.

bool operator ==(const BufferAccessC<BufferAccessC<DataT>> & ba) const
Are two accesses the same ?

bool operator !=(const BufferAccessC<BufferAccessC<DataT>> & ba) const
Are two accesses the same ?


Maintainer:Charles Galambos, Created: 24/01/2001, Documentation by CxxDoc: Tue Aug 13 09:59:02 2002