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

SparseImage3D< Im3DValue > Class Template Reference

An image where most points are zero. More...

#include <SparseImage3D.hpp>

Collaboration diagram for SparseImage3D< Im3DValue >:

Collaboration graph
List of all members.

Constructors and destructors

virtual ~SparseImage3D ()
 SparseImage3D (const string &fname)
 SparseImage3D (const char *fname)
 SparseImage3D (const SparseStructure3D *_sparseStructure)
 SparseImage3D (const SparseImage3D &origCont)
void Allocate ()

Public Types

typedef Im3DValue value_type
 So that other templates know.
typedef SIM3D_iteratorFast<
const _Self, const value_type *,
const value_type & > 
typedef iteratorFast iterator
typedef iterator iteratorMasked
typedef iterator iteratorXYZ
typedef const_iteratorFast const_iterator
typedef const_iterator const_iteratorMasked
typedef const_iterator const_iteratorXYZ

Public Member Functions

name Begin and end iterating
through an image iteratorFast 
begin ()
 (stl-like) get an iterator positioned at the begining of this container
const_iteratorFast begin () const
iteratorFast end ()
 (stl-like) get an iterator positioned at the end of this container
const_iteratorFast end () const
void InitZero ()
 Initialize zero value.
value_typeGet (const Vect3Di &pos)
value_type Get (const Vect3Di &pos) const
value_typeoperator() (int x, int y, int z)
value_type operator() (int x, int y, int z) const
value_typeoperator() (const Vect3Di &pos)
value_type operator() (const Vect3Di &pos) const
void Fill (const value_type &value)
 Sets all elements of the container to this value.
template<class OtherImageType>
void MaskedCopy (OtherImageType other)
virtual string GetTypeName () const
virtual void Read (ImLib3DFile *file, xmlpp::Element *parentNode=NULL, xmlpp::Element *node=NULL)
 This is where all the information is written.
virtual void Write (ImLib3DFile *file, xmlpp::Element *parentNode=NULL, xmlpp::Element *node=NULL) const
virtual void WriteToFile (const string &fname) const
 Write the image to file fname: This is the fct the end user should call.
virtual void WriteToFile (const string &fname, bool _shareSparseStructureFile)
void Resize (const Size3D &newSize)
const value_typeGetZero () const
void SetZero (const value_type &_zero)
name Copy and compare operators
operator= (const _Self &other)
bool operator== (const _Self &other) const
bool operator!= (const _Self &other) const
template<class OtherImage>
bool operator== (const OtherImage &other)
template<class OtherImage>
bool operator!= (const OtherImage &other)
value_type SafeValue (int x, int y, int z) const
value_type SafeValue (const Vect3Di &v) const
template<class Im3DValue>
bool operator== (const SparseImage3D &other) const

Public Attributes

name Iterator Typedefs typedef
SIM3D_iteratorFast< _Self,
value_type *, value_type & > 
value_type zero

Private Types

typedef SparseImage3D< Im3DValue > _Self

Private Attributes

Im3DValue * imageData
Im3DValue * imageDataEnd


class SIM3D_iteratorFast< _Self,value_type *,value_type & >
class SIM3D_iteratorFast< const _Self, const value_type *, const value_type & >

Detailed Description

template<class Im3DValue>
class SparseImage3D< Im3DValue >

An image where most points are zero.

The points which are zero or non zero are determined once, and connot be changed. Though the values of non zero points may be changed. The zero/non zero structure is described by SparseStructure3D. Several SparseImage3D's may share the same SparseStructure3D to save memory. When saved into a file they may also share a common SparseStructure3D file.

Definition at line 254 of file SparseImage3D.hpp.

Constructor & Destructor Documentation

template<class Im3DValue>
SparseImage3D< Im3DValue >::SparseImage3D const SparseImage3D< Im3DValue > &  origCont  ) 

Copy constructor

Definition at line 173 of file SparseImage3D.hxx.

References SparseImage3D< Im3DValue >::imageData, and SparseImage3D< Im3DValue >::InitZero().

Member Function Documentation

template<class Im3DValue>
void SparseImage3D< Im3DValue >::Read ImLib3DFile file,
xmlpp::Element *  parentNode = NULL,
xmlpp::Element *  node = NULL

This is where all the information is written.

This virtual function writes xml/bin of any unset/unwritten information (type,image size,image data,,...) If you override it in a child class, you should still call it (using _Base::Write...), you can even call it several times...

Definition at line 55 of file SparseImage3D.hxx.

References XMLBinaryFile::CheckBinaryReadComplete(), XMLBinaryFile::GetAttribute(), XMLBinaryFile::GetChild(), Image3D::Read(), and XMLBinaryFile::ReadBinaryNode().

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