00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef RU_ALGORITHM_H
00021 #define RU_ALGORITHM_H
00022
00023 #include "RU_API.h"
00024 #include "RU_AlgorithmMacros.h"
00025 #include "RU_AlgorithmTemplates.h"
00026
00027 class TIL_TileList;
00028 class TIL_Region;
00029 class RU_Algorithm;
00030
00031
00032
00033
00034
00035 class RU_API RU_Algorithm
00036 {
00037 public:
00038 RU_Algorithm();
00039 virtual ~RU_Algorithm();
00040
00041
00042
00043 virtual int initialize(float t);
00044
00045
00046
00047 int generate (TIL_TileList *output, float t,
00048 void *ndata =0, int thread=-1, void *data=0);
00049
00050 int pixelAdjust(TIL_TileList *output,
00051 const TIL_TileList *input,float t,
00052 void *ndata =0, int thread=-1, void *data=0);
00053
00054 int filter (TIL_TileList *output,
00055 const TIL_Region *input, float t,
00056 void *ndata =0, int thread=-1, void *data=0);
00057
00058 int filter (TIL_Region *output,
00059 const TIL_Region *input, float t,
00060 void *ndata =0, int thread=-1, void *data=0);
00061
00062 int binary (TIL_TileList *output,
00063 const TIL_Region *fore,
00064 const TIL_Region *back, float t,
00065 void *ndata =0, int thread=-1, void *data=0);
00066
00067 int binary (TIL_Region *output,
00068 const TIL_Region *fore,
00069 const TIL_Region *back, float t,
00070 void *ndata =0, int thread=-1, void *data=0);
00071
00072
00073
00074
00075
00076
00077
00078
00079 DECLARE_GENERATOR_OP(RU_GeneratorOp)
00080
00081
00082
00083 DECLARE_PIXEL_OP(RU_PixelOp)
00084
00085
00086
00087 DECLARE_FILTER_OP(RU_FilterOp)
00088
00089
00090
00091
00092 DECLARE_BINARY_OP(RU_BinaryOp)
00093
00094
00095
00096
00097 static bool interruptCheck(int thread);
00098
00099
00100 static void setInterruptCallback(bool (*cb)(void *, int));
00101
00102 private:
00103 static bool (*copInterruptCheck)(void *node, int thread);
00104 };
00105
00106
00107
00108
00109 #endif