arbeit
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TFElement Class Reference

#include <TFElement.h>

Inheritance diagram for TFElement:

SimBase gutz::Counted TFElementBox List of all members.

Detailed Description

A generic transfer function element base (classification widget spec) not a concrete implementation.


see below for a double indirection element (so they can change types and you can track changes to them) TFEltSP

For Collaboration with TFGeneric
See also: TFEltView, TFElementBox, TFParams.h, TFViewWidget, TFSurfaceWidget

Definition at line 49 of file TFElement.h.

Views, 2D projections

virtual TFEltViewgetView (const gutz::vec2i &axes)=0
 get view, returns View interface, each concrete TFElement should have an associated view object than handles the collaboration between 2D manipulations and the full ND representation of the Element.


Evaluate

virtual ValType eval (const PosType &tfpos) const=0
 evaluate at generic position


Zero Val

The "Zero Val" is the value for "unclassified regions" this may or may not actually be zero, so you may need to change what that value is.

The zero value defaults to tfRangeType_default

ValType getZeroVal () const
void setZeroVal (const ValType &zv)

evaluator strategies Depricated?

TFEvalSP getEvaluator () const
void setEvaluator (TFEvalSP e)

Domain/Position

all of the "nodes" associated with this element, ie, verticies of polytope in tf domain

PosVecTypegetPosVec ()
PosVecType getPosVec () const
void setPosVec (PosVecType &pv)
PosTypegetPos (int i)
PosType getPos (int i) const
void setPos (int i, PosType p)

domain bounding box

you can override these for speed!! should we recompute on every call?? very slow! maybe you can cache this in a subclass.

virtual PosType getMinBox () const
virtual PosType getMaxBox () const

Range/Value

all of the values associated with each node, if vec::size() == 1 then the element has a global definition of range.

ValVecTypegetValVec ()
ValVecType getValVec () const

Text object-name

from SimBase

std::string getObjName ()
std::string getName ()
void setName (std::string name)
void setName (const char *name)

Debug prints

from SimBase: These print the object name with the error, mostly for convenience, but they are compiled to inline-no-op if you build in release mode

void derr (const char *when, const char *where=0) const
template<class T> void derr (const char *when, const char *where, const T stuff) const

Modification, AKA "changed"

from SimBase: id based, you can capture the current id for comparison later, if the id's don't match the class has been changed

virtual int getChangeID ()
virtual int getChangeID () const
virtual void setChanged ()

Serialization:

from SimBase You MUST override these pure virtual functions, they "should" do something usefull.

It is also nice if you declare a static std::istream &create(std::istream &is) const; function, to create a class from a stream. This is done on a per-concrete class basis.

These aren't pure virutal yet, but will be soon!

virtual std::ostream & saveSelf (std::ostream &os)
 serialize

virtual std::istream & readSelf (std::istream &is)
 unserialize


Public Types

typedef STF::tfSType SType
typedef STF::tfDomainType PosType
 scalar type

typedef STF::tfDomainVec PosVecType
typedef STF::tfRangeType ValType
typedef STF::tfRangeVec ValVecType
typedef STF::tfVec2 tfVec2
typedef STF::tfRangeVec4 tfVec4

Public Member Functions

virtual ~TFElement ()
bool needRemove () const
 check to see if this element needs to be removed/deleted

virtual void rasterize2D (NrroSP n, const gutz::vec2i &posIdx, const int kind=STF::TF_RGBA)=0
 rasterize this element into an image.


Protected Member Functions

 TFElement ()
 a generic rasterization algorithm the index vector allows you to rearrange and select which values from the domain are rasterized into the 2D image map (ni).

virtual void _incCount ()
 gutz::Counted interface, increment reference count by one.

virtual void _decCount ()
 gutz::Counted interface, decrement reference count by one.

virtual int _getCount () const
 gutz::Counted interface, get the current reference count.


Protected Attributes

PosVecType _posVec
ValVecType _valVec
ValType _zeroVal
TFEvalSP _eval
bool _remove
 TFBlend _blend;.

std::string _name_
 a text name for the object, SimBase

int _changed
 change id, incremented whenever setChanged is called, SimBase


Friends

class SmartPtr
class SmartPtrRef


Member Typedef Documentation

typedef STF::tfDomainType TFElement::PosType
 

scalar type

Reimplemented in TFElementBox.

Definition at line 57 of file TFElement.h.

typedef STF::tfDomainVec TFElement::PosVecType
 

Definition at line 58 of file TFElement.h.

Referenced by getPosVec().

typedef STF::tfSType TFElement::SType
 

Definition at line 56 of file TFElement.h.

Referenced by TFElementBox::myEval(), and TFElementBox::rasterize2D().

typedef STF::tfVec2 TFElement::tfVec2
 

Definition at line 61 of file TFElement.h.

Referenced by TFView::TFView().

typedef STF::tfRangeVec4 TFElement::tfVec4
 

Definition at line 62 of file TFElement.h.

typedef STF::tfRangeType TFElement::ValType
 

Reimplemented in TFElementBox.

Definition at line 59 of file TFElement.h.

typedef STF::tfRangeVec TFElement::ValVecType
 

Definition at line 60 of file TFElement.h.

Referenced by getValVec().


Constructor & Destructor Documentation

virtual TFElement::~TFElement  )  [inline, virtual]
 

Definition at line 54 of file TFElement.h.

TFElement::TFElement  )  [inline, protected]
 

a generic rasterization algorithm the index vector allows you to rearrange and select which values from the domain are rasterized into the 2D image map (ni).

defined in "TFRasterize.cpp", see for more details.

Definition at line 201 of file TFElement.h.

References _eval, and _remove.


Member Function Documentation

virtual void gutz::Counted::_decCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, decrement reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 54 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

virtual int gutz::Counted::_getCount  )  const [inline, protected, virtual, inherited]
 

gutz::Counted interface, get the current reference count.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr.

Definition at line 58 of file smartptr.h.

virtual void gutz::Counted::_incCount  )  [inline, protected, virtual, inherited]
 

gutz::Counted interface, increment reference count by one.

Not generaly used by subclasses, mostly for collaboration with gutz::SmartPtr. Sometimes you need to call this though, see the documentation for gutz::SmartPtr

Definition at line 48 of file smartptr.h.

Referenced by TFImage::clear(), NrroImage::fBlendOverRGBA(), and Nrro::updateMinMax().

template<class T>
void SimBase::derr const char *  when,
const char *  where,
const T  stuff
const [inline, inherited]
 

only prints in debug mode, -D_DEBUG

Definition at line 130 of file simBase.h.

References SimBase::_name_.

void SimBase::derr const char *  when,
const char *  where = 0
const [inline, inherited]
 

only prints in debug mode, -D_DEBUG

Definition at line 113 of file simBase.h.

References SimBase::_name_.

Referenced by AlgObj::addInput(), Key::addKey(), SourceObj::addOutput(), VolShader::bindBlend(), VolField::checkDims(), VolFieldVec::checkField(), VolFieldVec::checkFields(), AlgObj::checkInputs(), AlgObj::delInput(), Key::delKey(), Crank::delMP(), SourceObj::delOutput(), Crank::delTape(), TFGeneric::eval(), SourceObj::execDef(), ColorMapper::execDef(), AlgObj::execDef(), AlgObj::execute(), SourceObj::force(), AlgObj::force(), VolField::genTexture(), TFGeneric::get2DMap(), DataObj::getConsumer(), VolFieldVec::getField(), AlgObj::getInputN(), Key::getKey(), Crank::getMP(), Crank::getMPIdx(), SourceObj::getOutputN(), Crank::getTape(), AlgObj::inputsModified(), Crank::insertTape(), Crank::kindErr(), VolyCube::loadNrro(), VolyCube::readState(), Volytope::readState(), SourceObj::request(), DataObj::request_(), VolytopeVec::setField(), SourceObj::setForwardModified(), DataObj::setForwardModified(), TFGeneric::setImage(), AlgObj::setInputN(), Key::setKey(), Crank::setMP(), VolField::setNrro(), SourceObj::setOutputN(), Crank::setTape(), Volume::update(), SourceObj::updateOutputs(), Volume::updateRectLin(), Volume::updateVolytopesRL(), VolyCube::VolyCube(), and Volytope::writeState().

virtual ValType TFElement::eval const PosType tfpos  )  const [pure virtual]
 

evaluate at generic position

Implemented in TFElementBox.

virtual int SimBase::getChangeID  )  const [inline, virtual, inherited]
 

Definition at line 73 of file simBase.h.

References SimBase::_changed.

virtual int SimBase::getChangeID  )  [inline, virtual, inherited]
 

Reimplemented in TFGeneric, TFBaseSP, and TFEltSP.

Definition at line 72 of file simBase.h.

References SimBase::_changed.

Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), and TFGeneric::getChangeID().

TFEvalSP TFElement::getEvaluator  )  const [inline]
 

Definition at line 121 of file TFElement.h.

References _eval.

virtual PosType TFElement::getMaxBox  )  const [inline, virtual]
 

Definition at line 158 of file TFElement.h.

References _posVec, and gutz::vs_max().

virtual PosType TFElement::getMinBox  )  const [inline, virtual]
 

Definition at line 151 of file TFElement.h.

References _posVec, and gutz::vs_min().

std::string SimBase::getName  )  [inline, inherited]
 

Definition at line 45 of file simBase.h.

References SimBase::_name_.

Referenced by MetaProg::operator<<().

std::string SimBase::getObjName  )  [inline, inherited]
 

Definition at line 44 of file simBase.h.

References string.

PosType TFElement::getPos int  i  )  const [inline]
 

Definition at line 142 of file TFElement.h.

References _posVec.

PosType& TFElement::getPos int  i  )  [inline]
 

Definition at line 141 of file TFElement.h.

References _posVec.

Referenced by TFItem::getTFPosCA(), and TFItem::setTFPosCA().

PosVecType TFElement::getPosVec  )  const [inline]
 

Definition at line 139 of file TFElement.h.

References _posVec, and PosVecType.

PosVecType& TFElement::getPosVec  )  [inline]
 

Definition at line 138 of file TFElement.h.

References _posVec, and PosVecType.

Referenced by TFItem::getTFPosCA(), and TFItem::setTFPosCA().

ValVecType TFElement::getValVec  )  const [inline]
 

Definition at line 174 of file TFElement.h.

References _valVec, and ValVecType.

ValVecType& TFElement::getValVec  )  [inline]
 

Definition at line 173 of file TFElement.h.

References _valVec, and ValVecType.

virtual TFEltView* TFElement::getView const gutz::vec2i axes  )  [pure virtual]
 

get view, returns View interface, each concrete TFElement should have an associated view object than handles the collaboration between 2D manipulations and the full ND representation of the Element.

see TFEltView for the interface spec.

Implemented in TFElementBox.

ValType TFElement::getZeroVal  )  const [inline]
 

Definition at line 114 of file TFElement.h.

References _zeroVal.

bool TFElement::needRemove  )  const [inline]
 

check to see if this element needs to be removed/deleted

Definition at line 179 of file TFElement.h.

References _remove.

virtual void TFElement::rasterize2D NrroSP  n,
const gutz::vec2i posIdx,
const int  kind = STF::TF_RGBA
[pure virtual]
 

rasterize this element into an image.

For now, the image must have 4 channels

Implemented in TFElementBox.

virtual std::istream& SimBase::readSelf std::istream &  is  )  [inline, virtual, inherited]
 

unserialize

Reimplemented in SimCore, and VolRenBase.

Definition at line 94 of file simBase.h.

virtual std::ostream& SimBase::saveSelf std::ostream &  os  )  [inline, virtual, inherited]
 

serialize

Reimplemented in SimCore, and VolRenBase.

Definition at line 92 of file simBase.h.

virtual void SimBase::setChanged  )  [inline, virtual, inherited]
 

Definition at line 74 of file simBase.h.

References SimBase::_changed.

Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and TFGeneric::update().

void TFElement::setEvaluator TFEvalSP  e  )  [inline]
 

Definition at line 122 of file TFElement.h.

References _eval.

void SimBase::setName const char *  name  )  [inline, inherited]
 

Definition at line 47 of file simBase.h.

References SimBase::_name_, and name.

void SimBase::setName std::string  name  )  [inline, inherited]
 

Reimplemented in Key.

Definition at line 46 of file simBase.h.

References SimBase::_name_, and name.

Referenced by EventData::EventData(), and GenDataObj_base< Nrro, gutz::SmartPtr< Nrro > >::GenDataObj_base().

void TFElement::setPos int  i,
PosType  p
[inline]
 

Definition at line 143 of file TFElement.h.

References _posVec.

Referenced by TFItem::setTFPosCA().

void TFElement::setPosVec PosVecType pv  )  [inline]
 

Definition at line 140 of file TFElement.h.

References _posVec.

void TFElement::setZeroVal const ValType zv  )  [inline]
 

Definition at line 115 of file TFElement.h.

References _zeroVal.


Friends And Related Function Documentation

friend class SmartPtr [friend, inherited]
 

Definition at line 40 of file smartptr.h.

Referenced by Nrro::NrroIter< T >::NrroIter().

friend class SmartPtrRef [friend, inherited]
 

Definition at line 41 of file smartptr.h.


Member Data Documentation

int SimBase::_changed [protected, inherited]
 

change id, incremented whenever setChanged is called, SimBase

Definition at line 103 of file simBase.h.

Referenced by SimBase::getChangeID(), SimBase::setChanged(), and SimBase::SimBase().

TFEvalSP TFElement::_eval [protected]
 

Definition at line 208 of file TFElement.h.

Referenced by getEvaluator(), setEvaluator(), and TFElement().

std::string SimBase::_name_ [protected, inherited]
 

a text name for the object, SimBase

Definition at line 101 of file simBase.h.

Referenced by SimBase::derr(), SimBase::getName(), SimBase::setName(), and SimBase::SimBase().

PosVecType TFElement::_posVec [protected]
 

Definition at line 203 of file TFElement.h.

Referenced by TFElementBox::eval(), TFElementBox::getBBox(), TFElementBox::getCenter(), TFElementBox::getMax(), getMaxBox(), TFElementBox::getMin(), getMinBox(), getPos(), getPosVec(), TFElementBox::getSize(), TFElementBox::initBox(), TFElementBox::rasterize2D(), TFElementBox::setCenter(), TFElementBox::setMax(), TFElementBox::setMin(), setPos(), setPosVec(), TFElementBox::setSize(), and TFElementBox::updateBox().

bool TFElement::_remove [protected]
 

TFBlend _blend;.

Definition at line 211 of file TFElement.h.

Referenced by needRemove(), and TFElement().

ValVecType TFElement::_valVec [protected]
 

Definition at line 204 of file TFElement.h.

Referenced by TFElementBox::eval(), getValVec(), and TFElementBox::TFElementBox().

ValType TFElement::_zeroVal [protected]
 

Definition at line 206 of file TFElement.h.

Referenced by getZeroVal(), and setZeroVal().


The documentation for this class was generated from the following file:
Send questions, comments, and bug reports to:
jmk