#include <VolField.h>
Inheritance diagram for VolField:
An elaborate container for a simian data field. see VolFieldVec below for a description of a collection of fields TODO: needs major cleanup for handling Nrro images and not just 4D volumes... working on it, jeez!
Definition at line 36 of file VolField.h.
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 | |
enum | { BEST = SIMT_BEST, BYTE = SIMT_8BIT, SHORT = SIMT_16FIXED, HALF = SIMT_16FLOAT, FLOAT = SIMT_32FLOAT, QUALITY_LAST } |
texture qualities, these are repeated from "simTexture.h", see for complete list of available qualities More... | |
Public Member Functions | |
VolField () | |
Construct. | |
VolField (Nrro *n) | |
VolField (NrroSP n) | |
virtual | ~VolField () |
unsigned int | numNrro () |
Nrros: ----------------------------------- data is stored in Nrrd Objects, if there are more than 1 nrros then you probably have bricked data, but you should check. | |
NrroSP | getNrro (unsigned int n=0) |
void | setNrro (NrroSP nrro, unsigned int n=0) |
bool | isActive () |
is this field active for rendering ? | |
void | setActive (bool on_off) |
bool | isBricked () |
Bricking: -------------------------------- if bricked the 0th nrro is the original data. | |
void | setBricked (bool bricked) |
set as bricked or not bricked | |
NrroSP | getBrick (unsigned int i) |
get a Nrro brick | |
unsigned int | numBricks () |
how many bricks? | |
void | brick (gutz::vec3i maxBrickDims) |
create bricks no bigger than maxBrickDims (insures pow2) | |
NrroSP | genBrick (gutz::vec3i pos, gutz::vec3i size, NrroSP nin) |
create a single brick | |
void | nukeBricks () |
remove all bricks | |
bool | getUpdate () |
a flag informing of changes to field | |
void | setUpdate (bool up) |
virtual void | update () |
Update Field. | |
int | getTexQuality () |
void | setTexQuality (int tq) |
glift::SingleTexSP | genTexture (unsigned int n=0) |
Textures for rendering. | |
glift::SingleTexSP | genBrickTexture (unsigned int n=0) |
Generate Brick Texture. | |
void | clearTex () |
bool | checkDims (gutz::SmartPtr< VolField > f) |
validate the dimensions of this field against another field, are the data and all bricks the same dimension? | |
int | getTexUnit () const |
texture unit to bind this field to, uses [0-N] range | |
void | setTexUnit (int tu) |
Protected Member Functions | |
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 | |
bool | _on |
bool | _up |
bool | _bricked |
glift::SingleTexSPVec | _tex |
int | _texquality |
int | _texUnit |
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 |
|
texture qualities, these are repeated from "simTexture.h", see for complete list of available qualities
Definition at line 89 of file VolField.h. |
|
Construct.
Definition at line 37 of file VolField.cpp. References NrroSPVec. |
|
Definition at line 47 of file VolField.cpp. |
|
Definition at line 57 of file VolField.cpp. |
|
Definition at line 46 of file VolField.h. |
|
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(). |
|
create bricks no bigger than maxBrickDims (insures pow2) generate bricks along z generate bricks along y generate bricks along x we have a remainder how many bricks will we need? if the original volume is smaller than the maxBrick dim, we will generate exactly one brick! it will be padded to the right power of 2 TODO: this is wrong, you need on voxel of overlap, which we have, but, that means the remainder is wrong, we loose a voxel off the end for each brick we have! Definition at line 255 of file VolField.cpp. References genBrick(), getNextPow2(), getNrro(), getUpdate(), isBricked(), n, setBricked(), update(), gutz::vec3i, x, y, and z. |
|
validate the dimensions of this field against another field, are the data and all bricks the same dimension? check to see if our dimensions match another's exactly check every brick error checking abounds check to make sure they are the same dimension check each axis Definition at line 143 of file VolField.cpp. References SimBase::derr(), getNrro(), gutz::SmartPtr< Nrro >::isNull(), and size. |
|
Definition at line 104 of file VolField.h. References _tex. Referenced by update(). |
|
only prints in debug mode, -D_DEBUG Definition at line 130 of file simBase.h. References SimBase::_name_. |
|
|
create a single brick set up the arrays we need for nrro croping crop that sucker check if we have a remainder to pad out ? arrays we need for nrro padding pad out to brick size Definition at line 221 of file VolField.cpp. References Nrro::BLEED, gutz::g_min(), gutz::SmartPtr< Nrro >::isNull(), and size. Referenced by brick(). |
|
Generate Brick Texture.
Definition at line 132 of file VolField.cpp. References genTexture(), isBricked(), and n. |
|
Textures for rendering. texture still not valid!!! badness Definition at line 99 of file VolField.cpp. References _tex, _texquality, SimBase::derr(), gutz::g_max(), gutz::SmartPtr< Nrro >::isNull(), loadNrroTexture(), and n. Referenced by genBrickTexture(). |
|
get a Nrro brick I don't know if this is reasonable! but I just don't want to crash! Definition at line 173 of file VolField.cpp. References getNrro(), isBricked(), and size. |
|
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 45 of file simBase.h. References SimBase::_name_. Referenced by MetaProg::operator<<(). |
|
Definition at line 54 of file VolField.h. References n. Referenced by brick(), checkDims(), and getBrick(). |
|
Definition at line 44 of file simBase.h. References string. |
|
Definition at line 97 of file VolField.h. References _texquality. |
|
texture unit to bind this field to, uses [0-N] range
Definition at line 115 of file VolField.h. References _texUnit. |
|
a flag informing of changes to field
Definition at line 81 of file VolField.h. References _up. |
|
is this field active for rendering ?
Definition at line 59 of file VolField.h. References _on. |
|
Bricking: -------------------------------- if bricked the 0th nrro is the original data.
Definition at line 65 of file VolField.h. References _bricked. Referenced by brick(), genBrickTexture(), getBrick(), nukeBricks(), numBricks(), and update(). |
|
remove all bricks not bricked, nothing to do reset bricked pop off all nrro bricks leave 0, that's the original data Definition at line 202 of file VolField.cpp. References isBricked(), setBricked(), and size. Referenced by update(). |
|
how many bricks?
Definition at line 187 of file VolField.cpp. References isBricked(), and size. |
|
Nrros: ----------------------------------- data is stored in Nrrd Objects, if there are more than 1 nrros then you probably have bricked data, but you should check.
Definition at line 53 of file VolField.h. References size. |
|
unserialize
Reimplemented in SimCore, and VolRenBase. |
|
serialize
Reimplemented in SimCore, and VolRenBase. |
|
Definition at line 60 of file VolField.h. References _on. |
|
set as bricked or not bricked
Definition at line 67 of file VolField.h. References _bricked. Referenced by brick(), and nukeBricks(). |
|
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 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 67 of file VolField.cpp. References SimBase::derr(), n, NrroSP, and size. |
|
Definition at line 98 of file VolField.h. References _texquality, and setUpdate(). |
|
Definition at line 116 of file VolField.h. References _texUnit. |
|
Definition at line 82 of file VolField.h. References _up. Referenced by setTexQuality(), and update(). |
|
Update Field. nothing changed? nothing to do reset everything update reset Definition at line 80 of file VolField.cpp. References clearTex(), getUpdate(), isBricked(), nukeBricks(), and setUpdate(). Referenced by brick(). |
|
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 122 of file VolField.h. Referenced by isBricked(), and setBricked(). |
|
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(). |
|
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 120 of file VolField.h. Referenced by isActive(), and setActive(). |
|
Definition at line 123 of file VolField.h. Referenced by clearTex(), and genTexture(). |
|
Definition at line 124 of file VolField.h. Referenced by genTexture(), getTexQuality(), and setTexQuality(). |
|
Definition at line 125 of file VolField.h. Referenced by getTexUnit(), and setTexUnit(). |
|
Definition at line 121 of file VolField.h. Referenced by getUpdate(), and setUpdate(). |