-// int ia,ja,ka;
-// int ii,jj,kk;
- int ext[6];
-//EED 2017-01-01 Migration VTK7
-#if VTK_MAJOR_VERSION <= 5
- bbGetInputByImagePoints()->GetWholeExtent(ext);
-#else
- bbGetInputByImagePoints()->GetExtent(ext);
-#endif
- int dimX=ext[1]-ext[0]+1;
- int dimY=ext[3]-ext[2]+1;
- 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());
-//#pragma omp parallel for
- int i,j,k;
- for (k=0;k<dimZ;k++)
+ if ( (k1omp==i2) || (k2omp==i2) || (k3omp==i2) ||
+ (k4omp==i2) || (k5omp==i2) || (k6omp==i2) )
+ {
+ if (size2==1)
+ {
+ printf(" 100% (just one element)\n");
+ } else {
+ printf(" %d% \n", (int)(((double)i2/(double)(size2-1))*100 ));
+ }
+ }// if K#omp
+ manualpaintmodel->PaintImage( bbGetInputByLstPointsX()[ lst2[i2] ] ,
+ bbGetInputByLstPointsY()[ lst2[i2] ] ,
+ bbGetInputByLstPointsZ()[ lst2[i2] ] );
+ } // for i2
+
+// B.4. Quitar los elementos de lst2 en lst1 y recomenzar desde el punto B;
+ for (i2=0;i2<size2;i2++)
+ {
+ size1=lst1.size();
+ for (i1=0;i1<size1;i1++)
+ {
+ if (lst2[i2]==lst1[i1])
+ {
+ lst1.erase( lst1.begin()+i1 );
+ i1=size1;
+ } // if
+ } // for i1
+ } // for i2
+
+ } // while
+printf("EED ManualPaint_Model::LstPointOMPAnalice End\n");
+
+}
+
+
+void ManualPaint_Model::Process()
+{
+/* Notas
+0. Quitar comentarion ByLstPoints openmp
+1. Falta openmp ByImagePoints
+2. Desligar cada PaintImage de la mascara
+ -pequeno bloque de memoria para cada PaintImage
+ -el resultado volverlo a colocar en la image2 original
+ -Si no existe image2 original y hay que colocarlo en la imagen de origien
+ hay que crear una imagen2 temporal y luego bajar la imagen
+3. Verificar el mecanismo de undo con ByLstPoints
+4. Verificar el mecanismo de undo con ByImagePoints
+*/
+ if (bbGetInputActive()==true)
+ {
+ if (bbGetInputImage()!=NULL)
+ {
+ manualpaintmodel->SetActive( bbGetInputActive() );
+ manualpaintmodel->SetTool( bbGetInputTool() );
+ manualpaintmodel->Set2D3D( bbGetInput2D3D() );
+ manualpaintmodel->SetImages( bbGetInputImage(),bbGetInputImage2() );
+ manualpaintmodel->SetGrayLevel( bbGetInputGrayLevel() );
+ manualpaintmodel->SetDirection( bbGetInputDirection() );
+ manualpaintmodel->SetBrushSize( bbGetInputBrushSize() );
+ manualpaintmodel->SetBrushForm( bbGetInputBrushForm() );
+ manualpaintmodel->SetToleranceFill( bbGetInputToleranceFill() );
+ manualpaintmodel->SetDistanceFill( bbGetInputDistanceFill() );
+ manualpaintmodel->SetRangeMin( bbGetInputRange()[0] );
+ manualpaintmodel->SetRangeMax( bbGetInputRange()[1] );
+ if (bbGetInputPoint().size()==3)
+ {
+ manualpaintmodel->PaintImage( bbGetInputPoint()[0] , bbGetInputPoint()[1] , bbGetInputPoint()[2] );
+ manualpaintmodel->SetUndoImage();
+ manualpaintmodel->Copy_GeneralAuxFill_to_Results();
+ } // if Points
+ if ( bbGetInputByLstPointsX().size()!=0 )