MeVisLabToolboxReference
MeVisLab/Standard/Sources/ML/MLTools/include/mlBitImage.h File Reference

Implements a class to manage a binary image. More...

#include "MLToolsSystem.h"
#include "mlModuleIncludes.h"
#include "mlWrapperMacros.h"

Go to the source code of this file.

Classes

class  ml::BitImage
 Class to manage a binary image. More...

Namespaces

namespace  ml
 

Define the namespace name like in the ML. Default is ml.


Defines

#define ML_BIT_IMG_SHIFT   5l
 Power of 2 to get bit size of word of bit image, e.g. 5 for 32 bit words.
#define ML_BIT_IMG_ALL_BITS   0xffffffffl
 Bit mask specifying all bits in bit image word e.g. 32 set bits for 32 bit words.
#define ML_BIT_IMG_INDEX_BITS   0x1fl
 Bits to mask lower ML_BIT_IMG_SHIFT bits, e.g. 0x1f = 31 for 2^5 = 32 bits in word.
#define ML_BIT_IMG_LOW_BIT   0x00000001l
 Bit image word with lowest bit set.
#define ML_BIT_IMG_HIGH_BIT   0x80000000l
 Bit image word with highest bit set.
#define ML_BIT_IMG_DATA_TYPE   MLuint32
 Data type used for words in bit image (even on 64 bit versions).
#define ML_BIT_IMG_BIT_IDX_TYPE   MLuint64
 Data type used for an index to the current bit inside of the image; note that this may exceed the address space type size_t on 32 bit systems if a BitImage with more than 4GB is created which is possible, because technically up to 32GB (8*4GByte) could be reached as size.

Detailed Description

Implements a class to manage a binary image.

The class supports creating, clearing, resizing, loading saving, scaling and copying from/to SubImages 6d bitmaps. Access functions to the bits in the bitmap are available as set/get/cleared/toggle methods and by a cursor manager which can move a cursor through the image. Bits under the cursor can also be set/get/cleared or toggled. Debug printing is available with the symbol ML_BITIMAGE. Class instances can enable/disable error handling so that error cause exceptions to be thrown as MLErrorCodes. Typical are e.g. OUT_OUF_RANGE or ML_NO_MEMORY.

Author:
Wolf Spindler
Date:
10/2001

Definition in file mlBitImage.h.


Define Documentation

#define ML_BIT_IMG_ALL_BITS   0xffffffffl

Bit mask specifying all bits in bit image word e.g. 32 set bits for 32 bit words.

Definition at line 43 of file mlBitImage.h.

Referenced by ml::BitImage::clear(), and ml::BitImage::clearCursorValue().

#define ML_BIT_IMG_BIT_IDX_TYPE   MLuint64

Data type used for an index to the current bit inside of the image; note that this may exceed the address space type size_t on 32 bit systems if a BitImage with more than 4GB is created which is possible, because technically up to 32GB (8*4GByte) could be reached as size.

Definition at line 61 of file mlBitImage.h.

#define ML_BIT_IMG_DATA_TYPE   MLuint32

Data type used for words in bit image (even on 64 bit versions).

Definition at line 55 of file mlBitImage.h.

Referenced by ml::BitImage::clear(), ml::BitImage::set(), and ml::BitImage::toggle().

#define ML_BIT_IMG_HIGH_BIT   0x80000000l

Bit image word with highest bit set.

Definition at line 52 of file mlBitImage.h.

#define ML_BIT_IMG_INDEX_BITS   0x1fl