#include <TFBase.h>
Inheritance diagram for TFGeneric:
Handles basic TFElement management and various TF generation methods.
Definition at line 39 of file TFBase.h.
Evaluate | |
Evaluate the transfer function at some arbitrary position | |
virtual ValType | eval (const PosType &tfpos) |
eval | |
Domain | |
virtual int | sizeDomain () const |
dimension of transfer function domain how many axies does the transfer function have??? | |
virtual PosType | getDomainRes () const |
how many bins will discrete TF maps have? default is 256 for all TF domain axes. | |
virtual void | setDomainRes (const PosType &res) |
notice that you are passing a gutz::vec, so you can have a different number of bins for each axis | |
Range | |
dimension of transfer function range, ex.
4 is probably standard for RGBA output | |
virtual int | sizeRange () const |
Volume stuff | |
virtual void | setVolume (VolumeSP v) |
virtual VolumeSP | getVolume () const |
Transfer function elements | |
TFElementListSP | getTFElts () const |
void | setTFElts (TFElementListSP _tfe) |
void | addTFElt (TFEltSP tfelt) |
void | addTFElement (TFElement *tfelt) |
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 () 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::tfDomainType | PosType |
typedef STF::tfRangeType | ValType |
Public Member Functions | |
TFGeneric () | |
TFGeneric (VolumeSP vol) | |
virtual | ~TFGeneric () |
virtual int | getChangeID () |
reimplemented from SimBase, needed since changes are dependent on sub-objects like TFElements | |
TFImageSP | get2DMap (gutz::vec2i axesIdx, const gutz::vec2i size=gutz::vec2i_neg_one, int type=Nrro::UCHAR, int kind=STF::TF_RGBA) |
Generate a 2D tf image (map) from a pair of axies (axiesIdx) of the tfdomain ... | |
Protected Member Functions | |
virtual void | update () |
update the transfer function, checks to see if any of the elements changed and updates if it needs to. | |
TFImageSP | getImage (const gutz::vec2i &ai) |
getImage | |
void | setImage (const TFImageSP im) |
setImage | |
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 | |
VolumeSP | _vol |
TFElementListSP | _elts |
PosType | _res |
TFImageSPMap | _images |
cache generated tf images... | |
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 |
|
|
|
|
|
Definition at line 31 of file TFBase.cpp. |
|
Definition at line 40 of file TFBase.cpp. |
|
Definition at line 49 of file TFBase.cpp. References _elts, _vol, and gutz::SmartPtr< TFElementList >::isNull(). |
|
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(). |
|
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. |
|
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(). |
|
Definition at line 97 of file TFBase.h. References addTFElt(). |
|
Definition at line 96 of file TFBase.h. References _elts. Referenced by addTFElement(). |
|
only prints in debug mode, -D_DEBUG Definition at line 130 of file simBase.h. References SimBase::_name_. |
|
|
eval
Definition at line 89 of file TFBase.cpp. References _elts, SimBase::derr(), gutz::SmartPtr< TFElementList >::isNull(), TFElementListIter, and v. |
|
Generate a 2D tf image (map) from a pair of axies (axiesIdx) of the tfdomain ... ... with some size, type, specific values in your choice of order, ... and your choice of how many values (channels) it should have kind is from STF::TF_4MAP_KINDS type is from Nrro::NRRO_TYPES
Definition at line 120 of file TFBase.cpp. References _elts, SimBase::derr(), size, TFElementListIter, type, gutz::vec2i, and gutz::vec2i_neg_one. |
|
Definition at line 73 of file simBase.h. References SimBase::_changed. |
|
reimplemented from SimBase, needed since changes are dependent on sub-objects like TFElements see if any of the elments changed update if anything changed Reimplemented from SimBase. Definition at line 72 of file TFBase.cpp. References _elts, SimBase::getChangeID(), and update(). |
|
how many bins will discrete TF maps have? default is 256 for all TF domain axes.
Definition at line 67 of file TFBase.h. References _res. |
|
getImage
Definition at line 177 of file TFBase.cpp. References _images, and TFImageSPMapIter. |
|
Definition at line 45 of file simBase.h. References SimBase::_name_. Referenced by MetaProg::operator<<(). |
|
Definition at line 44 of file simBase.h. References string. |
|
Definition at line 94 of file TFBase.h. References _elts. |
|
Definition at line 88 of file TFBase.h. References _vol. |
|
unserialize
Reimplemented in SimCore, and VolRenBase. |
|
serialize
Reimplemented in SimCore, and VolRenBase. |
|
Definition at line 74 of file simBase.h. References SimBase::_changed. Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and update(). |
|
notice that you are passing a gutz::vec, so you can have a different number of bins for each axis
|
|
setImage
Definition at line 188 of file TFBase.cpp. References _images, and SimBase::derr(). |
|
Definition at line 47 of file simBase.h. References SimBase::_name_, and name. |
|
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(). |
|
Definition at line 95 of file TFBase.h. References _elts. |
|
|
|
dimension of transfer function domain how many axies does the transfer function have???
|
|
|
|
update the transfer function, checks to see if any of the elements changed and updates if it needs to. You can call this whenever you want. Definition at line 59 of file TFBase.cpp. References _elts, and SimBase::setChanged(). Referenced by getChangeID(). |
|
Definition at line 40 of file smartptr.h. Referenced by Nrro::NrroIter< T >::NrroIter(). |
|
Definition at line 41 of file smartptr.h. |
|
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(). |
|
Definition at line 130 of file TFBase.h. Referenced by addTFElt(), eval(), get2DMap(), getChangeID(), getTFElts(), setTFElts(), update(), and ~TFGeneric(). |
|
cache generated tf images...
Definition at line 135 of file TFBase.h. Referenced by getImage(), and setImage(). |
|
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(). |
|
Definition at line 132 of file TFBase.h. Referenced by getDomainRes(), and setDomainRes(). |
|
Definition at line 129 of file TFBase.h. Referenced by getVolume(), setVolume(), and ~TFGeneric(). |