]> Creatis software - creaMaracasVisu.git/commitdiff
#3332 creaContours Bug New - Manual Paint UnDo ReDo with vtk update (working)
authorEduardo DAVILA <davila@localhost.localdomain>
Mon, 6 Jan 2020 11:08:30 +0000 (12:08 +0100)
committerEduardo DAVILA <davila@localhost.localdomain>
Mon, 6 Jan 2020 11:08:30 +0000 (12:08 +0100)
23 files changed:
bbtk/src/bbcreaMaracasVisuManualPaint.cxx
bbtk/src/bbcreaMaracasVisuSetPosition.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/image3DDequeUR.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/image3DDequeUR.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageDequeUR.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageDequeUR.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageInfoUR.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageModificationManager.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageModificationManager.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageUndoRedo.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/imageUndoRedo.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/imageUndoRedo/managerUR.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/BrushFilter.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintControler.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintControler.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintModel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintPanel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/ManualPaintPanel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/vtkInteractorManualPaint.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/wxManualPaintPanel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/wxManualPaintPanel.h

index d5373bf0cd3b843b3337cffbd9b380dd67744d2a..ea86236f47f39f6ad2f93c6f462e1199b298243b 100644 (file)
@@ -84,43 +84,46 @@ void ManualPaint::Process()
         ManualPaintModel        *mpModel                       = new ManualPaintModel();
         mpModel->SetImages( bbGetInputIn() , bbGetInputIn2() );
 
-        wxManualPaintPanel        *mpPanel                     = (wxManualPaintPanel*)bbGetOutputWidget();
-        mpPanel->SetManualPaintModel(mpModel);
+        wxManualPaintPanel       *mpPanel                      = (wxManualPaintPanel*)bbGetOutputWidget();
 
         if (bbGetInputWxVtkBaseView1()!=NULL)
         {
             ManualPaintControler    *mpControler    = new ManualPaintControler();
             mpControler->SetManualPaintModel(mpModel);
-            mpControler->SetManualPaintPanel(mpPanel);
+//            mpControler->SetManualPaintPanel(mpPanel);
             mpControler->SetWxVtk2DBaseView( (wxVtk2DBaseView*)bbGetInputWxVtkBaseView1() );
             mpControler->Config();
+               mpPanel->SetManualPaintControler(mpControler);
         }
 
         if (bbGetInputWxVtkBaseView2()!=NULL)
         {
             ManualPaintControler    *mpControler    = new ManualPaintControler();
             mpControler->SetManualPaintModel(mpModel);
-            mpControler->SetManualPaintPanel(mpPanel);
+//            mpControler->SetManualPaintPanel(mpPanel);
             mpControler->SetWxVtk2DBaseView( (wxVtk2DBaseView*)bbGetInputWxVtkBaseView2() );
             mpControler->Config();
+               mpPanel->SetManualPaintControler(mpControler);
         }
 
         if (bbGetInputWxVtkBaseView3()!=NULL)
         {
             ManualPaintControler    *mpControler    = new ManualPaintControler();
             mpControler->SetManualPaintModel(mpModel);
-            mpControler->SetManualPaintPanel(mpPanel);
+//            mpControler->SetManualPaintPanel(mpPanel);
             mpControler->SetWxVtk2DBaseView( (wxVtk2DBaseView*)bbGetInputWxVtkBaseView3() );
             mpControler->Config();
+               mpPanel->SetManualPaintControler(mpControler);
         }
 
         if (bbGetInputWxVtkBaseView4()!=NULL)
         {
             ManualPaintControler    *mpControler    = new ManualPaintControler();
             mpControler->SetManualPaintModel(mpModel);
-            mpControler->SetManualPaintPanel(mpPanel);
+//            mpControler->SetManualPaintPanel(mpPanel);
             mpControler->SetWxVtk2DBaseView( (wxVtk2DBaseView*)bbGetInputWxVtkBaseView4() );
             mpControler->Config();
+               mpPanel->SetManualPaintControler(mpControler);
         }
 
     } // firsttime
index d9a57e1c9e203ca4ebb3704981f7c443eb6003c5..1a45b0c63eda11167ab4f8f9a0b8436c717b377f 100644 (file)
@@ -41,15 +41,13 @@ void SetPosition::Process()
                        vtkmprbasedata->SetX( bbGetInputPoint()[0] );
                        vtkmprbasedata->SetY( bbGetInputPoint()[1] );
                        vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
-                       wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refres
+                       wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 //EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 #if wxMAJOR_VERSION <= 2
                        bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
 #else
                        bbGetInputwxVtkBaseView()->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
-#endif 
-                       
-                       
+#endif                         
                } // if bbGetInputPosition
        } // bbGetInputwxVtkBaseView
 }
index cac5bd6507bd95ee5c44149bbddaeee6cf3a9268..ab6b614c5388864116659ba291cf31e1e3f3c7d4 100755 (executable)
 #include "image3DDequeUR.h"
 #include <iostream>
 #include <sstream>
+#include <ctime>
 
 // ----------------------------------------------------------------------------------
 Image3DDequeUR::Image3DDequeUR( )
 {
-
-
 #ifdef _WIN32
        this->m_GlobalPath = std::getenv("TEMP");
 #endif
@@ -51,12 +50,14 @@ Image3DDequeUR::Image3DDequeUR( )
 #endif // MACOSX
        this->m_CurrentURPos = -1;
 }
+
 // ----------------------------------------------------------------------------------
 //virtual
 Image3DDequeUR::~Image3DDequeUR( )
 {
        this->CleanHardDisk( );
 }
+
 // ----------------------------------------------------------------------------------
 //virtual
 void Image3DDequeUR::AddImagesToURContainer( VTKImageDataPointerType imgUndo,
@@ -74,6 +75,7 @@ void Image3DDequeUR::AddImagesToURContainer( VTKImageDataPointerType imgUndo,
        //Managing memory
        this->ManageMemory( );
 }
+
 // ----------------------------------------------------------------------------------
 //virtual
 ImageInfoUR* Image3DDequeUR::Undo( )
@@ -88,6 +90,7 @@ ImageInfoUR* Image3DDequeUR::Undo( )
        } //fi
        return ( imgRet );
 }
+
 // ----------------------------------------------------------------------------------
 //virtual
 ImageInfoUR* Image3DDequeUR::Redo( )
@@ -99,13 +102,12 @@ ImageInfoUR* Image3DDequeUR::Redo( )
                && ( this->m_CurrentURPos < imgURDequeSize ) )
        {
                imgRet = this->m_ImgURDeque[ m_CurrentURPos ];
-       } //fi
-       else
-       {
+       } else {
                this->m_CurrentURPos--;
        }
        return ( imgRet );
 }
+
 // ----------------------------------------------------------------------------------
 //virtual
 void Image3DDequeUR::CleanURContainerFromIndex( const int& index )
@@ -122,39 +124,38 @@ void Image3DDequeUR::CleanURContainerFromIndex( const int& index )
                this->m_ImgURDeque.pop_back( );
        } //rof
 }
+
 // ----------------------------------------------------------------------------------
 //virtual
 void Image3DDequeUR::ManageMemory( )
 {
        int imgURDequeSize = this->m_ImgURDeque.size( );
-       for( int i = 0; i < imgURDequeSize; i++ )
+       int i;
+       for( i = 0; i < imgURDequeSize; i++ )
        {
                if( this->m_ImgURDeque[ i ]->GetStatus( ) )
                {
-                       this->m_ImgURDeque[ i ]->RemoveImagesFromMemory(
-                               this->m_GlobalPath );
-               } //fi
-       } //rof
+                       this->m_ImgURDeque[ i ]->RemoveImagesFromMemory( this->m_GlobalPath );
+               } // if Status
+       } // for i
          //Adding CurrentUndoPos to memory
-       if( ( this->m_CurrentURPos != -1 )
-               && !( this->m_ImgURDeque[ this->m_CurrentURPos ]->GetStatus( ) ) )
+       if( ( this->m_CurrentURPos != -1 ) && !( this->m_ImgURDeque[ this->m_CurrentURPos ]->GetStatus( ) ) )
        {
-               this->m_ImgURDeque[ this->m_CurrentURPos ]->LoadImagesToMemory(
-                       this->m_GlobalPath );
+               this->m_ImgURDeque[ this->m_CurrentURPos ]->LoadImagesToMemory( this->m_GlobalPath );
        }
        int currentRedoPos = this->m_CurrentURPos + 1;
-       if( ( currentRedoPos < imgURDequeSize )
-               && !( this->m_ImgURDeque[ currentRedoPos ]->GetStatus( ) ) )
+       if( ( currentRedoPos < imgURDequeSize ) && !( this->m_ImgURDeque[ currentRedoPos ]->GetStatus( ) ) )
        {
-               this->m_ImgURDeque[ currentRedoPos ]->LoadImagesToMemory(
-                       this->m_GlobalPath );
+               this->m_ImgURDeque[ currentRedoPos ]->LoadImagesToMemory( this->m_GlobalPath );
        }
 }
+
 // ----------------------------------------------------------------------------------
 void Image3DDequeUR::SetGlobalPath( const StringType& globalPath )
 {
        this->m_GlobalPath = globalPath;
 }
+
 // ----------------------------------------------------------------------------------
 void Image3DDequeUR::CleanHardDisk( )
 {
@@ -163,11 +164,13 @@ void Image3DDequeUR::CleanHardDisk( )
                this->m_ImgURDeque[ i ]->RemoveImagesFromDisk( this->m_GlobalPath );
        }
 }
+
 // ----------------------------------------------------------------------------------
 Image3DDequeUR::StringType Image3DDequeUR::GetGlobalPath( )
 {
        return ( this->m_GlobalPath );
 }
+
 // ----------------------------------------------------------------------------------
 Image3DDequeUR::StringType Image3DDequeUR::GetImageName( const int & pos )
 {
@@ -189,4 +192,5 @@ Image3DDequeUR::StringType Image3DDequeUR::GetImageName( const int & pos )
        StringType imageName = this->m_IDImages + ss.str( );
        return ( imageName );
 }
+
 // ----------------------------------------------------------------------------------
index ddebb564e07a0f7a0ba5502f1be6ce22f8d6de6d..b013172a2c38998a4b200496d35f1c2641aab311 100755 (executable)
 #ifndef IMAGE3DDEQUEUR_H_
 #define IMAGE3DDEQUEUR_H_
 
+#include <deque>
+
 #include "imageDequeUR.h"
-#include <ctime>
+
+
 
 /*! @class Image3DDequeUR image3DDequeUR.h "image3DDequeUR.cxx"
  *     @brief This class contains the management of the undo/redo deque - Concrete Class
@@ -121,10 +124,10 @@ public:
        void CleanHardDisk();
        // ----------------------------------------------------------------------------------
 protected:
-       ImageInfoDeque m_ImgURDeque; //!<This is the container of the images for undo and redo.
-       int m_CurrentURPos; //!<This is the index where is located the undo and redo state.
-       StringType m_GlobalPath; //!<This is the string with the global path.
-       StringType m_IDImages; //!<This is the string with the ID of the images (For the filenames).
+       ImageInfoDeque  m_ImgURDeque;   //!<This is the container of the images for undo and redo.
+       int                     m_CurrentURPos; //!<This is the index where is located the undo and redo state.
+       StringType              m_GlobalPath;   //!<This is the string with the global path.
+       StringType              m_IDImages;     //!<This is the string with the ID of the images (For the filenames).
 };
 
 #endif /* IMAGE3DDEQUEUR_H_ */
index 7500cf4677716223b2b0f54b1c8505616926ca8c..433231017958fcd09417157acea330d2665dcd46 100755 (executable)
 #include "imageDequeUR.h"
 
 // ----------------------------------------------------------------------------------
-ImageDequeUR::ImageDequeUR() {
-
+ImageDequeUR::ImageDequeUR() 
+{
 }
-// ----------------------------------------------------------------------------------
-ImageDequeUR::~ImageDequeUR() {
 
-}
 // ----------------------------------------------------------------------------------
-void ImageDequeUR::AddImagesToURContainer(VTKImageDataPointerType imgUndo,
-               VTKImageDataPointerType imgRedo, ImageMManager* imMManager) {
+ImageDequeUR::~ImageDequeUR() 
+{
 }
-// ----------------------------------------------------------------------------------
-void ImageDequeUR::CleanURContainerFromIndex(const int& index) {
 
+// ----------------------------------------------------------------------------------
+void ImageDequeUR::AddImagesToURContainer(     VTKImageDataPointerType imgUndo, 
+                                                                                       VTKImageDataPointerType imgRedo, 
+                                                                                       ImageMManager* imMManager) 
+{
 }
+
 // ----------------------------------------------------------------------------------
-void ImageDequeUR::ManageMemory() {
+void ImageDequeUR::CleanURContainerFromIndex(const int& index) 
+{
+}
 
+// ----------------------------------------------------------------------------------
+void ImageDequeUR::ManageMemory() 
+{
 }
+
 // ----------------------------------------------------------------------------------
-ImageInfoUR* ImageDequeUR::Undo() {
+ImageInfoUR* ImageDequeUR::Undo() 
+{
        return NULL;
 }
+
 // ----------------------------------------------------------------------------------
-ImageInfoUR* ImageDequeUR::Redo() {
+ImageInfoUR* ImageDequeUR::Redo() 
+{
        return NULL;
 }
+
 // ----------------------------------------------------------------------------------
index 679316c99c3e74f9551be7f542c3ddaedba00880..121b37f01364c496eea46597210128ecf221b607 100755 (executable)
 #ifndef IMAGEDEQUE_H_
 #define IMAGEDEQUE_H_
 
-#include <iostream>
-#include <string>
-#include <deque>
-#include <vtkImageData.h>
-#include <vtkSmartPointer.h>
 #include "imageInfoUR.h"
-#include "imageModificationManager.h"
+
+//#include <iostream>
+//#include <string>
+//#include <vtkImageData.h>
+//#include <vtkSmartPointer.h>
+//#include "imageModificationManager.h"
 
 /*! @class ImageDequeUR imageDequeUR.h "imageDequeUR.cxx"
  *     @brief This class contains the management of the undo/redo - Abstract Class
index fd668577e9ced6496832e80f23bc2e5e1f2738af..ca2f43544bb6ae10259b9e2c5b7b339feadd33c7 100755 (executable)
 // ----------------------------------------------------------------------------------
 ImageInfoUR::ImageInfoUR() 
 {
-       this->m_OnMemory = false;
-       this->m_OnDisk = false;
+       this->m_OnMemory        = false;
+       this->m_OnDisk          = false;
 }
+
 // ----------------------------------------------------------------------------------
 ImageInfoUR::~ImageInfoUR() 
 {
 }
+
 // ----------------------------------------------------------------------------------
 void ImageInfoUR::SetImageName(const StringType &imgName) 
 {
-       this->m_ImageName = imgName;
+       this->m_ImageName               = imgName;
 }
+
 // ----------------------------------------------------------------------------------
 void ImageInfoUR::SetImageMManager(ImageMManagerType* imMManager) 
 {
-       this->m_ImageMManager = imMManager;
+       this->m_ImageMManager   = imMManager;
 }
+
 // ----------------------------------------------------------------------------------
 void ImageInfoUR::SetStatus(const bool& onMemory) 
 {
-       this->m_OnMemory = onMemory;
+       this->m_OnMemory                = onMemory;
 }
+
 // ----------------------------------------------------------------------------------
 ImageInfoUR::StringType ImageInfoUR::GetImageName() 
 {
        return (this->m_ImageName);
 }
+
 // ----------------------------------------------------------------------------------
 ImageInfoUR::VTKImageDataPointerType ImageInfoUR::GetUndoImage() 
 {
        return (this->m_UndoImage);
 }
+
 // ----------------------------------------------------------------------------------
 ImageInfoUR::VTKImageDataPointerType ImageInfoUR::GetRedoImage() 
 {
        return (this->m_RedoImage);
 }
+
 // ----------------------------------------------------------------------------------
 ImageInfoUR::ImageMManagerType* ImageInfoUR::GetImageMManager() 
 {
        return (this->m_ImageMManager);
 }
+
 // ----------------------------------------------------------------------------------
 bool ImageInfoUR::GetStatus() 
 {
        return (this->m_OnMemory);
 }
+
 // ----------------------------------------------------------------------------------
 void ImageInfoUR::SetImages(VTKImageDataPointerType imgUndo, VTKImageDataPointerType imgRedo) 
 {
@@ -90,9 +100,11 @@ void ImageInfoUR::SetImages(VTKImageDataPointerType imgUndo, VTKImageDataPointer
        this->m_RedoImage = imgRedo;
        this->SetStatus(true);
 }
+
 // ----------------------------------------------------------------------------------
 void ImageInfoUR::LoadImagesToMemory(const StringType& gPath) 
 {
+printf("EED ImageInfoUR::LoadImagesToMemory Start\n");
        //setting paths
        StringType filename = gPath + this->m_ImageName;
        StringType undoImagePath = filename + "_Undo.mhd";
@@ -100,12 +112,19 @@ void ImageInfoUR::LoadImagesToMemory(const StringType& gPath)
        //Loading Undo Image
        VTKMetaImageReaderPointerType readerUndo = VTKMetaImageReaderPointerType::New();
        readerUndo->SetFileName(undoImagePath.c_str());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       // ..
+#else
+       readerUndo->Update();
+#endif
+
        this->m_UndoImage = readerUndo->GetOutput();
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
        this->m_UndoImage->Update();
 #else
-       // ..
+       this->m_UndoImage->Modified();
 #endif
        //Loading Redo Image
        VTKMetaImageReaderPointerType readerRedo = VTKMetaImageReaderPointerType::New();
@@ -122,11 +141,15 @@ void ImageInfoUR::LoadImagesToMemory(const StringType& gPath)
 #if VTK_MAJOR_VERSION <= 5
        this->m_RedoImage->Update();
 #else
-       // ...
+       this->m_RedoImage->Modified();
 #endif
        //Updating status
        this->m_OnMemory = true;
+
+printf("EED ImageInfoUR::LoadImagesToMemory End\n");
+
 }
+
 // ----------------------------------------------------------------------------------
 void ImageInfoUR::RemoveImagesFromMemory(const StringType& gPath) 
 {
@@ -138,22 +161,24 @@ void ImageInfoUR::RemoveImagesFromMemory(const StringType& gPath)
        this->m_RedoImage = NULL;
        this->SetStatus(false);
 }
+
 // ----------------------------------------------------------------------------------
 void ImageInfoUR::SaveImagesOnDisk(const StringType& gPath) 
 {
        printf("EED ImageInfoUR::SaveImagesOnDisk Start  \n");
-       this->m_OnDisk = true;
-       StringType filename = gPath + this->m_ImageName;
-       StringType undoImagePath = filename + "_Undo.mhd";
-       StringType redoImagePath = filename + "_Redo.mhd";
+       this->m_OnDisk                          = true;
+       StringType filename             = gPath + this->m_ImageName;
+       StringType undoImagePath        = filename + "_Undo.mhd";
+       StringType redoImagePath        = filename + "_Redo.mhd";
        this->SaveImageAsMHD(undoImagePath, this->m_UndoImage);
        this->SaveImageAsMHD(redoImagePath, this->m_RedoImage);
        printf("EED ImageInfoUR::SaveImagesOnDisk %s \n", undoImagePath.c_str() );
 }
+
 // ----------------------------------------------------------------------------------
 void ImageInfoUR::RemoveImagesFromDisk(const StringType& gPath) 
 {
-       StringType filename = gPath + this->m_ImageName;
+       StringType filename             = gPath + this->m_ImageName;
        StringType undoImagePathMHD = filename + "_Undo.mhd";
        StringType redoImagePathMHD = filename + "_Redo.mhd";
        StringType undoImagePathRAW = filename + "_Undo.raw";
@@ -163,6 +188,7 @@ void ImageInfoUR::RemoveImagesFromDisk(const StringType& gPath)
        remove(undoImagePathRAW.c_str());
        remove(redoImagePathRAW.c_str());
 }
+
 // ----------------------------------------------------------------------------------
 void ImageInfoUR::SaveImageAsMHD(const StringType& filename, VTKImageDataPointerType image) 
 {
index 0bdcfdef2dad273bcd8614df632ba579f26753ee..32b0f6994eb62f7713c0cb494afa9cfb1338bfa5 100644 (file)
@@ -40,67 +40,57 @@ ImageMManager::ImageMManager()
 // ----------------------------------------------------------------------------------
 ImageMManager::ImageMManager(ImageMManager* manager) 
 {
+printf("EED ImageMManager::ImageMManager  Start\n");
        this->m_RegionStruct = manager->GetModifiedRegion();
+       this->m_ValidRegion  = manager->ValidateRegion();
+
+if (manager->ValidateRegion()==true) printf("EED ImageMManager::ImageMManager  manager->ValidateRegion true \n");
+if (manager->ValidateRegion()==false) printf("EED ImageMManager::ImageMManager  manager->ValidateRegion false \n");
+printf("EED ImageMManager::ImageMManager  End\n");
 }
 // ----------------------------------------------------------------------------------
 ImageMManager::~ImageMManager() 
 {
 }
+
 // ----------------------------------------------------------------------------------
 void ImageMManager::CleanModifiedRegion() 
 {
-       int min = std::numeric_limits<int>::min();
-       int max = std::numeric_limits<int>::max();
-       this->m_RegionStruct.minX = max;
-       this->m_RegionStruct.maxX = min;
-       this->m_RegionStruct.minY = max;
-       this->m_RegionStruct.maxY = min;
-       this->m_RegionStruct.minZ = max;
-       this->m_RegionStruct.maxZ = min;
-       this->m_ValidRegion = false;
+       int min                                         = std::numeric_limits<int>::min();
+       int max                                         = std::numeric_limits<int>::max();
+       this->m_RegionStruct.minX       = max;
+       this->m_RegionStruct.maxX       = min;
+       this->m_RegionStruct.minY       = max;
+       this->m_RegionStruct.maxY       = min;
+       this->m_RegionStruct.minZ       = max;
+       this->m_RegionStruct.maxZ       = min;
+       this->m_ValidRegion             = false;
 }
+
 // ----------------------------------------------------------------------------------
 void ImageMManager::CalculateMinMaxRegion(const int& i, const int& j, const int& k) 
 {
        if (i >= 0 && j >= 0 && k >= 0) 
        {
-               if (i <= this->m_RegionStruct.minX) 
-               {
-                       this->m_RegionStruct.minX = i;
-               } //fi
-               if (i > this->m_RegionStruct.maxX) 
-               {
-                       this->m_RegionStruct.maxX = i;
-               } //esle
-               if (j <= this->m_RegionStruct.minY) 
-               {
-                       this->m_RegionStruct.minY = j;
-               } //fi
-               if (j > this->m_RegionStruct.maxY) 
-               {
-                       this->m_RegionStruct.maxY = j;
-               } //esle
-               if (k <= this->m_RegionStruct.minZ) 
-               {
-                       this->m_RegionStruct.minZ = k;
-               } //fi
-               if (k > this->m_RegionStruct.maxZ) 
-               {
-                       this->m_RegionStruct.maxZ = k;
-               } //esle
+               if (i <= this->m_RegionStruct.minX) { this->m_RegionStruct.minX = i; } //fi
+               if (i > this->m_RegionStruct.maxX)  { this->m_RegionStruct.maxX = i; } //esle
+               if (j <= this->m_RegionStruct.minY) { this->m_RegionStruct.minY = j; } //fi
+               if (j > this->m_RegionStruct.maxY)  { this->m_RegionStruct.maxY = j; } //esle
+               if (k <= this->m_RegionStruct.minZ) { this->m_RegionStruct.minZ = k; } //fi
+               if (k > this->m_RegionStruct.maxZ)  { this->m_RegionStruct.maxZ = k; } //esle
                this->m_ValidRegion = true;
        }else {
                this->m_ValidRegion = false;
        } // if i j k
 
-       if (m_ValidRegion )  printf("  ImageMManager::CalculateMinMaxRegion true \n");
-       if (!m_ValidRegion ) printf("  ImageMManager::CalculateMinMaxRegion false \n");
+//     if (m_ValidRegion )  printf("  ImageMManager::CalculateMinMaxRegion true \n");
+//     if (!m_ValidRegion ) printf("  ImageMManager::CalculateMinMaxRegion false \n");
 }
 
 // ----------------------------------------------------------------------------------
 void ImageMManager::AddModifiedPixel(const int& i, const int& j, const int& k) 
 {
-printf("EED ImageMManager::AddModifiedPixel \n");
+//printf("EED ImageMManager::AddModifiedPixel \n");
        this->CalculateMinMaxRegion(i, j, k);
 }
 // ----------------------------------------------------------------------------------
index 6ae156e4f329398872b589fb2f3402c9cf8f7775..24ae8f72931c82dd8a9d5318daa82febb84dc74f 100644 (file)
@@ -44,7 +44,8 @@
  *     @brief This class contains the modification manager of the undo/redo
  *     @details This class contains the region and some information about the undo/redo
  */
-class ImageMManager {
+class ImageMManager 
+{
 public:
        // ----------------------------------------------------------------------------------
        /*! @fn ImageMManager();
index 698ac4fceee910a9f1e3f8abb7e4961f0589368c..0054735ef663557ac7b0a5d08e49407a7522486c 100755 (executable)
@@ -48,12 +48,15 @@ ImageUndoRedo::~ImageUndoRedo( )
 //virtual
 void ImageUndoRedo::Undo( )
 {
+printf("EED ImageUndoRedo::Undo Start\n");
        ImageInfoUR* imageInfo = this->m_ImagesDeque->Undo( );
        if( imageInfo != NULL)
        {
                this->DrawUR( imageInfo, true );
                this->UpdateUndoImage( );
-       }
+       } //if  imageInfo
+printf("EED ImageUndoRedo::Undo End\n");
+
 }
 // ----------------------------------------------------------------------------------
 //virtual
@@ -75,11 +78,12 @@ void ImageUndoRedo::SetImage( VTKImageDataPointerType image )
 #if VTK_MAJOR_VERSION <= 5
        this->m_CurrentImage->Update( );
 #else
-       // ..
+       this->m_CurrentImage->Modified( );
 #endif
 
        this->UpdateUndoImage( );
 }
+
 // ----------------------------------------------------------------------------------
 //virtual
 void ImageUndoRedo::SetURImages( ImageMManagerType* imMManager )
@@ -96,6 +100,7 @@ void ImageUndoRedo::SetURImages( ImageMManagerType* imMManager )
                std::cerr << "INVALID REGION" << std::endl;
        }
 }
+
 // ----------------------------------------------------------------------------------
 void ImageUndoRedo::UpdateUndoImage( )
 {
@@ -103,7 +108,7 @@ void ImageUndoRedo::UpdateUndoImage( )
 #if VTK_MAJOR_VERSION <= 5
        this->m_CurrentImage->Update( );
 #else
-       // ...
+       this->m_CurrentImage->Modified( );
 #endif
        this->m_UndoImage = VTKImageDataPointerType::New( );
        this->m_UndoImage->DeepCopy( m_CurrentImage );
@@ -111,22 +116,26 @@ void ImageUndoRedo::UpdateUndoImage( )
 #if VTK_MAJOR_VERSION <= 5
        this->m_UndoImage->Update( );
 #else
-       // ..
+       this->m_UndoImage->Modified( );
 #endif
 }
+
 // ----------------------------------------------------------------------------------
-ImageUndoRedo::VTKImageDataPointerType ImageUndoRedo::GetImageRegion(
-       const RegionSType& region, VTKImageDataPointerType img )
+ImageUndoRedo::VTKImageDataPointerType ImageUndoRedo::GetImageRegion( const RegionSType& region, VTKImageDataPointerType img )
 {
+printf("EED ImageUndoRedo::GetImageRegion Start\n");
        VTKExtractVOIPointerType extract = VTKExtractVOIPointerType::New( );
-       extract->SetVOI( region.minX, region.maxX, region.minY, region.maxY,
-               region.minZ, region.maxZ );
+       extract->SetVOI( region.minX, region.maxX, region.minY, region.maxY,region.minZ, region.maxZ );
+
+printf("EED ImageUndoRedo::GetImageRegion region %d %d   %d %d   %d %d\n", region.minX, region.maxX, region.minY, region.maxY,region.minZ, region.maxZ );
+
        extract->SetSampleRate( 1, 1, 1 );
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
        extract->SetInput( img );
 #else
        extract->SetInputData( img );
+       extract->Update();
 #endif
        VTKImageDataPointerType imgResult = extract->GetOutput( );
 
@@ -134,9 +143,10 @@ ImageUndoRedo::VTKImageDataPointerType ImageUndoRedo::GetImageRegion(
 #if VTK_MAJOR_VERSION <= 5
        imgResult->Update( );
 #else
-       // ..
+       imgResult->Modified( );
 #endif
 
+printf("EED ImageUndoRedo::GetImageRegion End\n");
        return ( imgResult );
 }
 // ----------------------------------------------------------------------------------
@@ -148,6 +158,7 @@ void ImageUndoRedo::SetCurrentImage( VTKImageDataPointerType img )
 //virtual
 void ImageUndoRedo::DrawUR( ImageInfoUR* imageInfo, const bool& undo )
 {
+printf("EED ImageUndoRedo::DrawUR Start\n");
        VTKImageDataPointerType img;
        if( undo )
        {
@@ -158,20 +169,25 @@ void ImageUndoRedo::DrawUR( ImageInfoUR* imageInfo, const bool& undo )
        RegionSType region = imageInfo->GetImageMManager( )->GetModifiedRegion( );
        if( img != NULL)
        {
-               int *dim = img->GetDimensions( );
-               int sizeXImageIn = dim[ 0 ];
-               size_t linesize = sizeXImageIn * sizeof(unsigned short);
+               int *dim                        = img->GetDimensions( );
+printf("EED ImageUndoRedo::DrawUR dim = %d %d %d\n", dim[0],dim[1],dim[2]);
+               int ext[6]; img->GetExtent( ext );
+printf("EED ImageUndoRedo::DrawUR ext = %d %d   %d %d    %d %d\n", ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
+       
+               int sizeXImageIn        = dim[ 0 ];
+               size_t linesize         = sizeXImageIn * sizeof(unsigned short);
                for( int j = region.minY, y = 0; j <= region.maxY; j++, y++ )
                {
                        for( int k = region.minZ, z = 0; k <= region.maxZ; k++, z++ )
                        {
-                               void* ptrsrc = img->GetScalarPointer( 0, y, z );
-                               void* ptrdest = this->m_CurrentImage->GetScalarPointer( region.minX, j, k );
+                               void* ptrsrc    = img->GetScalarPointer( 0, y, z );
+                               void* ptrdest   = this->m_CurrentImage->GetScalarPointer( region.minX, j, k );
                                memcpy( ptrdest, ptrsrc, linesize );
                        } // for k
                } // for j
                this->m_CurrentImage->Modified( );
        } // if img
        this->m_ImagesDeque->ManageMemory( );
+printf("EED ImageUndoRedo::DrawUR End\n");
 }
 // ----------------------------------------------------------------------------------
index 21f1a17db992e220ad4510f3d059bcd9ebccabd5..defc487efb09d80c711a191fd48caa12d3bde0ee 100755 (executable)
@@ -107,9 +107,9 @@ protected:
        // ----------------------------------------------------------------------------------
 protected:
 
-       IDequeType* m_ImagesDeque; //!<The manager of the ImagesDeque.
-       VTKImageDataPointerType m_UndoImage; //!< This is the image for undo t(m_CurrentImage - 1).
-       VTKImageDataPointerType m_CurrentImage; //!< This is the current image (The modification image).
+       IDequeType                                      *m_ImagesDeque;         //!<The manager of the ImagesDeque.
+       VTKImageDataPointerType         m_UndoImage;            //!< This is the image for undo t(m_CurrentImage - 1).
+       VTKImageDataPointerType         m_CurrentImage;         //!< This is the current image (The modification image).
 
 };
 
index 8412fbe44cbcfe9ca515d28c2d630b88df654d59..71162ffecf3bc4e3b352e3738b43c353a1b22131 100755 (executable)
 #include "managerUR.h"
 
 // ----------------------------------------------------------------------------------
-ManagerUR::ManagerUR() {
-
+ManagerUR::ManagerUR() 
+{
 }
-// ----------------------------------------------------------------------------------
-ManagerUR::~ManagerUR() {
 
-}
 // ----------------------------------------------------------------------------------
-void ManagerUR::SetImage(VTKImageDataPointerType image) {
-
+ManagerUR::~ManagerUR() 
+{
 }
-// ----------------------------------------------------------------------------------
-void ManagerUR::Undo() {
 
-}
 // ----------------------------------------------------------------------------------
-void ManagerUR::Redo() {
-
+void ManagerUR::SetImage(VTKImageDataPointerType image) 
+{
 }
+
 // ----------------------------------------------------------------------------------
-void ManagerUR::SetURImages(ImageMManagerType* imMManager) {
+void ManagerUR::Undo() 
+{
+}
 
+// ----------------------------------------------------------------------------------
+void ManagerUR::Redo() 
+{
 }
+
 // ----------------------------------------------------------------------------------
-void ManagerUR::DrawUR(ImageInfoUR* imageInfo, const bool& undo) {
+void ManagerUR::SetURImages(ImageMManagerType* imMManager) 
+{
+}
 
+// ----------------------------------------------------------------------------------
+void ManagerUR::DrawUR(ImageInfoUR* imageInfo, const bool& undo) 
+{
 }
+
 // ----------------------------------------------------------------------------------
index 3085a209b22683f968a0f910885bd5f6e32ab43f..b9f970c4703fc4b4de1c6a7d545a97e652a510b0 100644 (file)
@@ -27,7 +27,7 @@
 
 BrushFilter::BrushFilter() 
 {
-       _brushsize = 1;
+       _brushsize = 5;
        _brushform = 0; // 0 rectangle-cube  ,   1 circle-sphere
        _brushtool = 0; // 0 pencil         ,   1 fill
 }
@@ -50,51 +50,33 @@ void BrushFilter::FindMinMaxBrush(int &minX, int &maxX, int &minY, int &maxY,
        maxZ = _pz + size;
 
        if (_2D3D == 0) //2D
-                       {
+       {
                if (_direction == 0) // YZ
-                               {
+               {
                        minX = _px;
                        maxX = _px;
                }
                if (_direction == 1) // XZ
-                               {
+               {
                        minY = _py;
                        maxY = _py;
                }
                if (_direction == 2) // XY
-                               {
+               {
                        minZ = _pz;
                        maxZ = _pz;
                }
-       }
-
-       if (_2D3D == 1) // 3D
-                       {
-       }
-
-       if (minX < _minX) {
-               minX = _minX;
-       }
-
-       if (minY < _minY) {
-               minY = _minY;
-       }
-
-       if (minZ < _minZ) {
-               minZ = _minZ;
-       }
+       } // _2D3D
 
-       if (maxX > _maxX) {
-               maxX = _maxX;
-       }
+       if (_2D3D == 1) {  }  // 3D 
 
-       if (maxY > _maxY) {
-               maxY = _maxY;
-       }
+       if (minX < _minX) { minX = _minX; }
+       if (minY < _minY) { minY = _minY; }
 
-       if (maxZ > _maxZ) {
-               maxZ = _maxZ;
-       }
+       if (minZ < _minZ) { minZ = _minZ; }
+       if (maxX > _maxX) { maxX = _maxX; }
+       if (maxY > _maxY) { maxY = _maxY; }
+       if (maxZ > _maxZ) { maxZ = _maxZ; }
 
        //--
        SetGeneralMinMax(minX, maxX, minY, maxY, minZ, maxZ);
index 476a23593d1acb04f947f234750ba3e66c18b6f2..d584e3a5ed0e6983c9fc65aa90453830a1f84e01 100644 (file)
@@ -32,8 +32,8 @@
 
 FillFilter::FillFilter() 
 {
-       _tolerancefill          = 50;
-       _distancefill           = 500;
+       _tolerancefill          = 125;
+       _distancefill           = 5;
 /*
        _limitRecursionFill = 50000;
 */
@@ -77,7 +77,6 @@ void FillFilter::SetImages(vtkImageData *image,vtkImageData *image2) // virtual
        }
        unsigned char   * ptrAuxImageFill = (unsigned char      *)_auxImageFill->GetScalarPointer();
        memset(ptrAuxImageFill, 0, (_maxX+1) * (_maxY+1) * (_maxZ+1) );
-
        _maxXback=_maxX;
        _maxYback=_maxY;
        _maxZback=_maxZ;        
@@ -199,6 +198,9 @@ void FillFilter::FillToolLoop(int px, int py, int pz,long int iviA)
 
                                        if (_auxGrayLevelValidationFill)  
                                        {
+
+                                               this->_IMManager->AddModifiedPixel(lstX[0], lstY[0], lstZ[0]); //DFCH
+
                                                // Modifie image
                                                if (_image2!=NULL)
                                                {
@@ -247,15 +249,7 @@ void FillFilter::FillToolLoop(int px, int py, int pz,long int iviA)
                                                        lstX.push_back(lstX[0]  ); lstY.push_back(lstY[0]  ); lstZ.push_back(lstZ[0]+1); lstivi.push_back( lstivi[0]+_OnePlane);
                                                        lstX.push_back(lstX[0]  ); lstY.push_back(lstY[0]  ); lstZ.push_back(lstZ[0]-1); lstivi.push_back( lstivi[0]-_OnePlane);
                                                } // 2D 3D
-
-
-
-
-
-
-
                                        } // if gray level valid      _auxGrayLevelValidationFill
-
                                } // if point not visited
                                // Add point to already visited
                                SETVALUE2_VTK_CREA(1,p_auxImageFill,st_auxImageFill,lstivi[0]);
index b79b32df9ad3ee571e94c49dcfd9f6ec2551b122..4674d2d7d98a8abf257e16267ad5127c6506b64d 100644 (file)
 #  knowledge of the CeCILL-B license and that you accept its terms.
 # ------------------------------------------------------------------------ */
 
+#include <wxMPRBaseData.h>
+
 #include "ManualPaintControler.h"
 #include "vtkInteractorManualPaint.h"
 #include "vtkImageActor.h"
 
 //---------------------------------------------------------------------------
-ManualPaintControler::ManualPaintControler() {
-       auxZ = 0;
-       _wxvtk2Dbaseview = NULL;
+ManualPaintControler::ManualPaintControler() 
+{
+       auxZ                            = 0;
+       _wxvtk2Dbaseview        = NULL;
 }
 
 //---------------------------------------------------------------------------
-ManualPaintControler::~ManualPaintControler() {
+ManualPaintControler::~ManualPaintControler() 
+{
 }
 
 //---------------------------------------------------------------------------
-void ManualPaintControler::SetManualPaintModel(
-               ManualPaintModel* manualPaintModel) {
-       _manualPaintModel = manualPaintModel;
+void ManualPaintControler::SetManualPaintModel( ManualPaintModel* manualPaintModel ) 
+{
+       _manualPaintModel       = manualPaintModel;
 }
 
 //---------------------------------------------------------------------------
-void ManualPaintControler::SetManualPaintPanel(
-               ManualPaintPanel* manualPaintPanel) {
-       _manualPaintPanel = manualPaintPanel;
+ManualPaintModel* ManualPaintControler::GetManualPaintModel( ) 
+{
+       return _manualPaintModel;
 }
 
 //---------------------------------------------------------------------------
-void ManualPaintControler::SetWxVtk2DBaseView(
-               wxVtk2DBaseView *wxvtk2Dbaseview) {
-       _wxvtk2Dbaseview = wxvtk2Dbaseview;
+//void ManualPaintControler::SetManualPaintPanel( ManualPaintPanel* manualPaintPanel ) 
+//{
+//     _manualPaintPanel       = manualPaintPanel;
+//}
+
+//---------------------------------------------------------------------------
+void ManualPaintControler::SetWxVtk2DBaseView( wxVtk2DBaseView *wxvtk2Dbaseview )
+{
+       _wxvtk2Dbaseview        = wxvtk2Dbaseview;
 }
 
 //---------------------------------------------------------------------------
-void ManualPaintControler::Config() {
-       if (_wxvtk2Dbaseview != NULL) {
-               vtkInteractorStyleBaseView *isbv =
-                               (vtkInteractorStyleBaseView*) (_wxvtk2Dbaseview->GetInteractorStyleBaseView());
+void ManualPaintControler::Config() 
+{
+       if (_wxvtk2Dbaseview != NULL) 
+       {
+               vtkInteractorStyleBaseView *isbv = (vtkInteractorStyleBaseView*) (_wxvtk2Dbaseview->GetInteractorStyleBaseView());
                isbv->AddInteractorStyleMaracas(new vtkInteractorManualPaint(this));
-       }
+       } // if _wxvtk2Dbaseview
 }
 
 //---------------------------------------------------------------------------
-void ManualPaintControler::PaintImage(int px, int py, int pz) {
+void ManualPaintControler::PaintImage(int px, int py, int pz) 
+{
        _manualPaintModel->SetDirection(_wxvtk2Dbaseview->GetDirection());
        _manualPaintModel->PaintImage(px, py, pz);
-
        // The refresh mechanisme is made in the vtkInteractorManualPaint
        //    RefreshView();
 }
@@ -78,3 +89,42 @@ void ManualPaintControler::SetImageUndo()
 {
        _manualPaintModel->SetUndoImage();
 }
+
+
+
+//---------------------------------------------------------------------------
+void ManualPaintControler::Undo()
+{
+       _manualPaintModel->Undo();
+       Refresh();
+}
+
+void ManualPaintControler::Redo()
+{
+       _manualPaintModel->Redo();
+       Refresh();
+}
+
+
+void ManualPaintControler::Refresh()
+{
+       if (_wxvtk2Dbaseview!=NULL)
+       {
+               vtkMPRBaseData* vtkmprbasedata = (vtkMPRBaseData*) (_wxvtk2Dbaseview->GetVtkBaseData());
+//             if (bbGetInputPoint().size()==3)
+//             {
+//                     vtkmprbasedata->SetX( bbGetInputPoint()[0] );
+//                     vtkmprbasedata->SetY( bbGetInputPoint()[1] );
+//                     vtkmprbasedata->SetZ( bbGetInputPoint()[2] );
+                       wxCommandEvent newevent(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+                       _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessEvent( newevent );
+#else
+                       _wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor ()->GetParent()->ProcessWindowEvent( newevent );
+#endif                         
+//             } // if Position
+       } // _wxvtk2Dbaseview
+}
+
+
index 0aa0ec95625804ea684e7a71c7effb3c46400760..9a9993b25f2d96ad82ac990abde8ce44e60034fc 100644 (file)
@@ -27,7 +27,7 @@
 #define _MANUAL_PAINT_CONTROLER_H_
 
 #include "ManualPaintModel.h"
-#include "ManualPaintPanel.h"
+//#include "ManualPaintPanel.h"
 #include "wxVtk2DBaseView.h"
 
 
@@ -36,17 +36,21 @@ public:
        ManualPaintControler();
        virtual ~ManualPaintControler();
 
-    void SetManualPaintModel(ManualPaintModel* manualPaintModel);
-    void SetManualPaintPanel(ManualPaintPanel* manualPaintPanel);
-    void SetWxVtk2DBaseView(wxVtk2DBaseView *wxvtk2Dbaseview);
-    void Config();
-    void PaintImage(int px,int py, int pz);
-    void SetImageUndo();
+    void                               SetManualPaintModel(ManualPaintModel* manualPaintModel);
+    ManualPaintModel*  GetManualPaintModel();
+//    void                             SetManualPaintPanel(ManualPaintPanel* manualPaintPanel);
+    void                               SetWxVtk2DBaseView(wxVtk2DBaseView *wxvtk2Dbaseview);
+    void                               Config();
+    void                               PaintImage(int px,int py, int pz);
+    void                               SetImageUndo();
+    void                               Undo();
+    void                               Redo();
+    void                               Refresh();
 
 private:
     int                 auxZ;
        ManualPaintModel        *_manualPaintModel;
-       ManualPaintPanel        *_manualPaintPanel;
+//     ManualPaintPanel        *_manualPaintPanel;
        wxVtk2DBaseView     *_wxvtk2Dbaseview;
 
 protected:
index 61c234ecf81e25a35e98c59f32b5334b583c13ec..8736b835eba01931628c52d2a247cefabcc6d888 100644 (file)
@@ -27,8 +27,8 @@
 
 ManualPaintModel::ManualPaintModel() 
 {
-       _active         = true;
-       _tool           = 0; // 0 pencil         ,   1 fill
+       _active                 = true;
+       _tool                   = 0; // 0 pencil         ,   1 fill
        _brushfilter    = new BrushFilter();
        _fillfilter     = new FillFilter();
        _imageUndoRedo  = new ImageUndoRedo();
@@ -53,13 +53,11 @@ void ManualPaintModel::PaintImage(int px, int py, int pz)
 {
   if (_active==true)
   {
-
        if (_tool == 0) 
        {
                _brushfilter->SetPoint(px, py, pz);
                _brushfilter->Run();
        } // _tool 2
-
        if (_tool == 1) 
        {
                _fillfilter->SetPoint(px, py, pz);
@@ -155,7 +153,6 @@ void ManualPaintModel::GetScalarRange(double * range)
 //---------------------------------------------------------------------------
 void ManualPaintModel::SetUndoImage() 
 {
-       printf("EED ManualPaintModel::SetUndoImage \n");
        ImageMManager* imMManager = NULL;
        if (_tool == 0) 
        {
@@ -173,7 +170,6 @@ void ManualPaintModel::SetUndoImage()
 
 void ManualPaintModel::Undo() 
 {
-       printf("EED ManualPaintModel::Undo \n");
        this->_imageUndoRedo->Undo();
 }
 
index 1a552e73f4e00f376ad9632b2a82d410e361c2f6..eb6f10a483859626f2224f33585422e687204b0a 100644 (file)
@@ -60,11 +60,11 @@ public:
        void Redo(); //DFCH
 
 private:
-       int _tool;
-       bool _active;
-       BrushFilter *_brushfilter;
-       FillFilter *_fillfilter;
-       ImageUndoRedo *_imageUndoRedo;
+       int                     _tool;
+       bool                    _active;
+       BrushFilter     *_brushfilter;
+       FillFilter              *_fillfilter;
+       ImageUndoRedo   *_imageUndoRedo;
 
 protected:
 
index d943678eb3e23c244eee8c0b8f97628931ed60c5..0ff7e2a13f672c66a29332adb84ad21863394766 100644 (file)
@@ -28,7 +28,7 @@
 
 ManualPaintPanel::ManualPaintPanel()
 {
-    _manualPaintModel=NULL;
+    _manualPaintControler=NULL;
 }
 
 //---------------------------------------------------------------------------
@@ -37,18 +37,18 @@ ManualPaintPanel::~ManualPaintPanel()
 }
 
 //---------------------------------------------------------------------------
-void ManualPaintPanel::SetManualPaintModel(ManualPaintModel* manualPaintModel)
+void ManualPaintPanel::SetManualPaintControler(ManualPaintControler* manualPaintControler)
 {
-    _manualPaintModel = manualPaintModel;
+    _manualPaintControler = manualPaintControler;
 }
 
 
 //---------------------------------------------------------------------------
 void ManualPaintPanel::SetBrushSize( int brushsize )
 {
-    if (_manualPaintModel!=NULL)
+    if (_manualPaintControler!=NULL)
     {
-        _manualPaintModel->SetBrushSize( brushsize );
+        _manualPaintControler->GetManualPaintModel()->SetBrushSize( brushsize );
     } else {
        printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
     }
@@ -57,9 +57,9 @@ void ManualPaintPanel::SetBrushSize( int brushsize )
 //---------------------------------------------------------------------------
 void ManualPaintPanel::SetRangeMin( int min )
 {
-    if (_manualPaintModel!=NULL)
+    if (_manualPaintControler!=NULL)
     {
-       _manualPaintModel->SetRangeMin( min );
+       _manualPaintControler->GetManualPaintModel()->SetRangeMin( min );
     } else {
        printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
     }
@@ -68,9 +68,9 @@ void ManualPaintPanel::SetRangeMin( int min )
 //---------------------------------------------------------------------------
 void ManualPaintPanel::SetRangeMax( int max )
 {
-    if (_manualPaintModel!=NULL)
+    if (_manualPaintControler!=NULL)
     {
-       _manualPaintModel->SetRangeMax( max );
+       _manualPaintControler->GetManualPaintModel()->SetRangeMax( max );
     } else {
        printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
     }
@@ -79,9 +79,9 @@ void ManualPaintPanel::SetRangeMax( int max )
 //---------------------------------------------------------------------------
 void ManualPaintPanel::SetGrayLevel( double graylevel )
 {
-    if (_manualPaintModel!=NULL)
+    if (_manualPaintControler!=NULL)
     {
-        _manualPaintModel->SetGrayLevel( graylevel );
+        _manualPaintControler->GetManualPaintModel()->SetGrayLevel( graylevel );
     } else {
        printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
     }
@@ -90,9 +90,9 @@ void ManualPaintPanel::SetGrayLevel( double graylevel )
 //---------------------------------------------------------------------------
 void ManualPaintPanel::SetTool(int tool)
 {
-    if (_manualPaintModel!=NULL)
+    if (_manualPaintControler!=NULL)
     {
-        _manualPaintModel->SetTool( tool );
+        _manualPaintControler->GetManualPaintModel()->SetTool( tool );
     } else {
        printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
     }
@@ -101,9 +101,9 @@ void ManualPaintPanel::SetTool(int tool)
 //---------------------------------------------------------------------------
 void ManualPaintPanel::Set2D3D(int dim2D3D)
 {
-    if (_manualPaintModel!=NULL)
+    if (_manualPaintControler!=NULL)
     {
-        _manualPaintModel->Set2D3D( dim2D3D );
+        _manualPaintControler->GetManualPaintModel()->Set2D3D( dim2D3D );
     } else {
        printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
     }
@@ -112,9 +112,9 @@ void ManualPaintPanel::Set2D3D(int dim2D3D)
 //---------------------------------------------------------------------------
 void ManualPaintPanel::SetBrushForm(int brushform)
 {
-    if (_manualPaintModel!=NULL)
+    if (_manualPaintControler!=NULL)
     {
-        _manualPaintModel->SetBrushForm( brushform );
+        _manualPaintControler->GetManualPaintModel()->SetBrushForm( brushform );
     } else {
        printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
     }
@@ -123,9 +123,9 @@ void ManualPaintPanel::SetBrushForm(int brushform)
 //---------------------------------------------------------------------------
 void ManualPaintPanel::SetToleranceFill(double tolerancefill)
 {
-    if (_manualPaintModel!=NULL)
+    if (_manualPaintControler!=NULL)
     {
-        _manualPaintModel->SetToleranceFill( tolerancefill );
+        _manualPaintControler->GetManualPaintModel()->SetToleranceFill( tolerancefill );
     } else {
        printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
     }
@@ -134,9 +134,9 @@ void ManualPaintPanel::SetToleranceFill(double tolerancefill)
 //---------------------------------------------------------------------------
 void ManualPaintPanel::SetDistanceFill(int distancefill)
 {
-    if (_manualPaintModel!=NULL)
+    if (_manualPaintControler!=NULL)
     {
-        _manualPaintModel->SetDistanceFill( distancefill );
+        _manualPaintControler->GetManualPaintModel()->SetDistanceFill( distancefill );
     } else {
        printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
     }
@@ -145,9 +145,9 @@ void ManualPaintPanel::SetDistanceFill(int distancefill)
 //---------------------------------------------------------------------------
 void ManualPaintPanel::GetScalarRange( double * range )
 {
-       if (_manualPaintModel!=NULL)
+       if (_manualPaintControler!=NULL)
        {
-           _manualPaintModel->GetScalarRange( range );
+           _manualPaintControler->GetManualPaintModel()->GetScalarRange( range );
        } else {
           printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
        }
@@ -156,9 +156,9 @@ void ManualPaintPanel::GetScalarRange( double * range )
 //---------------------------------------------------------------------------
 void ManualPaintPanel::SetActive( bool active )
 {
-       if (_manualPaintModel!=NULL)
+       if (_manualPaintControler!=NULL)
        {
-           _manualPaintModel->SetActive( active );
+           _manualPaintControler->GetManualPaintModel()->SetActive( active );
        } else {
           printf("ERROR  in  ManualPaintPanel  _manualPaintModel not set.\n");
        }
index e756fd325320ca1276b003f749c5ac695dae9f5b..8b75c96a109934eddf43e8a66f6f0a09eeb9ffd6 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef _MANUAL_PAINT_PANEL_H_
 #define _MANUAL_PAINT_PANEL_H_
 
-#include "ManualPaintModel.h"
+#include "ManualPaintControler.h"
 
 class ManualPaintPanel  {
 public:
@@ -34,7 +34,7 @@ public:
        virtual ~ManualPaintPanel();
 
     void SetActive( bool active );
-    void SetManualPaintModel(ManualPaintModel* manualPaintModel);
+    void SetManualPaintControler(ManualPaintControler* manualPaintControler);
     void SetBrushSize( int brushsize );
     void SetGrayLevel( double graylevel );
     void SetTool(int tool);
@@ -47,7 +47,7 @@ public:
     void GetScalarRange( double * range);
 
 protected:
-       ManualPaintModel        *_manualPaintModel;
+       ManualPaintControler    *_manualPaintControler;
 
 };
 
index f3279364f1e43cc03019a1fa4a5393a32375d214..e7b081d82743a4e28cd63407a13b54b4ab4f003a 100644 (file)
@@ -71,7 +71,7 @@ bool vtkInteractorManualPaint::OnLeftButtonUp()
 printf("EED vtkInteractorManualPaint::OnLeftButtonUp \n");
     if((_state == true) || (_stateKey == true))
        {
-       _manualPaintControler->SetImageUndo();
+//     _manualPaintControler->SetImageUndo();
        }
        _state = false;
        return true;
@@ -82,34 +82,19 @@ bool vtkInteractorManualPaint::OnMouseMove()
 {
        if ((_state == true) || (_stateKey == true)) 
        {
-               wxVtk2DBaseView *wxvtk2Dbaseview =
-                               (wxVtk2DBaseView*) _vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
-               crea::wxVTKRenderWindowInteractor *wxVTKiren =
-                               wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor();
+               wxVtk2DBaseView                                         *wxvtk2Dbaseview        = (wxVtk2DBaseView*) _vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
+               crea::wxVTKRenderWindowInteractor       *wxVTKiren                      = wxvtk2Dbaseview->GetWxVTKRenderWindowInteractor();
                int px, py;
                wxVTKiren->GetEventPosition(px, py);
-
-//        int     typeView = 1;
                double X = (double) px;
                double Y = (double) py;
                double Z = wxvtk2Dbaseview->GetActualSlice();
-//        wxvtk2Dbaseview->TransFromCoordScreenToWorld(X, Y, Z,true, typeView);
                wxvtk2Dbaseview->TransFromCoordScreenToWorld(X, Y, Z, true);
-
                _manualPaintControler->PaintImage((int) X, (int) Y, (int) Z);
                this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
 
-               /*
-                wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2()->Modified();
-                wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor()->Modified();
-                wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2()->GetImageActor()->SetDisplayExtent(0, 50+_auxZ, 0, 50,_Z, _Z );
-                wxvtk2Dbaseview->Refresh();
-                wxvtk2Dbaseview->RefreshView();
-                //        wxvtk2Dbaseview->SetActualSlice(_Z+_auxZ);
-                _auxZ=(_auxZ+1)%2;
-                wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->Render();
-                this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
-                */
+       _manualPaintControler->SetImageUndo();
+
        } // if _state
        return true;
 }
index 57fd497a452561a4a12581e93187cf765dd599f6..0fb3c372c74a2956117d29e3ff6b4c6e4bd5c25d 100644 (file)
@@ -30,15 +30,12 @@ wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
                : wxPanel( parent, -1 )
 {
        wxSizer *sizer = new wxFlexGridSizer( 1 );
-
        // Widget interface
-       wxStaticText *tittleText = new wxStaticText( this, -1,
-               _T("             Manual Paint") );
+       wxStaticText *tittleText = new wxStaticText( this, -1,_T("             Manual Paint") );
        //Title
        sizer->Add( tittleText );
        //giving some blank spaces
        sizer->Add( new wxStaticText( this, -1, _T("          key A : Enable/Disable   ") ) );
-
        this->ConfigureActiveCBButton( );
        this->ConfigureBrushToolRadioButton( );
        this->Configure2D3DRadioButton( );
@@ -49,15 +46,12 @@ wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
        this->ConfigureDistanceFillSld( );
        this->ConfigureTolFillSld( );
        this->ConfigureEditButtons( );
-
        //Buttons
-       wxStaticText *editButtonsText = new wxStaticText( this, -1,
-               _T("Edit Buttons") );
-       this->_buttonsSizer = new wxFlexGridSizer( 4 );
+       wxStaticText *editButtonsText   = new wxStaticText( this, -1,_T("Edit Buttons") );
+       this->_buttonsSizer                     = new wxFlexGridSizer( 4 );
        this->_buttonsSizer->Add( _btnUndo, 1, wxGROW );
        this->_buttonsSizer->Add( _btnRedo, 1, wxGROW );
        this->_buttonsSizer->Add( _btnCopy, 1, wxGROW );
-
        this->_gConfigSizer = new wxFlexGridSizer( 1 );
        //BrushTool Radio Button
        //giving blank space
@@ -67,8 +61,7 @@ wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
        //2D/3D Radio Button
        this->_gConfigSizer->Add( _rb2D3D, 1, wxGROW );
        //RangeBar
-       this->_gConfigSizer->Add(
-               new wxStaticText( this, -1, _T( "Select Range" ) ), 1, wxGROW );
+       this->_gConfigSizer->Add( new wxStaticText( this, -1, _T( "Select Range" ) ), 1, wxGROW );
        this->_gConfigSizer->Add( _mBarSlices, 1, wxGROW );
        //GrayLevel Slider
        this->_gConfigSizer->Add( _txtGrayLevel );
@@ -90,8 +83,7 @@ wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
        //giving blank space
        this->_brushSizer->Add( new wxStaticText( this, -1, _T("             ") ) );
        //end of blank space
-       this->_brushSizer->Add(
-               new wxStaticText( this, -1, _T("Brush Settings") ) );
+       this->_brushSizer->Add( new wxStaticText( this, -1, _T("Brush Settings") ) );
        //BrushSize Slider
        this->_brushSizer->Add( _txtBrushSize );
 
@@ -118,31 +110,25 @@ wxManualPaintPanel::wxManualPaintPanel( wxWindow * parent )
        this->_FillSizer->Add( _txtToleranceFill );
        wxFlexGridSizer *sizerTolerance = new wxFlexGridSizer( 2 );
        sizerTolerance->Add( _sldToleranceFill, 1, wxGROW );
-       sizerTolerance->Add( _tolerancefillCtrl, 1,
-               wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
+       sizerTolerance->Add( _tolerancefillCtrl, 1, wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
        this->_FillSizer->Add( sizerTolerance, 1, wxGROW );
        //Distance Fill
        this->_FillSizer->Add( _txtDistanceFill );
        wxFlexGridSizer *sizerDistance = new wxFlexGridSizer( 2 );
        sizerDistance->Add( _sldDistanceFill, 1, wxGROW );
-       sizerDistance->Add( _distancefillCtrl, 1,
-               wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
+       sizerDistance->Add( _distancefillCtrl, 1, wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
        this->_FillSizer->Add( sizerDistance );
-
        sizer->Add( _activeCB );
        sizer->Add( editButtonsText );
        sizer->Add( _buttonsSizer );
        sizer->Add( _gConfigSizer );
        sizer->Add( _brushSizer );
        sizer->Add( _FillSizer );
-
        this->ConnectComponents( ); //DFCH
        this->_FillSizer->Show( false );
-
        this->SetSizer( sizer );
        this->SetAutoLayout( true );
        this->Layout( );
-
 }
 
 //---------------------------------------------------------------------------
@@ -215,12 +201,11 @@ void wxManualPaintPanel::ConfigureRangeBar( )
        _mBarSlices->SetStart( min );
        _mBarSlices->SetEnd( max );
        _mBarSlices->Update( );
-
        SetRangeMin( min );
        SetRangeMax( max );
-
        //DFCH -- End BarSlices
 }
+
 //--------------------------------------------------------------------------
 void wxManualPaintPanel::ConfigureGrayLevelSld( )
 {
@@ -233,24 +218,26 @@ void wxManualPaintPanel::ConfigureGrayLevelSld( )
        _graylevelCtrl = new wxSpinCtrl( this, wxID_ANY, wxEmptyString,
        wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 65535, 0 );
 }
+
 //--------------------------------------------------------------------------
 void wxManualPaintPanel::ConfigureBrushSizeSld( )
 {
        _txtBrushSize = new wxStaticText( this, -1,
        wxString( _T("  Brush size  ") ) );
-       _sldBrushSize = new wxSlider( this, -1, 1, 1, 50, wxDefaultPosition,
+       _sldBrushSize = new wxSlider( this, -1, 5, 1, 50, wxDefaultPosition,
        wxDefaultSize, wxSL_LABELS );
        _BrushSizeCtrl = new wxSpinCtrl( this, wxID_ANY, wxEmptyString,
        wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 65535, 0 );
        _sldBrushSize->SetMinSize( wxSize( 200, -1 ) );
        _sldBrushSize->SetMaxSize( wxSize( 200, -1 ) );
 }
+
 //--------------------------------------------------------------------------
 void wxManualPaintPanel::ConfigureDistanceFillSld( )
 {
        _txtDistanceFill = new wxStaticText( this, -1,
        wxString( _T("  Distance fill  ") ) );
-       _sldDistanceFill = new wxSlider( this, -1, 50, 1, 500, wxDefaultPosition,
+       _sldDistanceFill = new wxSlider( this, -1, 5, 1, 500, wxDefaultPosition,
        wxDefaultSize, wxSL_LABELS );
        _sldDistanceFill->SetMinSize( wxSize( 200, -1 ) );
        _sldDistanceFill->SetMaxSize( wxSize( 200, -1 ) );
@@ -260,22 +247,20 @@ void wxManualPaintPanel::ConfigureDistanceFillSld( )
        _sldDistanceFill->Disable( );
        _distancefillCtrl->Disable( );
 }
+
 //--------------------------------------------------------------------------
 void wxManualPaintPanel::ConfigureTolFillSld( )
 {
-       _txtToleranceFill = new wxStaticText( this, -1,
-               wxString( _T("  Tolerance fill  ") ) );
-       _sldToleranceFill = new wxSlider( this, -1, 125, 0, 255, wxDefaultPosition,
-               wxDefaultSize, wxSL_LABELS );
+       _txtToleranceFill = new wxStaticText( this, -1,wxString( _T("  Tolerance fill  ") ) );
+       _sldToleranceFill = new wxSlider( this, -1, 125, 0, 255, wxDefaultPosition,wxDefaultSize, wxSL_LABELS );
        _sldToleranceFill->SetMinSize( wxSize( 200, -1 ) );
        _sldToleranceFill->SetMaxSize( wxSize( 200, -1 ) );
-       _tolerancefillCtrl = new wxSpinCtrl( this, wxID_ANY, wxEmptyString,
-               wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 65535, 50 );
+       _tolerancefillCtrl = new wxSpinCtrl( this, wxID_ANY, wxEmptyString,wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 65535, 50 );
        _txtToleranceFill->Disable( );
        _sldToleranceFill->Disable( );
        _tolerancefillCtrl->Disable( );
-
 }
+
 //--------------------------------------------------------------------------
 void wxManualPaintPanel::ConfigureEditButtons( )
 {
@@ -340,7 +325,7 @@ void wxManualPaintPanel::ConnectComponents( ) //DFCH
                                _rbBrushTool->GetId(),
                                wxEVT_COMMAND_RADIOBOX_SELECTED,
                                (wxObjectEventFunction) (void(wxPanel::*)(
-                                                               wxCommandEvent&)) &wxManualPaintPanel::OnBrushTool);this->Connect
+                                                               wxCommandEvent&)) &wxManualPaintPanel::OnTool);this->Connect
                (
                                _btnCopy->GetId(),
                                wxEVT_COMMAND_BUTTON_CLICKED,
@@ -400,7 +385,6 @@ void wxManualPaintPanel::ConnectComponents( ) //DFCH
   //-------------------------------------------------------------------------
   void wxManualPaintPanel::OnActive(wxCommandEvent& event)
   {
-       printf("EED wxManualPaintPanel::OnActive \n");
        SetActive( _activeCB->GetValue() );
   }
 
@@ -504,8 +488,9 @@ void wxManualPaintPanel::OnBrushForm( wxCommandEvent &event )
 }
 
 //---------------------------------------------------------------------------
-void wxManualPaintPanel::OnBrushTool( wxCommandEvent &event )
+void wxManualPaintPanel::OnTool( wxCommandEvent &event )
 {
+printf("EED wxManualPaintPanel::OnTool Start\n");
        DisableControls( );
        SetTool( _rbBrushTool->GetSelection( ) );
 
@@ -521,16 +506,26 @@ void wxManualPaintPanel::OnBrushTool( wxCommandEvent &event )
 
        if( _rbBrushTool->GetSelection( ) == 1 ) //Fill tool
        {
+printf("EED wxManualPaintPanel::OnTool 1\n");
                _txtToleranceFill->Enable( );
+printf("EED wxManualPaintPanel::OnTool 2\n");
                _sldToleranceFill->Enable( );
+printf("EED wxManualPaintPanel::OnTool 3\n");
                _tolerancefillCtrl->Enable( );
 
+printf("EED wxManualPaintPanel::OnTool 4\n");
                _txtDistanceFill->Enable( );
+printf("EED wxManualPaintPanel::OnTool 5\n");
                _sldDistanceFill->Enable( );
+printf("EED wxManualPaintPanel::OnTool 6\n");
                _distancefillCtrl->Enable( );
+printf("EED wxManualPaintPanel::OnTool 7\n");
                _FillSizer->Show( true );
+printf("EED wxManualPaintPanel::OnTool 8\n");
                _brushSizer->Show( false );
+printf("EED wxManualPaintPanel::OnTool 9\n");
                this->Layout( );
+printf("EED wxManualPaintPanel::OnTool 10\n");
        }
 }
 
@@ -542,13 +537,13 @@ void wxManualPaintPanel::OnCopy( wxCommandEvent &event )
 //---------------------------------------------------------------------------
 void wxManualPaintPanel::OnUndo( wxCommandEvent &event )
 {
-       this->_manualPaintModel->Undo( );
+       this->_manualPaintControler->Undo( );
 }
 
 //---------------------------------------------------------------------------
 void wxManualPaintPanel::OnRedo( wxCommandEvent &event )
 {
-       this->_manualPaintModel->Redo( );
+       this->_manualPaintControler->Redo( );
 }
 
 //--------------------------------------------------------------------------------------------------------------------------------
index e16fe001f30063ab6dc24b0162c8d67851399d8f..f2cf04e226a1d42e2243f4a4be5c4c95e36e06f8 100644 (file)
@@ -59,7 +59,7 @@ public:
        void OnCtrTxtGrayLevel( wxCommandEvent &event );
        void On2D3D( wxCommandEvent &event );
        void OnBrushForm( wxCommandEvent &event );
-       void OnBrushTool( wxCommandEvent &event );
+       void OnTool( wxCommandEvent &event );
        void OnCopy( wxCommandEvent &event );
        void OnUndo( wxCommandEvent &event );
        void OnRedo( wxCommandEvent &event );
@@ -81,31 +81,26 @@ public:
        void onMovedBar( wxCommandEvent& event );
 
 private:
-       wxCheckBox      *_activeCB;
+       wxCheckBox              *_activeCB;
        wxStaticText    *_txtBrushSize;
-       wxSlider        *_sldBrushSize;
-       wxSpinCtrl      *_BrushSizeCtrl;
-
+       wxSlider                *_sldBrushSize;
+       wxSpinCtrl              *_BrushSizeCtrl;
        wxStaticText    *_txtGrayLevel;
-       wxSlider        *_sldGrayLevel;
-       wxSpinCtrl      *_graylevelCtrl;
-       wxRadioBox      *_rbBrushForm;
-       wxRadioBox      *_rb2D3D;
-       wxRadioBox      *_rbBrushTool;
-
+       wxSlider                *_sldGrayLevel;
+       wxSpinCtrl              *_graylevelCtrl;
+       wxRadioBox              *_rbBrushForm;
+       wxRadioBox              *_rb2D3D;
+       wxRadioBox              *_rbBrushTool;
        wxStaticText    *_txtToleranceFill;
-       wxSlider        *_sldToleranceFill;
-       wxSpinCtrl      *_tolerancefillCtrl;
-
+       wxSlider                *_sldToleranceFill;
+       wxSpinCtrl              *_tolerancefillCtrl;
        wxStaticText    *_txtDistanceFill;
-       wxSlider        *_sldDistanceFill;
-       wxSpinCtrl      *_distancefillCtrl;
-
-       mBarRange       *_mBarSlices; //DFCH
-       wxButton        *_btnCopy; //DFCH
-       wxButton        *_btnUndo; //DFCH
-       wxButton        *_btnRedo; //DFCH
-
+       wxSlider                *_sldDistanceFill;
+       wxSpinCtrl              *_distancefillCtrl;
+       mBarRange               *_mBarSlices; //DFCH
+       wxButton                *_btnCopy; //DFCH
+       wxButton                *_btnUndo; //DFCH
+       wxButton                *_btnRedo; //DFCH
        wxFlexGridSizer *_buttonsSizer; //DFCH
        wxFlexGridSizer *_FillSizer; //DFCH
        wxFlexGridSizer *_gConfigSizer; //DFCH