00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef RU_FEATHER_H
00021 #define RU_FEATHER_H
00022
00023 #include "RU_API.h"
00024 #include <PXL/PXL_LumFuncs.h>
00025
00026 #include "RU_Algorithm.h"
00027
00028 enum RU_FeatherType
00029 {
00030 RU_FEATHER_EXPAND =0,
00031 RU_FEATHER_SHRINK,
00032 RU_FEATHER_FILL_HOLES,
00033 RU_FEATHER_REMOVE_SPECKS
00034 };
00035
00036 enum RU_FeatherDropoff
00037 {
00038 RU_FEATHER_LINEAR =0,
00039 RU_FEATHER_GAUSSIAN,
00040 RU_FEATHER_EASE_IN,
00041 RU_FEATHER_EASE_OUT,
00042 RU_FEATHER_HALF_COS
00043 };
00044
00045
00046 class RU_API RU_Feather : public RU_Algorithm
00047 {
00048 public:
00049 RU_Feather();
00050 virtual ~RU_Feather();
00051
00052 virtual int initialize(float );
00053
00054 DECLARE_FILTER_OP(RU_FeatherOp)
00055
00056 void setLUTVal(int x, int y, float v);
00057 float getLUTVal(int x, int y) const;
00058
00059 float evalLUT(float x, float y) const;
00060
00061
00062 bool myUseLuma;
00063 PXL_LumFunction myLumFunc;
00064
00065
00066 RU_FeatherType myFeatherType;
00067
00068
00069 float myExpandSize;
00070 float myExpandYSize;
00071
00072 float myFeatherSize;
00073 float myFeatherYSize;
00074 RU_FeatherDropoff myFeatherDropoff;
00075 int mySmoothLevel;
00076 bool myFeatherFast;
00077
00078
00079 float myHoleThreshold;
00080
00081
00082 float *myFeatherLUT;
00083 int myXSize;
00084 int myYSize;
00085
00086
00087 float *myMask;
00088 };
00089
00090
00091 #endif