00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __TLMASK_H__
00018 #define __TLMASK_H__
00019
00020
00021 #include "tlVision.h"
00022 #include "tlPixelArray.h"
00023
00024
00025
00026 class tlMask : public tlPixelArray
00027 {
00028 public:
00029
00030 int cx;
00031 int cy;
00032 int area;
00033
00034
00035
00036 tlMask ();
00037 tlMask (int cx, int cy, int width, int height);
00038 tlMask (tlMask *mask);
00039 tlMask (tlImage *image);
00040 virtual ~tlMask ();
00041
00042
00043 int set ();
00044 int set (int width, int height);
00045 int set (tlMask *mask);
00046 int set (char *mask, int width, int height);
00047 int set (char *mask, int width, int height, tlRect *rect);
00048 int set (tlPixel *mask, int width, int height);
00049 int set (tlPixel *mask, int width, int height, tlRect *rect);
00050 int set (tlObject *object);
00051 int set (tlImage *image);
00052 int set (tlImage *image, tlRect *rect);
00053 int invert ();
00054 int invert (tlRect *rect);
00055 int setCenter ();
00056 int setCenter (int cx, int cy);
00057 int clear ();
00058 int clear (int width, int height);
00059
00060
00061 int fill ();
00062 int crop (int val);
00063
00064
00065 int merge (tlMask *mask);
00066
00067
00068 int adjust (tlRect *rect);
00069
00070
00071 int minimize ();
00072
00073
00074 int copy (tlMask *mask);
00075 int copyTo (tlMask *mask);
00076 };
00077
00078
00079
00080 #endif
00081