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

Image3D Class Reference

Baseclass for 3D images. More...

#include <Image3D.hpp>

Inheritance diagram for Image3D:

Inheritance graph
[legend]
Collaboration diagram for Image3D:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual string GetTypeName () const
 Type information, this should always return the result to a call of the TypeName function.
name Accesors to Properties
const Mask3D
Mask () const
Mask3DMask ()
bool HasMask () const
Mask3DAddMask ()
byte Mask (const Vect3Di &P) const
byte & Mask (const Vect3Di &P)
byte Mask (int x, int y, int z) const
byte & Mask (int x, int y, int z)
void RemoveMask ()
bool Has (const string &propname) const
template<class PType>
PType & Property (const string &name)
template<class PType>
const PType & Property (const string &name) const
template<class PType>
void AddProperty (const string &name, PType v)
template<class PType>
void SetProperty (const string &name, PType v)
name Image3D Accesors int Width () const
int Height () const
int Depth () const
Size3D Size () const
Vect3Di SizeV () const
RectZone3Di GetZone () const
int GetNVoxels () const
name Accesors to specific
image positions bool 
IsInside (float x, float y, float z) const
bool IsInside (int x, int y, int z) const
bool IsInside (const Vect3Di &P) const
void AssertBounds (int x, int y, int z) const
void AssertBounds (int pos) const
virtual float FloatValue (int x, int y, int z) const
 This is a way to retreive values when only the base class is known.
float FloatValue (const Vect3Di &pos) 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
 Write this object, either to a current node, a parent node, or the root node of the file.
virtual void WriteToFile (const string &fname) const
 Write the image to file fname: This is the fct the end user should call.
virtual void Resize (const Size3D &newSize)
name Copy and compare operators
Image3D
operator= (const Image3D &other)
bool operator== (const Image3D &other) const
bool operator!= (const Image3D &other) const
Constructors and destructors
virtual ~Image3D ()
 Destructor.
 Image3D (int _width, int _height, int _depth)
 Image3D (const Size3D &size)
 Image3D (const Image3D &other)

Public Attributes

Properties properties

Protected Member Functions

xmlpp::Element * CreateWriteNode (ImLib3DFile *file, xmlpp::Element *parentNode=NULL, xmlpp::Element *node=NULL) const
 Convenience for subclasses, for optionally creating missing top nodes.
xmlpp::Element * CreateReadNode (ImLib3DFile *file, xmlpp::Element *parentNode=NULL, xmlpp::Element *node=NULL)
 Convenience for subclasses, for optionally getting pointer to top nodes.

Protected Attributes

int width
 Sizes in each dimension of the container.
int height
 Sizes in each dimension of the container.
int depth
 Sizes in each dimension of the container.
int nvoxels
 Total number of stored elements.

Private Member Functions

void SetSize (const Size3D &newSize)

Detailed Description

Baseclass for 3D images.

This is a 3D image, it only defines image sizes and properties. It does not contain any actual image data. It is Container3D that contains image data.

Definition at line 40 of file Image3D.hpp.


Constructor & Destructor Documentation

Image3D::Image3D const Size3D size  ) 
 

Copy constructor

Definition at line 149 of file Image3D.cpp.


Member Function Documentation

string Image3D::GetTypeName  )  const [virtual]
 

Type information, this should always return the result to a call of the TypeName function.

subclasses should override this by using : virtual string GetTypeName() const {return TypeName<_Self>();}

Reimplemented in BitImage3D< FieldType, bitsPerValue, ValueType >, Container3D< Im3DValue >, Image3Dlinear< Im3DValue >, Mask3D, BitImage3D< byte, 1, byte >, Container3D< FieldType >, Container3D< vector< uint > >, Container3D< float >, Container3D< int >, Container3D< byte >, Container3D< CodeCluster * >, Container3D< vector< pair< Vect3Df, Typ > > >, Image3Dlinear< float >, Image3Dlinear< int >, and Image3Dlinear< byte >.

Definition at line 30 of file Image3D.cpp.

Referenced by FloatValue(), and Write().

float Image3D::FloatValue int  x,
int  y,
int  z
const [virtual]
 

This is a way to retreive values when only the base class is known.

WARNING: this is NOT the normal way of retreiving values of an image. Use () operators of subclasses, or better, iterators. This is a virtual function, so it is slow. Furthermore it casts results into float, which is not good in many situations. Many containers contain types that are not castable to float.

Reimplemented in BitImage3D< FieldType, bitsPerValue, ValueType >, Container3D< Im3DValue >, BitImage3D< byte, 1, byte >, Container3D< FieldType >, Container3D< vector< uint > >, Container3D< float >, Container3D< int >, Container3D< byte >, Container3D< CodeCluster * >, and Container3D< vector< pair< Vect3Df, Typ > > >.

Definition at line 23 of file Image3D.cpp.

References GetTypeName().

void Image3D::Read ImLib3DFile file,
xmlpp::Element *  parentNode = NULL,
xmlpp::Element *  node = NULL
[virtual]
 

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...

Implements Streamable.

Reimplemented in BitImage3D< FieldType, bitsPerValue, ValueType >, Container3D< Im3DValue >, BitImage3D< byte, 1, byte >, Container3D< FieldType >, Container3D< vector< uint > >, Container3D< float >, Container3D< int >, Container3D< byte >, Container3D< CodeCluster * >, and Container3D< vector< pair< Vect3Df, Typ > > >.

Definition at line 58 of file Image3D.cpp.

References CreateReadNode(), and Properties::Read().

Referenced by SparseImage3D< Im3DValue >::Read(), Container3D< Im3DValue >::Read(), and BitImage3D< FieldType, bitsPerValue, ValueType >::Read().


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