From bbb7a9df62685dc80edc2ddf3074e9321cd479bf Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 1 May 2020 16:25:05 +0200 Subject: [PATCH] #3418 creaMaracasVisu Feature New Normal - ManualPaint_model with openmp --- .../bbcreaMaracasVisuManualPaint_Model.cxx | 123 +++++++++--- .../widgets/manualPaint/FillFilter.cpp | 190 ++++++++++++++---- .../widgets/manualPaint/FillFilter.h | 43 ++-- .../widgets/manualPaint/ManualPaintModel.cpp | 23 ++- .../widgets/manualPaint/ManualPaintModel.h | 2 + 5 files changed, 297 insertions(+), 84 deletions(-) diff --git a/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx b/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx index aabc509..19945fb 100644 --- a/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx +++ b/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx @@ -19,6 +19,15 @@ BBTK_BLACK_BOX_IMPLEMENTATION(ManualPaint_Model,bbtk::AtomicBlackBox); //-- Alternativa con openmp -- void ManualPaint_Model::LstPointOMPAnalice() { + +printf("EED ManualPaint_Model::LstPointOMPAnalice\n" ); +printf("EED FillFilter::Run ojo toca limpiar bien el codigo _px px ...... \n"); +printf("EED FillFilter::Run ojo toca limpiar bien el codigo _px px ...... \n"); +printf("EED FillFilter::Run ojo toca limpiar bien el codigo _px px ...... \n"); +printf("EED FillFilter::Run ojo toca limpiar bien el codigo _px px ...... \n"); + + +printf("EED ManualPaint_Model::LstPointOMPAnalice Start \n"); //-- Alternativa con openmp -- // A. Create copie of index original list => lst1 // B. if list1 es not empty do.. @@ -85,16 +94,16 @@ printf("EED ManualPaint_Model::LstPointOMPAnalice (with openmp) size=%d\n",size #pragma omp parallel for for (i2=0;i2PaintImage( bbGetInputByLstPointsX()[ lst2[i2] ] , bbGetInputByLstPointsY()[ lst2[i2] ] , bbGetInputByLstPointsZ()[ lst2[i2] ] ); @@ -115,13 +124,14 @@ if ( (k1omp==i2) || (k2omp==i2) || (k3omp==i2) || } // for i2 } // while +printf("EED ManualPaint_Model::LstPointOMPAnalice End\n"); } void ManualPaint_Model::Process() { - +printf("EED ManualPaint_Model::Process Start\n"); /* Notas 0. Quitar comentarion ByLstPoints openmp 1. Falta openmp ByImagePoints @@ -135,12 +145,16 @@ void ManualPaint_Model::Process() */ if (bbGetInputActive()==true) { +printf("EED ManualPaint_Model::Process 1\n"); if (bbGetInputImage()!=NULL) { +printf("EED ManualPaint_Model::Process 2\n"); manualpaintmodel->SetActive( bbGetInputActive() ); manualpaintmodel->SetTool( bbGetInputTool() ); manualpaintmodel->Set2D3D( bbGetInput2D3D() ); +printf("EED ManualPaint_Model::Process 2.1\n"); manualpaintmodel->SetImages( bbGetInputImage(),bbGetInputImage2() ); +printf("EED ManualPaint_Model::Process 2.2\n"); manualpaintmodel->SetGrayLevel( bbGetInputGrayLevel() ); manualpaintmodel->SetDirection( bbGetInputDirection() ); manualpaintmodel->SetBrushSize( bbGetInputBrushSize() ); @@ -151,24 +165,46 @@ void ManualPaint_Model::Process() manualpaintmodel->SetRangeMax( bbGetInputRange()[1] ); if (bbGetInputPoint().size()==3) { +printf("EED ManualPaint_Model::Process 3\n"); manualpaintmodel->PaintImage( bbGetInputPoint()[0] , bbGetInputPoint()[1] , bbGetInputPoint()[2] ); manualpaintmodel->SetUndoImage(); } // if Points if ( bbGetInputByLstPointsX().size()!=0 ) { +printf("EED ManualPaint_Model::Process 4\n"); //-- Alternativa con openmp -- - LstPointOMPAnalice(); +// LstPointOMPAnalice(); - /* -- Original ByLstPoints sin openmp -- +// /* -- Original ByLstPoints sin openmp -- int i,size = bbGetInputByLstPointsX().size(); +long int k1omp=(double)(size-1)*0.0; +long int k2omp=(double)(size-1)*0.2; +long int k3omp=(double)(size-1)*0.4; +long int k4omp=(double)(size-1)*0.6; +long int k5omp=(double)(size-1)*0.8; +long int k6omp=(double)(size-1)*1.0; +printf("EED ManualPaint_Model::Process list of points (with openmp) size=%d\n",size); +#pragma omp parallel for for (i=0;iPaintImage( bbGetInputByLstPointsX()[i] , bbGetInputByLstPointsY()[i] , bbGetInputByLstPointsZ()[i] ); //_manualPaintModel->SetUndoImage(); // Probably needed. Here is ok. } // for - -- Original ByLstPoints sin openmp --*/ +// -- Original ByLstPoints sin openmp --*/ + + manualpaintmodel->Copy_GeneralAuxFill_to_Results(); }// if ByLstPointsX if ((bbGetInputByImagePoints()!=NULL) && (bbGetInputImage2()!=NULL) ) @@ -194,14 +230,52 @@ void ManualPaint_Model::Process() int dimZ=ext[5]-ext[4]+1; DEF_POINTER_IMAGE_VTK_CREA(vBIP,sSBIP,pBIP,sTBIP,bbGetInputByImagePoints()); DEF_POINTER_IMAGE_VTK_CREA(vI2,sSI2,pI2,sTI2,bbGetInputImage2()); + + long int index, size=dimX*dimY*dimZ; + +long int k1omp=(double)(size-1)*0.0; +long int k2omp=(double)(size-1)*0.2; +long int k3omp=(double)(size-1)*0.4; +long int k4omp=(double)(size-1)*0.6; +long int k5omp=(double)(size-1)*0.8; +long int k6omp=(double)(size-1)*1.0; +printf("EED ManualPaint_Model::Process ByImagePoints (with openmp) size=%d\n",size); +#pragma omp parallel for + for (index=0; index0) + { + double value2; + GETVALUE2_VTK_CREA(value2,pI2,sTI2,index) + if (value2==0) + { + int i = index % dimX; + int j = (index % (dimX*dimY)) / dimX; + int k = index / (dimX*dimY); + manualpaintmodel->PaintImage(i,j,k); +// manualpaintmodel->SetUndoImage(); // Probably needed. Here is ok. + } // vI2 + } // vBIP + } // for index + manualpaintmodel->Copy_GeneralAuxFill_to_Results(); + +/* int i,j,k; //#pragma omp parallel for for (k=0;k point; - point.push_back(0); - point.push_back(0); - point.push_back(0); - bbSetInputPoint(point); +// point.push_back(0); +// point.push_back(0); +// point.push_back(0); +// bbSetInputPoint(point); std::vector range; range.push_back(0); range.push_back(200); diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp index e76dc6c..fb8d867 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp @@ -32,8 +32,8 @@ FillFilter::FillFilter() { - _tolerancefill = 125; - + _tolerancefill = 125; + _GeneralAuxImageFill = NULL; //EED 2020-04-28 BORRAME Change to local variables to use with openmp // _auxImageFill = NULL; // _maxXback = 0; @@ -85,34 +85,47 @@ void FillFilter::SetImages(vtkImageData *image,vtkImageData *image2) // virtual _maxZback = _maxZ; */ + if (_GeneralAuxImageFill != NULL) + { + _GeneralAuxImageFill->Delete(); + } + _GeneralAuxImageFill = vtkImageData::New(); + _GeneralAuxImageFill->SetDimensions(_dimX,_dimY,_dimZ ); + _GeneralAuxImageFill->SetOrigin(0, 0, 0); + _GeneralAuxImageFill->SetExtent(0, _dimX-1, 0, _dimY-1, 0, _dimZ-1); + _GeneralAuxImageFill->AllocateScalars(VTK_UNSIGNED_CHAR,1); + unsigned char *ptrAuxImageFill = (unsigned char*)_GeneralAuxImageFill->GetScalarPointer(); + memset(ptrAuxImageFill, 0, _dimX*_dimY*_dimZ*sizeof(unsigned char) ); } - - - //--------------------------------------------------------------------------- -void FillFilter::Run() // virtual +void FillFilter::Run(int px, int py, int pz) // virtual { long int ivi; if ((_px >= _minX) && (_px < _dimX) && (_py >= _minY) && (_py < _dimY) && (_pz >= _minZ) && (_pz < _dimZ)) { this->_IMManager->BaseInitialPoint(_px, _py ,_pz); - FillToolLoop(_px, _py, _pz); - } //if _minX _maxX _minY _maxY _minZ _maxZ +// FillToolLoop(_px, _py, _pz); + FillToolLoop(px, py, pz); + + + + } //if _minX _maxX _minY _maxY _minZ _maxZ } //--------------------------------------------------------------------------- -vtkImageData* FillFilter::GenerateAuxImageFill( long int &OneColumnAux, long int &OneLineAux , long int &OnePlaneAux, - int px,int py,int pz, - int &pxAux, int &pyAux, int &pzAux ) +vtkImageData* FillFilter::CreateAuxImageFill( long int &OneColumnAux, long int &OneLineAux , long int &OnePlaneAux, + int px, int py, int pz, + int &pxAux, int &pyAux, int &pzAux, + int &minXAux, int &minYAux, int &minZAux ) { // _2D3D = 1 3D - int minXAux = px-_distancefill; if (minXAux>=0) { pxAux=px-minXAux; } else { pxAux=px; minXAux=0; } - int minYAux = py-_distancefill; if (minYAux>=0) { pyAux=py-minYAux; } else { pyAux=py; minYAux=0; } - int minZAux = pz-_distancefill; if (minZAux>=0) { pzAux=pz-minZAux; } else { pzAux=pz; minZAux=0; } + minXAux = px-_distancefill; if (minXAux>=0) { pxAux=px-minXAux; } else { pxAux=px; minXAux=0; } + minYAux = py-_distancefill; if (minYAux>=0) { pyAux=py-minYAux; } else { pyAux=py; minYAux=0; } + minZAux = pz-_distancefill; if (minZAux>=0) { pzAux=pz-minZAux; } else { pzAux=pz; minZAux=0; } int maxXAux = px+_distancefill; if (maxXAux>_dimX) { maxXAux=_dimX; } int maxYAux = py+_distancefill; if (maxYAux>_dimY) { maxYAux=_dimY; } @@ -148,19 +161,96 @@ vtkImageData* FillFilter::GenerateAuxImageFill( long int &OneColumnAux, long int auxImageFill = vtkImageData::New(); auxImageFill->SetDimensions(auxDimX, auxDimY, auxDimZ); auxImageFill->SetOrigin(0, 0, 0); - auxImageFill->SetExtent(0, auxDimX, 0, auxDimY, 0, auxDimZ); + auxImageFill->SetExtent(0, auxDimX-1, 0, auxDimY-1, 0, auxDimZ-1); auxImageFill->AllocateScalars(VTK_UNSIGNED_CHAR,1); unsigned char * ptrAuxImageFill = (unsigned char *)auxImageFill->GetScalarPointer(); memset( ptrAuxImageFill, 0, auxDimX*auxDimY*auxDimZ ); return auxImageFill; } +void FillFilter::Copy_AuxImageFill_To_GeneralAuxFill(int minXAux, int minYAux, int minZAux, vtkImageData *auxImageFill) +{ + // copy information from the litle image auxImageFill to the big image _GeneralAuxImageFill + DEF_POINTER_IMAGE_VTK_CREA(vAuxImageFill,ssAuxImageFill,pAuxImageFill,stAuxImageFill,auxImageFill) + DEF_POINTER_IMAGE_VTK_CREA(v_GeneralAuxImageFill,ss_GeneralAuxImageFill,p_GeneralAuxImageFill,st_GeneralAuxImageFill,_GeneralAuxImageFill) + int ext[6]; + auxImageFill->GetExtent(ext); + int auxDimX = ext[1]-ext[0]+1; + int auxDimY = ext[3]-ext[2]+1; + int auxDimZ = ext[5]-ext[4]+1; + int i,j,k; + long int indexAux=0; + long int indexGeneralAux; + for (k=0;k lstX; std::vector lstY; @@ -171,22 +261,32 @@ void FillFilter::FillToolLoop(int px, int py, int pz) std::vector lstivi; lstivi.push_back( px + py*_OneLine+ pz*_OnePlane ); - long int OneColumnAux, OneLineAux, OnePlaneAux; - int pxAux, pyAux, pzAux; - vtkImageData* auxImageFill = GenerateAuxImageFill( OneColumnAux,OneLineAux,OnePlaneAux, + long int OneColumnAux, OneLineAux, OnePlaneAux; // how to jump in the little image auxImageFill + int pxAux, pyAux, pzAux; // position inside little image auxImageFill + int minXAux, minYAux, minZAux; // Where start the little image auxImageFill in the big image + vtkImageData* auxImageFill = CreateAuxImageFill( OneColumnAux,OneLineAux,OnePlaneAux, px,py,pz, - pxAux,pyAux,pzAux ); + pxAux,pyAux,pzAux, + minXAux,minYAux,minZAux ); std::vector lstiviAux; lstiviAux.push_back( pxAux + pyAux*OneLineAux + pzAux*OnePlaneAux ); + DEF_POINTER_IMAGE_VTK_CREA(v_image,ss_image,p_image,st_image,_image) +// DEF_POINTER_IMAGE_VTK_CREA_set(v_image,ss_image,p_image,st_image,_image) + + double v_image2; + int ss_image2; + char *p_image2; + int st_image2; + - DEF_POINTER_IMAGE_VTK_CREA_set(v_image,ss_image,p_image,st_image,_image) if (_image2!=NULL) { +// DEF_POINTER_IMAGE_VTK_CREA(v_image2,ss_image2,p_image2,st_image2,_image2) DEF_POINTER_IMAGE_VTK_CREA_set(v_image2,ss_image2,p_image2,st_image2,_image2) } // if _image2 - GETVALUE2_VTK_CREA(_graylevelbasefill,p_image,st_image,lstivi[0]) + GETVALUE2_VTK_CREA(graylevelbasefill,p_image,st_image,lstivi[0]) //EED 2020-04-28 BORRAME Change to local variables to use with openmp // DEF_POINTER_IMAGE_VTK_CREA(v_auxImageFill,ss_auxImageFill,p_auxImageFill,st_auxImageFill,_auxImageFill) @@ -202,7 +302,7 @@ void FillFilter::FillToolLoop(int px, int py, int pz) difZ = pz-lstZ[0]; _tmpDistfill = difX*difX + difY*difY + difZ*difZ; // if distance of center point - if (_tmpDistfill<=_distbasefill) + if (_tmpDistfill<=distbasefill) { // if point not visited GETVALUE2_VTK_CREA(vAuxImageFill,pAuxImageFill,stAuxImageFill,lstiviAux[0] ); @@ -211,20 +311,20 @@ void FillFilter::FillToolLoop(int px, int py, int pz) // If Gray Level valid //EED01 - // _tmpiglfill = _image->GetScalarComponentAsDouble(px, py, pz, 0); - GETVALUE2_VTK_CREA(_tmpiglfill,p_image,st_image,lstivi[0]) + // tmpiglfill = _image->GetScalarComponentAsDouble(px, py, pz, 0); + GETVALUE2_VTK_CREA(tmpiglfill,p_image,st_image,lstivi[0]) if (_image2!=NULL) { //EED01 - // _tmpiglfill2 = _image2->GetScalarComponentAsDouble(px, py, pz, 0); - GETVALUE2_VTK_CREA(_tmpiglfill2,p_image2,st_image2,lstivi[0]) + // tmpiglfill2 = _image2->GetScalarComponentAsDouble(px, py, pz, 0); + GETVALUE2_VTK_CREA(tmpiglfill2,p_image2,st_image2,lstivi[0]) } else { - _tmpiglfill2 = _tmpiglfill; + tmpiglfill2 = tmpiglfill; } - float grayLBFMTOL = _graylevelbasefill - _tolerancefill; - float grayLBFPTOL = _graylevelbasefill + _tolerancefill; + float grayLBFMTOL = graylevelbasefill - _tolerancefill; + float grayLBFPTOL = graylevelbasefill + _tolerancefill; bool isInRange = false; //DFCH if (_RangeMin <= grayLBFMTOL && _RangeMax >= grayLBFPTOL) { @@ -238,7 +338,7 @@ void FillFilter::FillToolLoop(int px, int py, int pz) grayLBFPTOL = _RangeMax; isInRange = true; } //fi esle - else if ((_RangeMin <= _graylevelbasefill) && (_graylevelbasefill <= _RangeMax)) { + else if ((_RangeMin <= graylevelbasefill) && (graylevelbasefill <= _RangeMax)) { grayLBFMTOL = _RangeMin; grayLBFPTOL = _RangeMax; isInRange = true; @@ -246,18 +346,19 @@ void FillFilter::FillToolLoop(int px, int py, int pz) if (isInRange) { - _auxGrayLevelValidationFill = (_tmpiglfill != _graylevel) && - (_tmpiglfill2 != _graylevel) && - (_tmpiglfill >= grayLBFMTOL) && - (_tmpiglfill <= grayLBFPTOL) && - (_tmpDistfill <= _distbasefill) ; //DFCH + auxGrayLevelValidationFill = (tmpiglfill != _graylevel) && + (tmpiglfill2 != _graylevel) && + (tmpiglfill >= grayLBFMTOL) && + (tmpiglfill <= grayLBFPTOL) && + (_tmpDistfill <= distbasefill) ; //DFCH } else { - _auxGrayLevelValidationFill = false; + auxGrayLevelValidationFill = false; } // if isInRange - if (_auxGrayLevelValidationFill==true) + if (auxGrayLevelValidationFill==true) { this->_IMManager->AddModifiedPixel(lstX[0], lstY[0], lstZ[0]); //DFCH +/* // Modifie image if (_image2!=NULL) { @@ -268,10 +369,12 @@ void FillFilter::FillToolLoop(int px, int py, int pz) SETVALUE2_VTK_CREA(_graylevel,p_image,st_image,lstivi[0]) } // if _image2 +*/ + // Add point to already visited + SETVALUE2_VTK_CREA(1,pAuxImageFill,stAuxImageFill,lstiviAux[0]); + // Add neighborhood points in the list - // Add point to already visited - SETVALUE2_VTK_CREA(1,pAuxImageFill,stAuxImageFill,lstiviAux[0]); if (_2D3D == 0) //2D { @@ -310,9 +413,9 @@ lstX.push_back(lstX[0]-1); lstY.push_back(lstY[0]); lstZ.push_back(lstZ[0]); lstX.push_back(lstX[0] ); lstY.push_back(lstY[0] ); lstZ.push_back(lstZ[0]+1); lstivi.push_back(lstivi[0]+_OnePlane); lstiviAux.push_back(lstiviAux[0]+OnePlaneAux); lstX.push_back(lstX[0] ); lstY.push_back(lstY[0] ); lstZ.push_back(lstZ[0]-1); lstivi.push_back(lstivi[0]-_OnePlane); lstiviAux.push_back(lstiviAux[0]-OnePlaneAux); } // 2D 3D - } // if gray level valid _auxGrayLevelValidationFill + } // if gray level valid auxGrayLevelValidationFill } // if point not visited - } // if distance of center point + } // if distance of center point } // if point inside image // Remove point from the list lstX.erase( lstX.begin() ); @@ -321,6 +424,9 @@ lstX.push_back(lstX[0]-1); lstY.push_back(lstY[0]); lstZ.push_back(lstZ[0]); lstivi.erase( lstivi.begin() ); lstiviAux.erase( lstiviAux.begin() ); } // while _lstX.size + + Copy_AuxImageFill_To_GeneralAuxFill( minXAux, minYAux, minZAux, auxImageFill ); + auxImageFill->Delete(); } diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h index 0be4fd8..bcf22e9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h @@ -33,48 +33,57 @@ class FillFilter : public baseFilterManualPaint { public: FillFilter(); virtual ~FillFilter(); - void Run(); + void Run(int px, int py, int pz); void FillToolLoop(int px, int py, int pz); void SetToleranceFill(double tolerancefill); void SetDistanceFill(int distancefill); virtual void SetImages(vtkImageData *image,vtkImageData *image2); // vtkImageData* GetAuxImageFill(); +void Copy_GeneralAuxFill_to_Results(); + + private: double _tolerancefill; int _distancefill; - double _graylevelbasefill; - double _distbasefill; - double _tmpiglfill; - double _tmpiglfill2; - bool _auxGrayLevelValidationFill; + +//EED 2020-04-28 BORRAME Change to local variables to use with openmp +// double _distbasefill; +// double _graylevelbasefill; +// double _tmpiglfill; +// double _tmpiglfill2; +// bool _auxGrayLevelValidationFill; //EED 2020-04-28 BORRAME Change to local variables to use with openmp // vtkImageData *_auxImageFill; // int _maxXback; // int _maxYback; // int _maxZback; + vtkImageData *_GeneralAuxImageFill; -vtkImageData* GenerateAuxImageFill( long int &OneColumnAux, long int &OneLineAux , long int &OnePlaneAux, - int px,int py,int pz, - int &pxAux, int &pyAux, int &pzAux ); +vtkImageData* CreateAuxImageFill( long int &OneColumnAux, long int &OneLineAux , long int &OnePlaneAux, + int px, int py, int pz, + int &pxAux, int &pyAux, int &pzAux, + int &minXAux, int &minYAux, int &minZAux ); +void Copy_AuxImageFill_To_GeneralAuxFill(int minXAux, int minYAux, int minZAux, vtkImageData *auxImageFill); protected: + //Change to local variables to use with openmp // DEF_POINTER_IMAGE_VTK_CREA_definition( v_image , ss_image , p_image , st_image ) - double v_image; - int ss_image; - char *p_image; - int st_image; +// double v_image; +// int ss_image; +// char *p_image; +// int st_image; // //macro not working ??? // DEF_POINTER_IMAGE_VTK_CREA_definition(v_image2,ss_image2,p_image2,st_image2) - double v_image2; - int ss_image2; - char *p_image2; - int st_image2; +// double v_image2; +// int ss_image2; +// char *p_image2; +// int st_image2; }; diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.cpp index fd1bc12..c74dfdf 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.cpp @@ -63,7 +63,7 @@ void ManualPaintModel::PaintImage(int px, int py, int pz) if (_tool == 1) { _fillfilter->SetPoint(px, py, pz); - _fillfilter->Run(); + _fillfilter->Run(px,py,pz); } // _tool 1 } // _active } @@ -84,21 +84,28 @@ void ManualPaintModel::Set2D3D(int dim2D3D) //--------------------------------------------------------------------------- void ManualPaintModel::SetImages(vtkImageData *image,vtkImageData *image2) { +printf("EED ManualPaintModel::SetImage Start\n "); if (image!=NULL) { +printf("EED ManualPaintModel::SetImage 1\n "); _brushfilter -> SetImages(image,image2); +printf("EED ManualPaintModel::SetImage 2\n "); _fillfilter -> SetImages(image,image2); +printf("EED ManualPaintModel::SetImage 3\n "); if (image2!=NULL) { _imageUndoRedo->SetImage(image2); +printf("EED ManualPaintModel::SetImage 4\n "); } else { _imageUndoRedo->SetImage(image); +printf("EED ManualPaintModel::SetImage 5\n "); } //EED 2020-04-28 BORRAME Change to local variables to use with openmp // _imageUndoRedo_visited->SetImage( _fillfilter->GetAuxImageFill() ); } else { - printf("EED Warning image=NULL in ManualPaintModel::SetImage(image)\n "); + printf("EED Warning image=NULL in ManualPaintModel::SetImages(image,image2)\n "); } +printf("EED ManualPaintModel::SetImage End\n "); } //--------------------------------------------------------------------------- @@ -209,3 +216,15 @@ int ManualPaintModel::GetRestorBaseInitialPointZ() return this->_imageUndoRedo->GetRestorBaseInitialPointZ(); } +void ManualPaintModel::Copy_GeneralAuxFill_to_Results() +{ + if (_tool == 0) + { + // + } // if 0 + if (_tool == 1) // fillfilter + { + this->_fillfilter->Copy_GeneralAuxFill_to_Results(); + } // if 1 +} + diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.h index a99749a..aeebad7 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.h @@ -58,6 +58,8 @@ public: int GetRestorBaseInitialPointY(); int GetRestorBaseInitialPointZ(); + void Copy_GeneralAuxFill_to_Results(); + private: int _tool; bool _active; -- 2.47.1