The Original CHomP Software
|
An abstract class that is inherited by all the cubical sets. More...
#include <cubfiles.h>
Public Member Functions | |
cubfile (const char *_filename) | |
The default constructor. More... | |
virtual | ~cubfile () |
The destructor. More... | |
const char * | filename () const |
What is the name of the associated disk file? More... | |
virtual int | dim () const |
What is the dimension of the set of cubes? More... | |
virtual int | count () const |
How many cubes are there in the set? More... | |
virtual bool | bitmaptype () const |
Is this a bitmap type of set of cubes? More... | |
virtual bool | elementary () const |
Is this a set of elementary cubes, as opposed to full cubes? More... | |
virtual bool | spacewrapping () const |
Does this set include the definition of space wrapping? More... | |
virtual int * | spacewrapping (int *table) const |
Fills in the space wrapping table if applicable. More... | |
virtual void | setwrapping (const int *table, int count=0) |
Sets the space wrapping according to the given table. More... | |
virtual int | boundingbox (int *mincoord, int *maxcoord) const |
Determines the bounding box of the set of cubes. More... | |
int | volume (int chunk=0, bool power2=false) const |
Determine the volume of the bounding box of the set of cubes. More... | |
virtual int | readcubes (chomp::homology::CubicalComplex &s) const |
Reads a set of cubical cells from the file. More... | |
virtual int | readcubes (chomp::homology::SetOfCubes &s) const |
Reads a set of cubes from the file. More... | |
virtual int | readcubes (int *&sizes, char *&bytes, int padding=0, bool power2=false) const |
Reads a bitmap from a file. More... | |
Static Public Member Functions | |
static const char * | name () |
The name of this type of a cubical set. More... | |
static std::ostream & | describe (std::ostream &out) |
Describes this particular type of a set of cubes. More... | |
static bool | compatible (const char *filename) |
Verifies if the file format is compatible with this cubfile type. More... | |
Protected Attributes | |
std::string | _filename |
The name of the corresponding disk file. More... | |
int | _dim |
The dimension of the space, 0 if unknown. More... | |
int | _count |
The number of cubes in the set, -1 if unknown. More... | |
std::vector< int > | _min |
The minimal coordinates of the cubes' corners (bounding box). More... | |
std::vector< int > | _max |
The maximal coordinates of the cubes' corners (bounding box). More... | |
std::vector< int > | _wrapping |
The space wrapping information if any. More... | |
An abstract class that is inherited by all the cubical sets.
Definition at line 62 of file cubfiles.h.
|
inline |
The default constructor.
Definition at line 230 of file cubfiles.h.
|
inlinevirtual |
The destructor.
Definition at line 236 of file cubfiles.h.
|
inlinevirtual |
Is this a bitmap type of set of cubes?
Reimplemented in chomp::homengin::cublistfile, chomp::homengin::cellistfile, chomp::homengin::bitcodefile, chomp::homengin::winbmpfile, chomp::homengin::bmdfile, and chomp::homengin::cubitmap.
Definition at line 100 of file cubfiles.h.
|
inlinevirtual |
Determines the bounding box of the set of cubes.
All the coordinates of cubes are at least 'min', and strictly smaller than 'max'. Returns 0.
Reimplemented in chomp::homengin::cublistfile, chomp::homengin::cellistfile, and chomp::homengin::winbmpfile.
Definition at line 143 of file cubfiles.h.
Referenced by chomp::homengin::cublistfile::boundingbox(), and chomp::homengin::cellistfile::boundingbox().
|
inlinestatic |
Verifies if the file format is compatible with this cubfile type.
Definition at line 179 of file cubfiles.h.
|
inlinevirtual |
How many cubes are there in the set?
Reimplemented in chomp::homengin::cublistfile, chomp::homengin::cellistfile, chomp::homengin::bitcodefile, chomp::homengin::winbmpfile, chomp::homengin::bmdfile, and chomp::homengin::cubitmap.
Definition at line 92 of file cubfiles.h.
References _count.
Referenced by setwrapping().
|
inlinestatic |
Describes this particular type of a set of cubes.
Definition at line 172 of file cubfiles.h.
|
inlinevirtual |
What is the dimension of the set of cubes?
Reimplemented in chomp::homengin::cublistfile, chomp::homengin::cellistfile, and chomp::homengin::bitcodefile.
Definition at line 84 of file cubfiles.h.
References _dim.
Referenced by chomp::homengin::bmdfile::bmdfile(), chomp::homengin::cubitmap::cubitmap(), and setwrapping().
|
inlinevirtual |
Is this a set of elementary cubes, as opposed to full cubes?
Reimplemented in chomp::homengin::cublistfile, chomp::homengin::cellistfile, chomp::homengin::bitcodefile, chomp::homengin::winbmpfile, chomp::homengin::bmdfile, and chomp::homengin::cubitmap.
Definition at line 106 of file cubfiles.h.
|
inline |
What is the name of the associated disk file?
Definition at line 78 of file cubfiles.h.
References _filename.
|
inlinestatic |
The name of this type of a cubical set.
Definition at line 166 of file cubfiles.h.
|
inlinevirtual |
Reads a set of cubical cells from the file.
Reimplemented in chomp::homengin::cublistfile, chomp::homengin::cellistfile, chomp::homengin::bitcodefile, chomp::homengin::winbmpfile, chomp::homengin::bmdfile, and chomp::homengin::cubitmap.
Definition at line 185 of file cubfiles.h.
|
inlinevirtual |
Reads a set of cubes from the file.
Reimplemented in chomp::homengin::cublistfile, chomp::homengin::cellistfile, chomp::homengin::bitcodefile, chomp::homengin::winbmpfile, chomp::homengin::bmdfile, and chomp::homengin::cubitmap.
Definition at line 191 of file cubfiles.h.
|
inlinevirtual |
Reads a bitmap from a file.
Allocates memory for the table of sizes, and for the bytes of the bitmap. If padding > 0, then padds the lines to a multiple of the given number of bytes. If requested, additionally rounds the sizes in each direction up to the nearest power of 2.
Reimplemented in chomp::homengin::cublistfile, chomp::homengin::cellistfile, chomp::homengin::bitcodefile, chomp::homengin::winbmpfile, chomp::homengin::bmdfile, and chomp::homengin::cubitmap.
Definition at line 201 of file cubfiles.h.
|
inlinevirtual |
Sets the space wrapping according to the given table.
Definition at line 131 of file cubfiles.h.
|
inlinevirtual |
Does this set include the definition of space wrapping?
Definition at line 112 of file cubfiles.h.
References _wrapping.
|
inlinevirtual |
Fills in the space wrapping table if applicable.
Returns the address of the table.
Definition at line 119 of file cubfiles.h.
References _wrapping.
int chomp::homengin::cubfile::volume | ( | int | chunk = 0 , |
bool | power2 = false |
||
) | const |
Determine the volume of the bounding box of the set of cubes.
The volume is measured in cubes or in chunks of cubes (e.g., chunk = 8 measures the bitmap size in bytes). If requested, the width in each direction is rounded up to the nearest power of 2 while calculating the volume.
|
mutableprotected |
The number of cubes in the set, -1 if unknown.
Definition at line 215 of file cubfiles.h.
Referenced by count(), chomp::homengin::cublistfile::count(), chomp::homengin::cellistfile::count(), and chomp::homengin::bitcodefile::count().
|
mutableprotected |
The dimension of the space, 0 if unknown.
Definition at line 212 of file cubfiles.h.
Referenced by chomp::homengin::bmdfile::bmdfile(), chomp::homengin::cubitmap::cubitmap(), dim(), chomp::homengin::bitcodefile::dim(), and chomp::homengin::winbmpfile::winbmpfile().
|
protected |
The name of the corresponding disk file.
Definition at line 209 of file cubfiles.h.
Referenced by filename().
|
mutableprotected |
The maximal coordinates of the cubes' corners (bounding box).
Definition at line 221 of file cubfiles.h.
Referenced by chomp::homengin::bmdfile::bmdfile(), boundingbox(), and chomp::homengin::cubitmap::cubitmap().
|
mutableprotected |
The minimal coordinates of the cubes' corners (bounding box).
Definition at line 218 of file cubfiles.h.
Referenced by chomp::homengin::bmdfile::bmdfile(), boundingbox(), chomp::homengin::cublistfile::boundingbox(), chomp::homengin::cellistfile::boundingbox(), and chomp::homengin::cubitmap::cubitmap().
|
mutableprotected |
The space wrapping information if any.
Definition at line 224 of file cubfiles.h.
Referenced by setwrapping(), and spacewrapping().