Blender V2.61 - r43446
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes

ImageBase Class Reference

base class for image filters More...

#include <ImageBase.h>

Inheritance diagram for ImageBase:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ImageBase (bool staticSrc=false)
 constructor
virtual ~ImageBase (void)
 destructor
virtual bool release (void)
 release contained objects, if returns true, object should be deleted
bool isImageAvailable (void)
 is an image available
unsigned int * getImage (unsigned int texId=0, double timestamp=-1.0)
 get image
short * getSize (void)
 get image size
unsigned long getBuffSize (void)
 get image buffer size
virtual void refresh (void)
 refresh image - invalidate its current content
bool getScale (void)
 get scale
void setScale (bool scale)
 set scale
bool getFlip (void)
 get vertical flip
void setFlip (bool flip)
 set vertical flip
PyImagegetSource (const char *id)
 get source object
bool setSource (const char *id, PyImage *source)
 set source object, return true, if source was set
PyFiltergetFilter (void)
 get pixel filter
void setFilter (PyFilter *filt)
 set pixel filter

Static Public Member Functions

static short calcSize (short size)
 calculate size (nearest power of 2)

Public Attributes

int m_exports
 number of buffer pointing to m_image, public because not handled by this class

Protected Member Functions

void init (short width, short height)
 initialize image data
ImageSourceList::iterator findSource (const char *id)
 find source
virtual ImageSourcenewSource (const char *id)
 create new source
bool checkSourceSizes (void)
 check source sizes
virtual void calcImage (unsigned int texId, double ts)
 calculate image from sources and set its availability
bool loopDetect (ImageBase *img)
 perform loop detection
template<class FLT , class SRC >
void convImage (FLT &filter, SRC srcBuff, short *srcSize)
 template for image conversion
template<class F , class SRC >
void filterImage (F &filt, SRC srcBuff, short *srcSize)

Protected Attributes

unsigned int * m_image
 image buffer
unsigned int m_imgSize
 image buffer size
short m_size [2]
 image size
bool m_avail
 image is available
bool m_scale
 scale image to power 2 sizes
bool m_scaleChange
 scale was changed
bool m_flip
 flip image vertically
ImageSourceList m_sources
 source image list
bool m_staticSources
 flag for disabling addition and deletion of sources
PyFilterm_pyfilter
 pixel filter

Detailed Description

base class for image filters

Definition at line 50 of file ImageBase.h.


Constructor & Destructor Documentation

ImageBase::ImageBase ( bool  staticSrc = false)

constructor

Definition at line 50 of file ImageBase.cpp.

References m_exports, and m_size.

ImageBase::~ImageBase ( void  ) [virtual]

destructor

Definition at line 60 of file ImageBase.cpp.

References m_image.


Member Function Documentation

virtual void ImageBase::calcImage ( unsigned int  texId,
double  ts 
) [inline, protected, virtual]

calculate image from sources and set its availability

Reimplemented in ImageMix, ImageRender, and ImageViewport.

Definition at line 136 of file ImageBase.h.

Referenced by getImage().

short ImageBase::calcSize ( short  size) [static]

calculate size (nearest power of 2)

Definition at line 261 of file ImageBase.cpp.

References size().

Referenced by ImageViewport::calcImage(), init(), ImageViewport::setWhole(), and Texture_refresh().

bool ImageBase::checkSourceSizes ( void  ) [protected]

check source sizes

Definition at line 233 of file ImageBase.cpp.

References m_sources, and NULL.

Referenced by ImageMix::calcImage().

template<class FLT , class SRC >
void ImageBase::convImage ( FLT &  filter,
SRC  srcBuff,
short *  srcSize 
) [inline, protected]

template for image conversion

Definition at line 142 of file ImageBase.h.

References m_flip, m_image, and m_size.

Referenced by filterImage(), and ImageBuff::load().

template<class F , class SRC >
void ImageBase::filterImage ( F &  filt,
SRC  srcBuff,
short *  srcSize 
) [inline, protected]
ImageSourceList::iterator ImageBase::findSource ( const char *  id) [protected]

find source

Definition at line 220 of file ImageBase.cpp.

References m_sources.

Referenced by getSource(), ImageMix::getWeight(), setSource(), and ImageMix::setWeight().

unsigned long ImageBase::getBuffSize ( void  ) [inline]

get image buffer size

Definition at line 68 of file ImageBase.h.

References m_size.

PyFilter* ImageBase::getFilter ( void  ) [inline]

get pixel filter

Definition at line 88 of file ImageBase.h.

References m_pyfilter.

bool ImageBase::getFlip ( void  ) [inline]

get vertical flip

Definition at line 78 of file ImageBase.h.

References m_flip.

unsigned int * ImageBase::getImage ( unsigned int  texId = 0,
double  timestamp = -1.0 
)

get image

Definition at line 86 of file ImageBase.cpp.

References calcImage(), getSize(), init(), m_avail, m_image, m_sources, and NULL.

Referenced by ImageSource::getImage().

bool ImageBase::getScale ( void  ) [inline]

get scale

Definition at line 74 of file ImageBase.h.

References m_scale.

short* ImageBase::getSize ( void  ) [inline]

get image size

Definition at line 66 of file ImageBase.h.

References m_size.

Referenced by ImageMix::calcImage(), getImage(), and ImageSource::getSize().

PyImage * ImageBase::getSource ( const char *  id)

get source object

Definition at line 121 of file ImageBase.cpp.

References findSource(), m_sources, and NULL.

void ImageBase::init ( short  width,
short  height 
) [protected]
bool ImageBase::isImageAvailable ( void  ) [inline]

is an image available

Definition at line 61 of file ImageBase.h.

References m_avail.

bool ImageBase::loopDetect ( ImageBase img) [protected]

perform loop detection

Definition at line 273 of file ImageBase.cpp.

References m_sources, and NULL.

Referenced by setSource().

virtual ImageSource* ImageBase::newSource ( const char *  id) [inline, protected, virtual]

create new source

Reimplemented in ImageMix.

Definition at line 130 of file ImageBase.h.

References NULL.

Referenced by setSource().

void ImageBase::refresh ( void  ) [virtual]

refresh image - invalidate its current content

Reimplemented in ImageBuff.

Definition at line 110 of file ImageBase.cpp.

References m_avail, and m_sources.

Referenced by ImageSource::refresh(), and Video_refresh().

bool ImageBase::release ( void  ) [virtual]

release contained objects, if returns true, object should be deleted

Definition at line 69 of file ImageBase.cpp.

References m_pyfilter, m_sources, and NULL.

void ImageBase::setFilter ( PyFilter filt)

set pixel filter

Definition at line 166 of file ImageBase.cpp.

References m_pyfilter, and NULL.

void ImageBase::setFlip ( bool  flip) [inline]

set vertical flip

Definition at line 80 of file ImageBase.h.

References m_flip.

void ImageBase::setScale ( bool  scale) [inline]

set scale

Definition at line 76 of file ImageBase.h.

References m_scale, and m_scaleChange.

Referenced by ImageBuff_init().

bool ImageBase::setSource ( const char *  id,
PyImage source 
)

set source object, return true, if source was set

Definition at line 131 of file ImageBase.cpp.

References findSource(), loopDetect(), PyImage::m_image, m_sources, m_staticSources, newSource(), NULL, and ImageSource::setSource().


Member Data Documentation

bool ImageBase::m_avail [protected]

number of buffer pointing to m_image, public because not handled by this class

Definition at line 96 of file ImageBase.h.

Referenced by ImageBase(), and init().

bool ImageBase::m_flip [protected]

flip image vertically

Definition at line 113 of file ImageBase.h.

Referenced by ImageViewport::calcImage(), convImage(), getFlip(), and setFlip().

unsigned int* ImageBase::m_image [protected]
unsigned int ImageBase::m_imgSize [protected]

image buffer size

Definition at line 102 of file ImageBase.h.

Referenced by init().

pixel filter

Definition at line 121 of file ImageBase.h.

Referenced by ImageViewport::calcImage(), filterImage(), getFilter(), ImageBuff::load(), release(), and setFilter().

bool ImageBase::m_scale [protected]

scale image to power 2 sizes

Definition at line 109 of file ImageBase.h.

Referenced by getScale(), init(), and setScale().

bool ImageBase::m_scaleChange [protected]

scale was changed

Definition at line 111 of file ImageBase.h.

Referenced by ImageViewport::calcImage(), init(), VideoBase::process(), and setScale().

short ImageBase::m_size[2] [protected]
bool ImageBase::m_staticSources [protected]

flag for disabling addition and deletion of sources

Definition at line 118 of file ImageBase.h.

Referenced by setSource().


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