#include <ColorMapper.h>
Inheritance diagram for ColorMapper:
Definition at line 30 of file ColorMapper.h.
framework interfaces NOT FOR GENERAL USE. | |
do not call from user programs/modules | |
virtual void | update_ (gutz::SmartPtr< DataObjIF > d)=0 |
input data modified notification | |
Modified interface | |
bool | isModified () const |
void | setModified (bool mod=true) |
Serialization | |
TODO: should be pure virtual, SOON | |
virtual std::ostream & | saveSelf (std::ostream &os) |
serialize | |
virtual std::istream & | readSelf (std::istream &is) |
unserialize | |
Forward Modify interface, NOT FOR GENERAL USE. | |
framework interface. | |
bool | isForwardModified () |
is this thing aready marked for future update? | |
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 () |
Public Types | |
enum | COLOR_MAPS { GREY_SCALE_RGB = 1<<0, RAINBOW_RGB = 1<<2 } |
can be or'ed together! More... | |
Public Member Functions | |
ColorMapper () | |
construction | |
virtual | ~ColorMapper () |
destruction | |
virtual void | setInput (NrroDataObjSP n) |
set Input | |
virtual NrroDataObjSP | getOutput () |
get Output | |
virtual void | setColorMap (int mapId) |
virtual int | getColorMap () |
virtual void | setWinLevRGB (bool onoff=true) |
window/level settings, turn window/level on(true) and off(false) | |
virtual void | setWinLevRGB (float window, float level) |
set the window/level | |
virtual float | getWindowRGB () |
get the window level | |
virtual float | getLevelRGB () |
virtual void | setWinLevA (bool onoff=true) |
turn alpha window/level on(true) and off(false) | |
virtual void | setWinLevA (float window, float level) |
virtual float | getWindowA () |
virtual float | getLevelA () |
unsigned int | getNumOutputs () const |
virtual void | execute () |
Public Execute Interface Execute if anything changed DO NOT override this if you don't know what you are doing, use "execDef()" this will get called by these! | |
virtual void | force () |
Execute no matter what!, unless you are going to get an update later. | |
virtual void | setForwardModified () |
update interface | |
virtual bool | request (DataObjSP d) |
request interface | |
unsigned int | getNumInputs () const |
void | update_ (DataObjSP d) |
update interface update when data changes | |
Protected Member Functions | |
virtual void | execDef () |
execute Definition | |
virtual void | mapGrey (NrroDataObjSP out, NrroDataObjSP in) |
Grey scale. | |
void | updateOutputs () |
Protected Member functions. | |
void | addOutput (DataObjSP d) |
add Output | |
void | delOutput (DataObjSP d) |
del Output | |
bool | isOutput (const DataObjSP d) const |
is Output | |
void | setNumOutputs (int nOut) |
Set Number Outputs. | |
void | setOutputN (int outNum, DataObjSP d) |
set Output number "N" | |
DataObjIF * | getOutputN (int outNum) |
returns raw pointer to facilitate easier dynamic_cast<YOUR_DATA_TYPE> | |
virtual bool | checkInputs () |
true if data is current, false if not | |
virtual bool | inputsModified () |
check if we have modified inputs | |
void | addInput (DataObjSP d) |
manipulate inputs | |
void | delInput (DataObjSP d) |
Del Input. | |
bool | isInput (const DataObjSP d) const |
isInput | |
void | setNumInputs (int nInputs) |
SetNumInputs. | |
void | setInputN (int inNum, DataObjSP d) |
Set Input "N". | |
DataObjIF * | getInputN (int inNum) |
returns raw pointer to facilitate easier dynamic_cast<YOUR_DATA_TYPE> | |
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 | |
int | _mapId |
bool | _autoRGB |
bool | _autoA |
float | _windowRGB |
float | _levelRGB |
float | _windowA |
float | _levelA |
bool | _forwardUpdate |
bool | _modified |
bool | _forward |
bool | _updating |
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 |
|
can be or'ed together!
Definition at line 39 of file ColorMapper.h. |
|
construction
Definition at line 26 of file ColorMapper.cpp. |
|
destruction
Definition at line 42 of file ColorMapper.cpp. |
|
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(). |
|
manipulate inputs
Definition at line 182 of file AlgObj.cpp. References SimBase::derr(), gutz::SmartPtr< DataObjIF >::isNull(), and AlgObj::setInputN(). |
|
add Output
Definition at line 279 of file SourceObj.cpp. References SimBase::derr(), gutz::SmartPtr< DataObjIF >::isNull(), and SourceObj::setOutputN(). |
|
true if data is current, false if not everything checked out so we must be ok Definition at line 156 of file AlgObj.cpp. References SimBase::derr(), and gutz::SmartPtr< DataObjIF >::isNull(). Referenced by AlgObj::execute(), SourceObj::force(), AlgObj::force(), SourceObj::request(), and AlgObj::update_(). |
|
Del Input.
Definition at line 195 of file AlgObj.cpp. References SimBase::derr(), AlgObj::isInput(), and SimModObjSP. |
|
del Output
Definition at line 292 of file SourceObj.cpp. References SimBase::derr(), SourceObj::isOutput(), and SourceObjSP. |
|
only prints in debug mode, -D_DEBUG Definition at line 130 of file simBase.h. References SimBase::_name_. |
|
|
execute Definition
Reimplemented from SourceObj. Definition at line 67 of file ColorMapper.cpp. References _mapId, SimBase::derr(), AlgObj::getInputN(), SourceObj::getOutputN(), GREY_SCALE_RGB, mapGrey(), NrroDataObjSP, and RAINBOW_RGB. |
|
Public Execute Interface Execute if anything changed DO NOT override this if you don't know what you are doing, use "execDef()" this will get called by these!
Implements SourceObjIF. Definition at line 70 of file SourceObj.cpp. References AlgObj::execute(), and SourceObj::updateOutputs(). Referenced by SourceObj::request(). |
|
Execute no matter what!, unless you are going to get an update later.
Implements SourceObjIF. Definition at line 79 of file SourceObj.cpp. References SimCore::_forward, SimCore::_modified, AlgObj::checkInputs(), SimBase::derr(), SourceObj::execDef(), and SourceObj::updateOutputs(). |
|
Definition at line 73 of file simBase.h. References SimBase::_changed. |
|
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(). |
|
Definition at line 44 of file ColorMapper.h. References _mapId. |
|
returns raw pointer to facilitate easier dynamic_cast<YOUR_DATA_TYPE>
Definition at line 283 of file AlgObj.cpp. References SimBase::derr(), and gutz::SmartPtr< DataObjIF >::getPtr(). Referenced by execDef(). |
|
Definition at line 61 of file ColorMapper.h. References _levelA. |
|
Definition at line 54 of file ColorMapper.h. References _levelRGB. |
|
Definition at line 45 of file simBase.h. References SimBase::_name_. Referenced by MetaProg::operator<<(). |
|
Implements AlgObjIF. |
|
Implements SourceObjIF. Definition at line 86 of file SourceObj.h. |
|
Definition at line 44 of file simBase.h. References string. |
|
get Output
Definition at line 58 of file ColorMapper.cpp. References SourceObj::getOutputN(), and NrroDataObjSP. |
|
returns raw pointer to facilitate easier dynamic_cast<YOUR_DATA_TYPE>
Definition at line 266 of file SourceObj.cpp. References SimBase::derr(), and gutz::SmartPtr< DataObjIF >::getPtr(). Referenced by execDef(), and getOutput(). |
|
Definition at line 60 of file ColorMapper.h. References _windowA. |
|
get the window level
Definition at line 53 of file ColorMapper.h. References _windowRGB. |
|
check if we have modified inputs
Definition at line 137 of file AlgObj.cpp. References SimBase::derr(), and gutz::SmartPtr< DataObjIF >::isNull(). Referenced by AlgObj::execute(). |
|
is this thing aready marked for future update?
Definition at line 63 of file simCore.h. References SimCore::_forward. |
|
isInput
Definition at line 224 of file AlgObj.cpp. References gutz::SmartPtr< DataObjIF >::isNull(). Referenced by AlgObj::delInput(). |
|
Definition at line 40 of file simCore.h. References SimCore::_modified. |
|
is Output
Definition at line 322 of file SourceObj.cpp. References gutz::SmartPtr< DataObjIF >::isNull(). Referenced by SourceObj::delOutput(), and SourceObj::request(). |
|
Grey scale.
Definition at line 87 of file ColorMapper.cpp. Referenced by execDef(). |
|
unserialize
Reimplemented from SimBase. |
|
request interface it's ready, cuz we don't know about it how could this happen? shouldn't get a request for data we don't own how could this happen? we should be forward too! how could this happen? we have been changed, better update but not if we are a true source! Implements SourceObjIF. Definition at line 98 of file SourceObj.cpp. References SimCore::_forward, SimCore::_modified, AlgObj::checkInputs(), SimBase::derr(), SourceObj::execute(), and SourceObj::isOutput(). |
|
serialize
Reimplemented from SimBase. |
|
Definition at line 74 of file simBase.h. References SimBase::_changed. Referenced by TFEltSP::getChangeID(), TFBaseSP::getChangeID(), TFBaseSP::operator=(), and TFGeneric::update(). |
|
Definition at line 43 of file ColorMapper.h. References _mapId. |
|
update interface only forward modify if we have to Reimplemented from AlgObj. Definition at line 139 of file SourceObj.cpp. References SimCore::_forward, SimBase::derr(), and gutz::SmartPtr< DataObjIF >::isNull(). |
|
set Input
Definition at line 50 of file ColorMapper.cpp. References DataObjSP, n, and AlgObj::setInputN(). |
|
Set Input "N".
Definition at line 264 of file AlgObj.cpp. References SimBase::derr(), gutz::SmartPtr< DataObjIF >::isNull(), AlgObj::setNumInputs(), and SimModObjSP. Referenced by AlgObj::addInput(), and setInput(). |
|
Definition at line 41 of file simCore.h. References SimCore::_modified. Referenced by EventData::setEvent(). |
|
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(). |
|
SetNumInputs. nothing to do create new input array copy old inputs nuke old input array set new array Definition at line 237 of file AlgObj.cpp. Referenced by AlgObj::AlgObj(), and AlgObj::setInputN(). |
|
Set Number Outputs. copy old outputs unset any (about to be) nuked outputs Definition at line 216 of file SourceObj.cpp. References gutz::g_max(), gutz::SmartPtr< DataObjIF >::isNull(), and SourceObjSP. Referenced by SourceObj::setOutputN(), and SourceObj::SourceObj(). |
|
set Output number "N"
Definition at line 247 of file SourceObj.cpp. References SimBase::derr(), gutz::SmartPtr< DataObjIF >::isNull(), SourceObj::setNumOutputs(), and SourceObjSP. Referenced by SourceObj::addOutput(). |
|
Definition at line 58 of file ColorMapper.h. |
|
turn alpha window/level on(true) and off(false)
Definition at line 57 of file ColorMapper.h. References _autoA. |
|
set the window/level
Definition at line 50 of file ColorMapper.h. References _levelRGB, _windowRGB, and level. |
|
window/level settings, turn window/level on(true) and off(false)
Definition at line 48 of file ColorMapper.h. References _autoRGB. |
|
input data modified notification
|
|
update interface update when data changes must mark forward!!! not forward no more Implements AlgObjIF. Definition at line 113 of file AlgObj.cpp. References SimCore::_forward, SimCore::_modified, AlgObj::checkInputs(), and AlgObj::execute(). |
|
Protected Member functions. for each output, send forward notification error check if it was changed mark it for update output unmodified, debug output output was null, report it now update each output error check, always! skip unodified outputs derr("updateOutputs()"); update the output Definition at line 165 of file SourceObj.cpp. References SimCore::_updating, SimBase::derr(), and gutz::SmartPtr< DataObjIF >::isNull(). Referenced by SourceObj::execute(), and SourceObj::force(). |
|
Definition at line 40 of file smartptr.h. Referenced by Nrro::NrroIter< T >::NrroIter(). |
|
Definition at line 41 of file smartptr.h. |
|
Definition at line 70 of file ColorMapper.h. Referenced by setWinLevA(). |
|
Definition at line 69 of file ColorMapper.h. Referenced by setWinLevRGB(). |
|
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 74 of file simCore.h. Referenced by SourceObj::force(), AlgObj::force(), SimCore::isForwardModified(), SourceObj::request(), DataObj::request_(), SourceObj::setForwardModified(), DataObj::setForwardModified(), AlgObj::setForwardModified(), SimCore::SimCore(), DataObj::update_(), and AlgObj::update_(). |
|
Definition at line 69 of file SimModObj.h. Referenced by SimModObjIF::SimModObjIF(). |
|
Definition at line 74 of file ColorMapper.h. Referenced by getLevelA(), and setWinLevA(). |
|
Definition at line 72 of file ColorMapper.h. Referenced by getLevelRGB(), and setWinLevRGB(). |
|
Definition at line 68 of file ColorMapper.h. Referenced by execDef(), getColorMap(), and setColorMap(). |
|
Definition at line 73 of file simCore.h. Referenced by AlgObj::execute(), SourceObj::force(), AlgObj::force(), SimCore::isModified(), SourceObj::request(), DataObj::request_(), SimCore::setModified(), SimCore::SimCore(), DataObj::update_(), and AlgObj::update_(). |
|
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 75 of file simCore.h. Referenced by SimCore::SimCore(), DataObj::update_(), and SourceObj::updateOutputs(). |
|
Definition at line 73 of file ColorMapper.h. Referenced by getWindowA(), and setWinLevA(). |
|
Definition at line 71 of file ColorMapper.h. Referenced by getWindowRGB(), and setWinLevRGB(). |