solved merge conflicts for merge from dev into newlocallab
This commit is contained in:
@@ -25,32 +25,8 @@ namespace rtengine
|
||||
class LabImage
|
||||
{
|
||||
private:
|
||||
bool fromImage;
|
||||
void allocLab(int w, int h)
|
||||
{
|
||||
L = new float*[H];
|
||||
a = new float*[H];
|
||||
b = new float*[H];
|
||||
void allocLab(int w, int h);
|
||||
|
||||
data = new float [W * H * 3];
|
||||
float * index = data;
|
||||
|
||||
for (int i = 0; i < H; i++) {
|
||||
L[i] = index + i * W;
|
||||
}
|
||||
|
||||
index += W * H;
|
||||
|
||||
for (int i = 0; i < H; i++) {
|
||||
a[i] = index + i * W;
|
||||
}
|
||||
|
||||
index += W * H;
|
||||
|
||||
for (int i = 0; i < H; i++) {
|
||||
b[i] = index + i * W;
|
||||
}
|
||||
};
|
||||
public:
|
||||
int W, H;
|
||||
float * data;
|
||||
@@ -64,31 +40,9 @@ public:
|
||||
//Copies image data in Img into this instance.
|
||||
void CopyFrom(LabImage *Img);
|
||||
void getPipetteData (float &L, float &a, float &b, int posX, int posY, int squareSize);
|
||||
void deleteLab( )
|
||||
{
|
||||
if (!fromImage) {
|
||||
delete [] L;
|
||||
delete [] a;
|
||||
delete [] b;
|
||||
delete [] data;
|
||||
}
|
||||
}
|
||||
void reallocLab( )
|
||||
{
|
||||
allocLab(W, H);
|
||||
};
|
||||
|
||||
void clear(bool multiThread = false) {
|
||||
#ifdef _OPENMP
|
||||
#pragma omp parallel for if(multiThread)
|
||||
#endif
|
||||
for(int i = 0; i < H; ++i) {
|
||||
for(int j = 0; j < W; ++j) {
|
||||
L[i][j] = a[i][j] = b[i][j] = 0.f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void deleteLab();
|
||||
void reallocLab();
|
||||
void clear(bool multiThread = false);
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user