From: Eduardo DAVILA Date: Thu, 2 May 2019 14:20:42 +0000 (+0200) Subject: #3253 creaMaracasVisu Bug New Normal - manual paint refresh X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f6b647d5bd4c238c85deb7a07950ebe8f296d49d;p=creaMaracasVisu.git #3253 creaMaracasVisu Bug New Normal - manual paint refresh --- diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/BrushFilter.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/BrushFilter.cpp index 7a8b873..f792652 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/BrushFilter.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/BrushFilter.cpp @@ -126,8 +126,7 @@ void BrushFilter::Run() // virtual { pixelModify=false; scalarComponent = _image->GetScalarComponentAsFloat(i,j, k, 0); - if ((_RangeMin <= scalarComponent) - && (scalarComponent <= _RangeMax )) + if ((_RangeMin <= scalarComponent) && (scalarComponent <= _RangeMax )) { if (_brushform == 0) { diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp index 07f1544..1e2c470 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp @@ -96,7 +96,15 @@ void FillFilter::Run() // virtual _countRecursiveFillProblem = 0; _countProgressingFill = 0; _usingAuxImageFill = false; + ivi = _px + _py*(_maxX+1) + _pz*(_maxX+1)*(_maxY+1); // index vector image + + +DEF_POINTER_IMAGE_VTK_CREA_set(v_image,ss_image,p_image,st_image,_image) +DEF_POINTER_IMAGE_VTK_CREA_set(v_image2,ss_image2,p_image2,st_image2,_image2) + + + //EED01 // FillToolRecursive(_px, _py, _pz); FillToolRecursive(_px, _py, _pz, ivi); @@ -133,8 +141,8 @@ void FillFilter::Run() // virtual //--------------------------------------------------------------------------- void FillFilter::FillToolRecursive(int px, int py, int pz,long int ivi) { -DEF_POINTER_IMAGE_VTK_CREA(v_image,ss_image,p_image,st_image,_image) -DEF_POINTER_IMAGE_VTK_CREA(v_image2,ss_image2,p_image2,st_image2,_image2) +//ups ??EED DEF_POINTER_IMAGE_VTK_CREA(v_image,ss_image,p_image,st_image,_image) +//ups ??EED DEF_POINTER_IMAGE_VTK_CREA(v_image2,ss_image2,p_image2,st_image2,_image2) _countRecursiveFill++; _countProgressingFill++; @@ -149,14 +157,18 @@ DEF_POINTER_IMAGE_VTK_CREA(v_image2,ss_image2,p_image2,st_image2,_image2) { if (_usingAuxImageFill == true) { - this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH +//UPS ??EED this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH //EED01 // _auxImageFill->SetScalarComponentFromFloat(px, py, pz, 0, 0); _ptrAuxImageFill[ ivi ]=0; } - _tmpDistfill = (px-_pxfill)*(px-_pxfill) - + (py-_pyfill)*(py-_pyfill) - + (pz-_pzfill)*(pz-_pzfill); + difX=px-_pxfill; + difY=py-_pyfill; + difZ=pz-_pzfill; + _tmpDistfill = difX*difX + difY*difY + difZ*difZ; +// _tmpDistfill = (px-_pxfill)*(px-_pxfill) +// + (py-_pyfill)*(py-_pyfill) +// + (pz-_pzfill)*(pz-_pzfill); //if (_countRecursiveFill >1 ) //{ @@ -217,7 +229,7 @@ GETVALUE2_VTK_CREA(_tmpiglfill2,p_image2,st_image2,ivi) if (_auxGrayLevelValidationFill == true) { - this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH +//UPS ??EED this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH if (_image2!=NULL) { //EED01 diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h index 3482b2a..9a3e3b8 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.h @@ -28,6 +28,7 @@ #include "baseFilterManualPaint.h" + class FillFilter : public baseFilterManualPaint { public: FillFilter(); @@ -69,8 +70,29 @@ private: int _maxYback; int _maxZback; + + int difX; + int difY; + int difZ; protected: + +//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 ; + +//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 ; + + + + };