00001
00002
00003
00004
00005
00006
00007
00008 #ifndef bodySegDTWT2D_H
00009 #define bodySegDTWT2D_H
00010
00011 #include "memoryAllocation.h"
00012 #include "rangeSegDTWTauto.h"
00013 #include "segDTWT.h"
00014 #include <algorithm>
00015 #include <math.h>
00016 #include <string>
00017 #include <iostream>
00018 #include "cppTypes.h"
00019
00020
00021
00022
00023 void convolveRow(float* i, int size,float* o,float* filter,int filter_size);
00024
00025
00026
00027
00028 void convolveRow(float* i, int size, float* o,float* filter,int filter_size,int zerosLeft,int zerosRight);
00029
00030
00031
00032
00033 void convolveCol(float* i, int size,int i_widthStep,float* o,int o_widthStep,float* filter,int filter_size);
00034
00035
00036 void convolveCol(float* i, int size,int i_widthStep,float* o,int o_widthStep,float* filter,int filter_size,int zerosTop,int zerosBottom);
00037
00038
00039
00040
00047 class bodySegDTWT2D{
00048
00049 float* LL_buffer;
00050 int LL_buffer_widthStep;
00051
00052 float* HL_buffer;
00053 int HL_buffer_widthStep;
00054
00055 float* HH_buffer;
00056 int HH_buffer_widthStep;
00057
00058 float* LH_buffer;
00059 int LH_buffer_widthStep;
00060
00061
00062 float* H_buffer;
00063 int H_buffer_widthStep;
00064
00065 float* L_buffer;
00066 int L_buffer_widthStep;
00067
00068
00069 float* i_data;
00070 int i_widthStep;
00071
00072 float** o_data;
00073
00074 int* widthSteps;
00075
00076
00077 separableWavelet* w;
00078
00079 Size maxSize;
00080
00081 int level;
00082
00083
00084 int maxWidthHalf;
00085 int maxHeightHalf;
00086
00087
00088 public :
00097 void operator()(const tbb::blocked_range2d_segdtwt_segidtwt_auto<size_t>& r);
00098
00121 bodySegDTWT2D(float* i_data, int i_widthStep, float* subbands[],int widthSteps[],Size maxSize, separableWavelet* w,int level):
00122 i_data(i_data),i_widthStep(i_widthStep),o_data(subbands),widthSteps(widthSteps),maxSize(maxSize),w(w),level(level){
00123 H_buffer = NULL;
00124 L_buffer = NULL;
00125 LL_buffer = NULL;
00126 LH_buffer = NULL;
00127 HL_buffer = NULL;
00128 HH_buffer = NULL;
00129 maxWidthHalf = 0;
00130 maxHeightHalf = 0;
00131 }
00143 bodySegDTWT2D(bodySegDTWT2D& s,tbb::split):
00144 i_data(s.i_data),i_widthStep(s.i_widthStep),o_data(s.o_data),widthSteps(s.widthSteps),maxSize(s.maxSize),w(s.w),level(s.level){
00145
00146 H_buffer = NULL;
00147 L_buffer = NULL;
00148 LL_buffer = NULL;
00149 LH_buffer = NULL;
00150 HL_buffer = NULL;
00151 HH_buffer = NULL;
00152 maxWidthHalf = 0;
00153 maxHeightHalf = 0;
00154 }
00165 bodySegDTWT2D(const bodySegDTWT2D& s):
00166 i_data(s.i_data),i_widthStep(s.i_widthStep),o_data(s.o_data),widthSteps(s.widthSteps),maxSize(s.maxSize),w(s.w),level(s.level){
00167 H_buffer = NULL;
00168 L_buffer = NULL;
00169 LL_buffer = NULL;
00170 LH_buffer = NULL;
00171 HL_buffer = NULL;
00172 HH_buffer = NULL;
00173 maxWidthHalf = 0;
00174 maxHeightHalf = 0;
00175 }
00176
00185 ~bodySegDTWT2D();
00186
00194 void join(const bodySegDTWT2D& s){}
00195 };
00196
00197 #endif