Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

SparseStructure3D Class Reference

defines the constant sparse structure (which voxels are zero or non zero) of a sparse image. More...

#include <SparseImage3D.hpp>

Inheritance diagram for SparseStructure3D:

Inheritance graph
[legend]
Collaboration diagram for SparseStructure3D:

Collaboration graph
[legend]
List of all members.

Public Member Functions

void Reference (SparseImage3DBase *image) const
bool Dereference (SparseImage3DBase *image) const
void SetName (string _name)
string Name () const
void Read (ImLib3DFile *file, xmlpp::Element *parentNode=NULL, xmlpp::Element *node=NULL)
 Read this object, either from a current node, a parent node, or the root node of the file.
void Write (ImLib3DFile *file, xmlpp::Element *parentNode=NULL, xmlpp::Element *node=NULL) const
 Write this object, either to a current node, a parent node, or the root node of the file.
void WriteToFile (const string &fname) const
 Write this object to a file.
void ReadFromFile (const string &fname)
 Read this object from a file.
int ValSize () const
Size3D Size () const
const BitMask3DMask () const
Vect3Di valNbToPos (int valNb) const
int posToValNb (const Vect3Di &pos) const

Static Public Member Functions

static const SparseStructure3DFind (string sname)
static SparseStructure3DCreate (const string &name)
static SparseStructure3DCreate (ImLib3DFile *file, xmlpp::Element *parentNode=NULL, xmlpp::Element *node=NULL)
static SparseStructure3DCreate (const BitMask3D &_mask, bool _autoDestroy)

Private Member Functions

name Data structures for rapid valnb (value index) to 3D position conversion mutable bool valNbToPosOk
void MakeValNbToPosIndex () const
name Data structures for rapid
D position to 
valnb (value index) conversion mutable bool posToValNbOk
void MakePosToValNb () const
void ComputeValSize ()
 SparseStructure3D (BitMask3D _mask, bool _autoDestroy=false, int _size=-1)

Private Attributes

int size
 number of non zero values in mask
BitMask3D mask
 one bit per voxel image describing zero and non zero values
name Several SparseImage3D
s may share the same 
SparseStructure3D
bool autoDestroy
 if this is true, then object automatically manges it's own destruction
vector< SparseImage3DBase * > referencingImages
 images referencing this object. when it goes down to zero, it should delete itself
bool suicideInProgress
 indicates whether that call to the destructor is not a user error
string name
vector< uint > valNbToPosIndex
Container3D< vector< uint > > xProjValNb

Static Private Attributes

static vector< const SparseStructure3D * > allreadyExisting
 keep track of existing structs, so that anybody that needs one can hook on it by name

Friends

void SparseImage3D_Test ()

Detailed Description

defines the constant sparse structure (which voxels are zero or non zero) of a sparse image.

Non zero values of a sparse image are stored in an array indexed by valNb. This class provides fast valNb to 3D Pos and 3D pos to valNb conversion. These conversions require special datastructures that are automatically computed only if needed.

Definition at line 37 of file SparseImage3D.hpp.


The documentation for this class was generated from the following files:
Generated on Fri Jun 17 13:36:20 2005 for ImLib3D by  doxygen 1.4.2