]> Creatis software - creaMaracasVisu.git/commitdiff
#3219 creaMaracasVisu Feature New Normal - vtk8itk4wx3-mingw64
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 14:41:26 +0000 (16:41 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 7 Aug 2018 14:41:26 +0000 (16:41 +0200)
19 files changed:
1  2 
bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx
bbtk/src/bbmaracasvisuImageActor.cxx
bbtk/src/bbmaracasvisuImageChangeInformation.cxx
lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualInteractorWindowLevel.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/baseFilterManualPaint.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkMPR3DDataViewer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk2DBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkBaseView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR2DView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx

index 5c513422088d8bcc769e309305fc8a33ead7763f,e31a64df99e6ab1b6b8a3e7b486148c8d1a3c0eb..a7c224d243ffd1bed0165e110559490f5fa8dcde
@@@ -1,8 -1,12 +1,12 @@@
  //===== 
  // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
  //===== 
+ #include "creaVtk_MACROS.h"
  #include "bbcreaMaracasVisuManualPaint_Model.h"
  #include "bbcreaMaracasVisuPackage.h"
  namespace bbcreaMaracasVisu
  {
  
@@@ -11,6 -15,8 +15,8 @@@ BBTK_BLACK_BOX_IMPLEMENTATION(ManualPai
  //===== 
  // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
  //===== 
  void ManualPaint_Model::Process()
  {
  
                
                if (bbGetInputByImagePoints()!=NULL)
                {
-                       int i,j,k;
  //                    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;
-                       for (i=0;i<dimX;i++) 
+                       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 (i%20==0)
+                               if (k%50==0)
                                {
-                                       printf("ManualPaint_Model %d%\n", (int)(i*100.0/dimX) );
+                                       printf("ManualPaint_Model %d%\n", (int)(k*100.0/dimZ) );
                                }
                                for (j=0;j<dimY;j++) 
                                {
-                                       for (k=0;k<dimZ;k++) 
+                                       for (i=0;i<dimX;i++) 
                                        {
-                                               if ( bbGetInputByImagePoints()->GetScalarComponentAsDouble(i,j,k, 0)>0)
+                                               GETVALUE_VTK_CREA(vBIP,pBIP,sTBIP)
+                                               if (vBIP>0)
                                                {
-                                                       if (bbGetInputImage2()->GetScalarComponentAsDouble(i,j,k, 0)==0)
+                                                       GETVALUE_VTK_CREA(vI2,pI2,sTI2)
+                                                       if (vI2==0)
                                                        {
                                                                manualpaintmodel->PaintImage(i,j,k);
-                                                       } // bbGetInputImage2           
-                                               } // GetScalarComponentAsDouble                                         
-                                       }// for k
+                                                       } // vI2                
+                                               } // vBIP 
+                                               pBIP = pBIP + sSBIP;                            
+                                               pI2  = pI2  + sSI2;                             
+                                       }// for i
                                }// for j
-                       }// for i
+                       }// for k
                        printf("ManualPaint_Model %d%\n", 100 );
                } // if ByImagePoints
         } else {
index d640d8d2a30877d44af57e4d128ffc9a55c6e0ea,40b3f246fecf3c9d9592807c411964badde4d7f5..34c0fd7754dc182e1b025dd1fdf521540ec9812f
  #include "bbcreaMaracasVisuPackage.h"
  
  #include "vtkImageShiftScale.h" 
+ #include <vtkLookupTable.h>
+ #include <vtkColorTransferFunction.h>
+ #include <vtkImageMapToColors.h>
+ #include <vtkImageMapper3D.h>
+ #include <vtkImageProperty.h>
  
  namespace bbcreaMaracasVisu
  {
@@@ -36,33 -41,93 +41,94 @@@ BBTK_BLACK_BOX_IMPLEMENTATION(ImageActo
  void ImageActor::Process()
  {
  
+ printf("EED ImageActor::Process Start\n");
                //JCP 04/04/09
                vtkRenderer *render                             = bbGetInputRenderer();
                vtkImageData *img                               = bbGetInputIn();
                vtkLinearTransform* transform   = bbGetInputTransform();
 -
 -              if(img != NULL)
++                              
++                              
++      if(img != NULL)
+               {
+                       if (bbGetInputLookupTable()==NULL)
+                       {
+                               imageactor->SetInput( img );    
+                       } else {
+ /*
+                               vtkLookupTable *table = vtkLookupTable::New();
+                               table->SetRange(0, 1000); // image intensity range
+                               table->SetValueRange(0.0, 1.0); // from black to white
+                               table->SetSaturationRange(0.0, 0.0); // no color saturation
+                               table->SetRampToLinear();
+                               table->Build();
+   double rgba[4];
+   table->GetTableValue(0,rgba);
+   rgba[3]=0;
+   table->SetTableValue(0,rgba);
+ */
  
-               if(img != NULL){
-                       
- //EED 2017-01-01 Migration VTK7
- #if VTK_MAJOR_VERSION <= 5
-                       imageshiftscale->SetInput( img );       
- #else
-                       imageshiftscale->SetInputData( img );   
- #endif
-                       imageshiftscale->SetOutputScalarTypeToUnsignedChar();   
- //EED 2017-01-01 Migration VTK7
- #if VTK_MAJOR_VERSION <= 5
-                       imageactor->SetInput( imageshiftscale->GetOutput() );   
- #else
-                       imageshiftscale->Update();
-                       imageactor->SetInputData( imageshiftscale->GetOutput() );       
- #endif
-                       if (transform!=NULL){
+ /*
+       vtkLookupTable *table = vtkLookupTable::New();
+          table->SetTableRange (0, 2000);
+          table->SetHueRange (1, 0);
+          table->SetSaturationRange (1, 1);
+          table->SetValueRange (1, 1);
+          table->Build(); //effective built
+ */
+ /*
+ vtkColorTransferFunction *table = vtkColorTransferFunction::New();
+ table->SetColorSpaceToHSV();
+     table->HSVWrapOff();
+     table->AddHSVSegment(0.0, 0.6, 1.0, 1.0,
+                        1.0, 0.0, 1.0, 1.0);
+     table->SetNanColor(1.0, 0.0, 1.0);
+ */
+ /* 
+ printf("EED ImageActor::Process  Warnning ***************************Not here this code *");
+ vtkLookupTable *table = vtkLookupTable::New();
+   table->SetNumberOfTableValues(1000);
+   table->SetRange(0, 1000);
+   table->Build();
+   double rgba1[4];
+       double rgba2[4];
+       for (int iLookTable = 0; iLookTable<500; iLookTable++)
+                       {
+                               table->GetTableValue(      iLookTable, rgba1);
+                               table->GetTableValue(1000-1-iLookTable, rgba2);
+                               table->SetTableValue(1000-1-iLookTable , rgba1[0],rgba1[1],rgba1[2],rgba1[3]);
+                               table->SetTableValue(      iLookTable , rgba2[0],rgba2[1],rgba2[2],rgba2[3]);
+                       } // for iLookTable     
+   double rgba[4];
+   table->GetTableValue(0,rgba);
+   rgba[3]=0;
+   table->SetTableValue(0,rgba);
+ */
+                               vtkImageMapToColors *color = vtkImageMapToColors::New();
+                               color->SetLookupTable( bbGetInputLookupTable() );
+ //                            color->SetLookupTable( table );
+                               color->PassAlphaToOutputOn();
+ //                            imageshiftscale->SetInput( img );
+ //                            imageshiftscale->SetOutputScalarTypeToUnsignedChar();
+ //                            color->SetInput( imageshiftscale->GetOutput() );
+                               color->SetInput( img );
+                               color->Update();
+                               imageactor->GetMapper()->SetInput( color->GetOutput() );
+                               imageactor->GetProperty()->SetInterpolationTypeToNearest();
+                       }
+                       if (transform!=NULL)
+                       {
                          imageactor->SetUserTransform( transform );    
                        } // transform
-                       if(render != NULL ){
-                               render->AddActor( imageactor );
+                       if(render != NULL )
+                       {
+ //                            render->AddActor( imageactor );
                        } // render
                        bbSetOutputOut(imageactor);
                } // img
                                bbGetInputRenderer()->AddActor( imageactor );
                }
                
+               imageactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
                bbSetOutputOut(imageactor);
+ printf("EED ImageActor::Process End\n");
        
  }
  void ImageActor::bbUserSetDefaultValues()
  {
-     firsttime = true;
-     imageactor = NULL;
+     firsttime         = true;
+     imageactor        = NULL;
      bbSetInputIn(NULL);
+ //    bbSetInputType(0);
+     bbSetInputOpacity(1);
      bbSetInputTransform(NULL);
      bbSetInputRenderer(NULL);
-   
+     bbSetInputLookupTable(NULL);
  }
  
        
        //-----------------------------------------------------------------     
        void ImageActor::bbUserInitializeProcessing()
        {
-               imageactor = vtkImageActor::New();
+               imageactor              = vtkImageActor::New();
                imageshiftscale = vtkImageShiftScale::New();
        }
        
index 4a9c2d3967aad942d70d73f6d01df40ab862d8b4,b956413ec6464a5ec823f63f58958306be973b12..f32c600b64234a71e479fa267a9e330576a63b1b
@@@ -32,9 -32,10 +32,10 @@@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMarac
  BBTK_BLACK_BOX_IMPLEMENTATION(ImageChangeInformation,bbtk::AtomicBlackBox);
  void ImageChangeInformation::Process()
  {
-       int ext[6];
-       double spc[3];
-       vtkImageData* img = bbGetInputIn();
+       int                     ext[6];
+       double                  spc[3];
+       double                  origin[3];
+       vtkImageData    *img = bbGetInputIn();
        if(img!=NULL)
        {
                if(mchange != NULL)
                }
                mchange = vtkImageChangeInformation::New();
                img->GetExtent( ext );  
-               double origin[3];
-               origin[0]=0.0;
-               origin[1]=0.0;
-               origin[2]=0.0;
-               img->SetOrigin(origin);         
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                mchange->SetInput( img );
- //EED 2016 15 06
- //            mchange->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
-               mchange->SetOutputOrigin (0, 0, 0);
 +#else
 +              mchange->SetInputData( img );
 +#endif
 +
                mchange->SetOutputExtentStart(0,0,0);
                if (bbGetInputNewSpacing().size()==3)
                {
                        spc[2] = bbGetInputNewSpacing()[2];
                        mchange->SetOutputSpacing( spc[0] , spc[1] , spc [2] );    //spacing
                }
+               if (bbGetInputNewOrigin().size()==3)
+               {
+                       if ( (bbGetInputNewOrigin()[0]==-1) && (bbGetInputNewOrigin()[1]==-1) && (bbGetInputNewOrigin()[2]==-1) )
+                       {
+                               img->GetOrigin( origin );       
+                       } else {
+                               origin[0] = bbGetInputNewOrigin()[0];
+                               origin[1] = bbGetInputNewOrigin()[1];
+                               origin[2] = bbGetInputNewOrigin()[2];
+                       }
+               } else {
+                       origin[0] = 0;
+                       origin[1] = 0;
+                       origin[2] = 0;
+               }
+               mchange->SetOutputOrigin( origin );
+               mchange->Modified();    //important
                mchange->Update();    //important
                bbSetOutputOut( mchange->GetOutput() );
-       } // img
+       }  // if img
++
  }
  
  void ImageChangeInformation::bbUserSetDefaultValues()
  {
-   mchange = NULL;
-    bbSetOutputOut( NULL);
-    bbSetInputIn(NULL);
+       mchange = NULL;
+       bbSetOutputOut( NULL);
+       bbSetInputIn(NULL);
  }
  
  void ImageChangeInformation::bbUserInitializeProcessing()
index 2947bdc03f6586de3c99d7f84d4e5ec81bb47340,c08f5d977fa6307339d3bcfb6c9b189681d9a98d..801078958158d57a1b217ec054d5fc78c39355d3
@@@ -51,14 -51,7 +51,14 @@@ void ContourExtractData::SetImage( vtkI
  
        // RaC 20-11-09 Changes in InitLstContoursLinesYPoints
        int ext[6];
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        this->imagedata->GetWholeExtent(ext);
 +#else
 +      this->imagedata->GetExtent(ext);
 +#endif
 +
        _sizeImageY = ext[3]-ext[2]+1;
  
        // init vtk image result : valuesImage maskImage  
@@@ -394,10 -387,13 +394,13 @@@ void ContourExtractData::PutVtkImageDat
  {
        unsigned short *pValue;
        unsigned short *pMask;
-       pValue  = (unsigned short *)imagedataValueResult->GetScalarPointer(x,y,z);
-       pMask   = (unsigned short *)imagedataMaskResult->GetScalarPointer(x,y,z);
-       *pMask  = 255;
-       *pValue = (unsigned short)value;
+ //EED 2017-12-18
+       imagedataValueResult->SetScalarComponentFromDouble(x,y,z,0,value);
+       imagedataMaskResult->SetScalarComponentFromDouble(x,y,z,0,255);
+ //    pValue  = (unsigned short *)imagedataValueResult->GetScalarPointer(x,y,z);
+ //    *pValue = (unsigned short)value;
+ //    pMask   = (unsigned char *)imagedataMaskResult->GetScalarPointer(x,y,z);
+ //    *pMask  = 255;
  }
  
  //------------------------------------------------------------------------
@@@ -414,8 -410,8 +417,8 @@@ void ContourExtractData::ResetImageResu
                imagedataValueResult->GetExtent(ext);
  
                int size = (ext[1]-ext[0]+1) * (ext[3]-ext[2]+1); 
-               memset(pValue,0,size*2);
-               memset(pMask,0,size*2);
+               memset(pValue,0, size*imagedataValueResult->GetScalarSize() );
+               memset(pMask,0, size*imagedataMaskResult->GetScalarSize() );
        } // if
  }
  
@@@ -467,15 -463,8 +470,15 @@@ void ContourExtractData::CalculateImage
  
                imagedataValueResult->Modified();
                imagedataMaskResult->Modified();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                imagedataValueResult->Update();
                imagedataMaskResult->Update();
 +#else
 +  //...
 +#endif
 +
        } // if
  
  }
@@@ -572,36 -561,29 +575,53 @@@ void ContourExtractData::InitVtkImagesR
                imagedataValueResult->Delete();
        }
        imagedataValueResult = vtkImageData::New();
++<<<<<<< HEAD
 +      //        imagedataValueResult->SetScalarType(scalartype);
++=======
+ //EED 2017-12-18
+       imagedataValueResult->SetScalarType(scalartype);
+       //imagedataValueResult->SetScalarTypeToUnsignedShort();
++>>>>>>> master
        imagedataValueResult->SetSpacing(spc);
        imagedataValueResult->SetDimensions( newDim );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +      imagedataValueResult->SetScalarTypeToUnsignedShort();
        imagedataValueResult->AllocateScalars();
 +#else
 +      imagedataValueResult->AllocateScalars(VTK_UNSIGNED_SHORT,1);
 +#endif
 +
  
        if (imagedataMaskResult!=NULL)
        {
                imagedataMaskResult->Delete();
        }
        imagedataMaskResult  = vtkImageData::New();
++<<<<<<< HEAD
 +      //        imagedataMaskResult->SetScalarType(scalartype);
++=======
+ //EED 2017-12-18
+ //    imagedataMaskResult->SetScalarType(scalartype);
+ //    imagedataMaskResult->SetScalarTypeToUnsignedShort();
+       imagedataMaskResult->SetScalarTypeToUnsignedChar();
++>>>>>>> master
        imagedataMaskResult->SetSpacing(spc);
        imagedataMaskResult->SetDimensions( newDim );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +      imagedataMaskResult->SetScalarTypeToUnsignedShort();
        imagedataMaskResult->AllocateScalars();
 +#else
 +      imagedataMaskResult->AllocateScalars(VTK_UNSIGNED_SHORT,1);
 +#endif
 +
  }
  
  
index d94117402b086b1f0f1d43fbf4d414cf9d673641,07634e33399c311890428c732c515f1a07893f09..d4f87f0c98a824efecec9ceee0859d85c719fcbe
@@@ -168,6 -168,10 +168,10 @@@ double ColorLayerImageView::GetBaseColo
  //----------------------------------------------------------------------------
  void ColorLayerImageView::SetGreyLevelBoundaries(std::vector<double> & grey_level_boundary)
  {
+  _grey_level_boundary = grey_level_boundary;
+ //EED 2017 / 11 / 27
+ /*
    // The size must be greater than or equal to 2 (at least min and max must exist).
    if ( grey_level_boundary.size() >= 2)
      {
    // Otherwise, an exception should be thrown.
    else if (grey_level_boundary.size() != 0)
      std::cout << "CM ColorLayerImageView::SetGreyLevelBoundaries : ERROR!!! The grey level boundaries vector has an inconsistent size. It must be of a size greater than or equal to 2 (at least min and max must exist), but its size is: " << grey_level_boundary.size() << ". Therefore, the histogram will be equally split." << std::endl;
+ */
  }
  
  //----------------------------------------------------------------------------
@@@ -302,6 -308,7 +308,7 @@@ void ColorLayerImageView::SetDefaultBas
  //----------------------------------------------------------------------------
  void ColorLayerImageView::ConfigLookupTable()  // virtual
  {
    // CM 2014
    // EED       28/01/2015     
    // Grey level extrema retrieved from the image grey level extrema.
                                end     = GrayLevel_TO_colorTableIndex( GetGreyLevelBoundaries(iColor+1) );  
                        t1              = _transparence_level_boundary[iColor];
                                t2              = _transparence_level_boundary[iColor+1];
- printf("EED ColorLayerImageView::ConfigLookupTable   Make something with transparence \n");
//printf("EED ColorLayerImageView::ConfigLookupTable   Make something with transparence \n");
                                FillColorTable( start,end, r1,g1,b1, r2,g2,b2, t1,t2 );
                        }// for 
                } //if                          
  //  thresholdTable->SetBelowRangeColor(0,0,0,0);      
  
    thresholdTable->Build( );
    //EO CM EED
  }
  
  //----------------------------------------------------------------------------
  int ColorLayerImageView::GrayLevel_TO_colorTableIndex( double VALUE )
  {
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
    GetImage()->Update();
 +#else
 +  //...
 +#endif
 +
 +
 +
  
  //EED 20 oct 2015
  //  GetImage()->GetScalarRange(_range);
index 316f7851eb5561ed15c7bd9fed4fd6abb2378a97,51409832683b8cddf47972ce4209b37fec09ba04..9078a7e5203fac78717151d040a81f8ef8928ad2
@@@ -32,7 -32,7 +32,7 @@@
  
  #include "wxMPRBaseData.h"
  #include "wxVtk2DBaseView.h"
 -#include "wxVTKRenderWindowInteractor.h"
 +#include "creawxVTKRenderWindowInteractor.h"
  #include "vtkTextProperty.h"
  
  
@@@ -97,6 -97,7 +97,7 @@@ LayerImageBase::LayerImageBase(
        _X                                              =       -1;
        _Y                                              =       -1;
        _Z                                              =       -1;
+       _opacity                                =       1;
        _thresholdTable                 =       NULL;
        _thresholdMapper                =       NULL;
        _scalarbarActor                 =       NULL;
@@@ -191,15 -192,8 +192,15 @@@ void LayerImageBase::SetImage(vtkImageD
        spcBase[5]=0;
  
        _image = image;
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        _image->Update();
        _image->GetWholeExtent(ext);
 +#else
 +      _image->GetExtent(ext);
 +#endif
 +
        dimensionOriginalLayer[0] = ext[1]-ext[0]+1;
        dimensionOriginalLayer[1] = ext[3]-ext[2]+1;
        dimensionOriginalLayer[2] = ext[5]-ext[4]+1;
                vtkImageData    *imagebase              =       GetwxVtkBaseView()->GetVtkBaseData()->GetImageData();
                if (imagebase!=NULL) 
                {       
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                        imagebase->GetWholeExtent(ext);
 +#else
 +                      imagebase->GetExtent(ext);
 +#endif
 +
                        dimBase[0]=ext[1]-ext[0]+1;                             
                        dimBase[1]=ext[3]-ext[2]+1;                             
                        dimBase[2]=ext[5]-ext[4]+1;                             
        _image->GetScalarRange( _range );
        _thresholdTable = vtkLookupTable::New();
  
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        _imageChangeInformation->SetInput(_image);
 +#else
 +      _imageChangeInformation->SetInputData(_image);
 +      _imageChangeInformation->Update();
 +#endif
 +
  }
  
  //------------------------------------------------------------------------------
@@@ -259,9 -238,9 +260,9 @@@ void LayerImageBase::SetSpcOriginalLaye
  //------------------------------------------------------------------------------
  void LayerImageBase::SetNewSpacingLayer(double spc[3])
  {
 -      _newSpcLayer[0]=spc[0];
 -      _newSpcLayer[1]=spc[1];
 -      _newSpcLayer[2]=spc[2];
 +      _newSpcLayer[0] = spc[0];
 +      _newSpcLayer[1] = spc[1];
 +      _newSpcLayer[2] = spc[2];
        _imageChangeInformation->SetOutputSpacing( _newSpcLayer );  
  
  }
@@@ -469,6 -448,8 +470,8 @@@ void LayerImageBase::onThreshold(
                                } else {
                                        _scalarbarActor->SetDisplayPosition(0,0);
                                }
+                               _scalarbarActor->SetHeight(0.4);        //default  0.8
+                               _scalarbarActor->SetWidth(0.08);    //default  0.17
  
                                _thresholdActor->SetOpacity( 1 );
                                _thresholdActor->InterpolateOn(  );
                }  // !GetActorPresent()
  
                ConfigLookupTable();  // virtual method
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _imageReslicer->SetInput( GetImage() );
 +#else
 +              _imageReslicer->SetInputData( GetImage() );
 +#endif
 +
                _imageReslicer->SetInformationInput( GetImage() );
  
                if (directionViewer==0)
                _imageReslicer->SetInterpolationModeToNearestNeighbor();
                _imageReslicer->Modified();
  
 -
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +              // ..
 +#else
 +              _imageReslicer->Update();
 +#endif
                vtkImageData *img = _imageReslicer->GetOutput();
  //            img->Update();
  //            img->UpdateInformation();
 -
  //            _thresholdTable->Update();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _thresholdMapper->SetInput( img );
 +#else
 +              _thresholdMapper->SetInputData( img );
 +#endif
 +
                _thresholdMapper->SetLookupTable( _thresholdTable );
 +
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _thresholdActor->SetInput( _thresholdMapper->GetOutput() );
 -
 +#else
 +              _thresholdMapper->Update();
 +              _thresholdActor->SetInputData( _thresholdMapper->GetOutput() );
 +#endif
 +              
+               _thresholdActor->SetOpacity(_opacity);
                _scalarbarActor->SetLookupTable( _thresholdTable );
  //            _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() );
                _scalarbarActor->SetTitle("Value");
                _scalarbarActor->SetNumberOfLabels(4);
                int fontsize = _scalarbarActor->GetLabelTextProperty()->GetFontSize();
                _scalarbarActor->GetLabelTextProperty()->SetFontSize(fontsize/2);
 -
  //            _scalarbarActor->SetTextPad(4);  ??
 -
 -
                } // _image
  }
  
@@@ -600,6 -559,8 +604,8 @@@ void LayerImageBase::onThresholdChangeO
        {
                _thresholdActor->SetOpacity(opacity/100.0);
        }
+ // EED 2017-12-17
+       _opacity = (double)opacity/100.0;
  }
  
  //----------------------------------------------------------------------------
@@@ -612,7 -573,7 +618,7 @@@ void LayerImageBase::onThresholdRemove(
                baseView->GetRenderer()->RemoveActor( _scalarbarActor );
  
                _actorPresent = false;
 -      }
 +      }  // if _actorPresent
  }
  
  //----------------------------------------------------------------------------
@@@ -637,5 -598,7 +643,5 @@@ void LayerImageBase::GetImageScalarRang
        _range[1]=max;
  }
  
 -
 -
  // EOF
  
index 2953844359ef8ae225d078ba9985b0fb0083e5c4,d221713dba5553bac5ab3eb6d48f68398f77254e..3cdf1e0b73b9c7108ad9da1b5a4df5cd1e74fc8d
@@@ -34,7 -34,7 +34,7 @@@
      wxPanel   *panel                                  = this;
      wxSizer *sizer                                    = NULL;
  
-       if (mtype==0)
+       if ((mtype==0) || (mtype==3))
        {
                // Widget interface
                askPointLabel                                   = new wxStaticText(panel, -1, _T("Point label :")); // JPR
                wxButton *btnEraseLastPoint             = new wxButton( panel, -1, _T("Erase Last point"));
                wxButton *btnErasePoint                 = new wxButton( panel, -1, _T("Erase point"));
                wxButton *btnDeleteAllPoints    = new wxButton( panel, -1, _T("Delete all points"));
-               wxButton *btnSavePoints                 = new wxButton( panel, -1, _T("Save points"));
-               wxButton *btnLoadPoints                 = new wxButton( panel, -1, _T("Load points"));
+               wxButton *btnSavePoints                 = NULL;
+               wxButton *btnLoadPoints                 = NULL;
+               if (mtype==0)
+               {
+                       btnSavePoints                           = new wxButton( panel, -1, _T("Save points"));
+                       btnLoadPoints                           = new wxButton( panel, -1, _T("Load points"));
+               }
                txtNrPoints                                             = new wxStaticText(panel,-1, _T(" "));
  
                //NTU: Sliders for opacity and radio change
                Connect(btnEraseLastPoint->GetId()      , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnEraseLastPoint);
                Connect(btnErasePoint->GetId()          , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnErasePoint);
                Connect(btnDeleteAllPoints->GetId()     , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnDeleteAllPoints);
-               Connect(btnSavePoints->GetId()          , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnSavePoints);
-               Connect(btnLoadPoints->GetId()          , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnLoadPoints);
+               if (mtype==0)
+               {
+                       Connect(btnSavePoints->GetId()          , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnSavePoints);
+                       Connect(btnLoadPoints->GetId()          , wxEVT_COMMAND_BUTTON_CLICKED  , (wxObjectEventFunction) &WidgetShowNPoints::OnLoadPoints);
+               }
                //NTU: Slider events
                Connect(sdrOpacity->GetId()                     , wxEVT_COMMAND_SLIDER_UPDATED  , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
                Connect(sdrRadio->GetId()                       , wxEVT_COMMAND_SLIDER_UPDATED  , (wxObjectEventFunction) &WidgetShowNPoints::UpdatePoints);
                sizer1->Add(sdrOpacity,1,wxGROW );
                sizer1->Add(txRadio);
                sizer1->Add(sdrRadio,1,wxGROW );
-               sizer1->Add(btnSavePoints);
-               sizer1->Add(btnLoadPoints);
+               if (mtype==0)
+               {
+                       sizer1->Add(btnSavePoints);
+                       sizer1->Add(btnLoadPoints);
+               }
                sizer = sizer1;
        }
  
@@@ -215,13 -225,6 +225,13 @@@ void WidgetShowNPoints::RefreshPoint(in
        lstActorsSphere[id]->GetProperty()->SetOpacity( mopacity );
        lstSourceSphere[id]->SetRadius( radio );
  
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +      // ..
 +#else
 +      lstSourceSphere[id]->Update();
 +#endif
 +
        lstActorsText[id]->SetInput( label.c_str()  );
        lstActorsText[id]->SetPosition(  radio+spc[0]*x , spc[1]*y , spc[2]*z );
  }
@@@ -248,15 -251,7 +258,15 @@@ void WidgetShowNPoints::AddVtkPoint(
        //NTU: For updating points
        lstSourceSphere.push_back(vtksphere);
        vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        sphereMapper->SetInput( vtksphere->GetOutput() );
 +#else
 +      vtksphere->Update();
 +      sphereMapper->SetInputData( vtksphere->GetOutput() );
 +#endif
 +
        vtkActor *sphereActor   = vtkActor::New();
        sphereActor->SetMapper(sphereMapper);
        sphereActor->SetOrigin(0, 0, 0);
@@@ -361,9 -356,6 +371,9 @@@ void WidgetShowNPoints::OnInsertPoint (
  //------------------------------------------------------------------------
        void WidgetShowNPoints::OnSavePoints(wxCommandEvent& event)
        {
 +
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
                wxFileDialog* FD = new wxFileDialog( 0,
                                              _T("Save points .."),
                                              _T(""),
                                              _T("(*.xls)|*.xls"),
                                              wxSAVE | wxOVERWRITE_PROMPT,
                                              wxDefaultPosition);
 -              //EED
 +#else
 +              wxFileDialog* FD = new wxFileDialog( 0,
 +                                            _T("Save points .."),
 +                                            _T(""),
 +                                            _T(""),
 +                                            _T("(*.xls)|*.xls"),
 +                                            wxFD_SAVE | wxFD_OVERWRITE_PROMPT,
 +                                            wxDefaultPosition);
 +#endif
 +
 +
  
                int result_FD = FD->ShowModal();
                
  //------------------------------------------------------------------------
        void WidgetShowNPoints::OnLoadPoints(wxCommandEvent& event)
        {
 +
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
                wxFileDialog* FD = new wxFileDialog( 0,
                                               _T("Load points .."),
                                               _T(""),
                                               _T("(*.xls)|*.xls"),
                                               wxOPEN | wxFILE_MUST_EXIST,
                                               wxDefaultPosition);
 +#else
 +              wxFileDialog* FD = new wxFileDialog( 0,
 +                                             _T("Load points .."),
 +                                             _T(""),
 +                                             _T(""),
 +                                             _T("(*.xls)|*.xls"),
 +                                             wxFD_OPEN | wxFD_FILE_MUST_EXIST,
 +                                             wxDefaultPosition);
 +#endif
                int i;
                //EED
                int result_FD = FD->ShowModal();
index 9e0945604c29068e0e5a131b2d70cace9c7f3aa4,f64909ec676b36ee75168fb100e551a5ec488ecc..8ecfd9e6e32c385c490dec4096200e2682867a84
@@@ -52,34 -52,36 +52,36 @@@ bool manualInteractorWindowLevel::OnMou
        if (_stateWindowLevel==true)
        {
                int tmpPx,tmpPy;
 -              wxVTKRenderWindowInteractor *wxVTKiren;
 +              crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition( tmpPx , tmpPy );
                double colorWin;
                double colorLev;
-               
                vtkImageData* imgrange = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->GetVtkBaseData()->GetImageData();
-               if(imgrange != NULL){
+               if(imgrange != NULL)
+               {
                        double* scalarrange = imgrange->GetScalarRange();
-                       double scalarr = scalarrange[1] - scalarrange[0];
+                       double scalarr;
+                       if (scalarrange[1] == scalarrange[0])
+                       {
+                               scalarr=scalarrange[1];
+                               if (scalarrange[1]==0) {scalarr=100;}
+                       } else {
+                               scalarr = scalarrange[1] - scalarrange[0];
+                       }
                        //std::cout<<"scalar r="<<scalarr<<std::endl;
                        int w, h;
                        ((wxWindow*)wxVTKiren)->GetSize(&w, &h);                        
                        double dw=w,dh=h;
                        double dx = (scalarr*( _backPx - tmpPx ))/dw;
                        double dy = (scalarr*( _backPy - tmpPy ))/dh;
                        //colorWin=_backWindow - (scalarr)*( _backPx - tmpPx );
                        colorWin=_backWindow - dx;
                        colorLev=_backLevel  + dy;
-               }else{
+               } else {
                        colorWin=_backWindow - 2*( _backPx - tmpPx );
                        colorLev=_backLevel  + 2*( _backPy - tmpPy );
                }
                if (colorWin<0)
                { 
                        colorWin=0;
                { 
                        colorWin=100000;
                }       
-               
  //EED 2 Nov 2012  This lets see negative values with the interaction of Window-Level Color
  //            if (colorLev<0)
  //            { 
  //                    colorLev=0;
- //            }
-               
+ //            }       
                if (colorLev>100000)
                { 
                        colorLev=100000;
                }
-               
                wxVtk2DBaseView *wxvtk2Dbaseview        = (wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView();
                vtkBaseData *vtkbasedata                        = wxvtk2Dbaseview->GetVtkBaseData();
-               
  //EED Borrame
  //            vtkImageViewer2 *vtkimageviewer2        = wxvtk2Dbaseview->_imageViewer2XYZ->GetVtkImageViewer2();              
  //            vtkimageviewer2->SetColorWindow(colorWin);
  //            vtkimageviewer2->SetColorLevel(colorLev);
-               
                vtkbasedata->SetColorWindow(colorWin);
-               vtkbasedata->SetColorLevel(colorLev);
-               
+               vtkbasedata->SetColorLevel(colorLev);           
                this->_vtkInteractorStyleBaseView->SetParent_refresh_waiting();
-               
  //            vtkimageviewer2->Render();
        }
        return true;
  }
  
@@@ -127,7 -120,7 +120,7 @@@ bool manualInteractorWindowLevel::OnMid
        if ((_vtkInteractorStyleBaseView->GetInteractor()->GetControlKey()==0) &&
                (_vtkInteractorStyleBaseView->GetInteractor()->GetShiftKey()==0) ){
                _stateWindowLevel       = true;
 -              wxVTKRenderWindowInteractor *wxVTKiren;
 +              crea::wxVTKRenderWindowInteractor *wxVTKiren;
                wxVTKiren = _vtkInteractorStyleBaseView->GetWxVtk2DBaseView()->GetWxVTKRenderWindowInteractor();
                wxVTKiren->GetEventPosition( _backPx , _backPy );
                _backWindow = ((wxVtk2DBaseView*)_vtkInteractorStyleBaseView->GetWxVtk2DBaseView())->_imageViewer2XYZ->GetVtkImageViewer2()->GetColorWindow();
index 4156a3d54492d2c5cb7394dd916002e6892a752f,8210bec46e5199ab49af3d6662136d626e43d62c..c1ac0be4a34e87cf4ff9be9940b921a9a507cada
@@@ -24,6 -24,7 +24,7 @@@
  # ------------------------------------------------------------------------ */
  
  #include "FillFilter.h"
+ #include "creaVtk_MACROS.h"
  
  FillFilter::FillFilter() 
  {
@@@ -31,6 -32,9 +32,9 @@@
        _distancefill           = 500;
        _limitRecursionFill = 50000;
        _auxImageFill           = NULL;
+       _maxXback                       = 0;
+       _maxYback                       = 0;
+       _maxZback                       = 0;
  }
  
  //---------------------------------------------------------------------------
@@@ -46,77 -50,86 +50,102 @@@ FillFilter::~FillFilter(
  void FillFilter::SetImages(vtkImageData *image,vtkImageData *image2) // virtual
  {
        baseFilterManualPaint::SetImages(image,image2);
-       if (_auxImageFill != NULL)
+       
+       if ((_maxX!=_maxXback) || (_maxY!=_maxYback) || (_maxZ!=_maxZback)) 
        {
-               _auxImageFill->Delete();
+               if (_auxImageFill != NULL)
+               {
+                       _auxImageFill->Delete();
+               }
+               _auxImageFill = vtkImageData::New();
+               _auxImageFill->SetDimensions(_maxX + 1, _maxY + 1, _maxZ + 1);
+               _auxImageFill->SetOrigin(0, 0, 0);
+               _auxImageFill->SetExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+               _auxImageFill->SetWholeExtent(0, _maxX, 0, _maxY, 0, _maxZ);
+               _auxImageFill->SetScalarTypeToUnsignedChar();
+               _auxImageFill->AllocateScalars();
+               _ptrAuxImageFill = (unsigned char       *)_auxImageFill->GetScalarPointer();
+               memset(_ptrAuxImageFill, 0, (_maxX+1) * (_maxY+1) * (_maxZ+1) );
        }
++
 +      _auxImageFill = vtkImageData::New();
 +      _auxImageFill->SetDimensions(_maxX + 1, _maxY + 1, _maxZ + 1);
 +      _auxImageFill->SetOrigin(0, 0, 0);
 +      _auxImageFill->SetExtent(0, _maxX, 0, _maxY, 0, _maxZ);
 +
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +      _auxImageFill->SetWholeExtent(0, _maxX, 0, _maxY, 0, _maxZ);
 +      _auxImageFill->SetScalarTypeToUnsignedChar();
 +      _auxImageFill->AllocateScalars();
 +#else
 +      _auxImageFill->AllocateScalars(VTK_UNSIGNED_CHAR,1);
 +#endif
 +
+       _maxXback=_maxX;
+       _maxYback=_maxY;
+       _maxYback=_maxZ;
  }
  
  //---------------------------------------------------------------------------
  void FillFilter::Run() // virtual
  {
+       long int ivi;
        if ((_px >= _minX) && (_px <= _maxX) && (_py >= _minY) && (_py <= _maxY)
-                       && (_pz >= _minZ) && (_pz <= _maxZ)) {
-               _graylevelbasefill = _image->GetScalarComponentAsDouble(_px, _py, _pz,
-                               0);
-               _pxfill = _px;
-               _pyfill = _py;
-               _pzfill = _pz;
-               _distbasefill = _distancefill * _distancefill;
-               _countRecursiveFill = 0;
-               _countRecursiveFillProblem = 0;
-               _countProgressingFill = 0;
-               unsigned char *pImage =
-                               (unsigned char *) _auxImageFill->GetScalarPointer();
-               _usingAuxImageFill = false;
              memset(pImage, 0, _maxX * _maxY * _maxZ);
-               FillToolRecursive(_px, _py, _pz);
//            printf("--\n");
+                       && (_pz >= _minZ) && (_pz <= _maxZ)) 
+       {
+               _graylevelbasefill                      = _image->GetScalarComponentAsDouble(_px, _py, _pz,0);
+               _pxfill                                         = _px;
+               _pyfill                                         = _py;
+               _pzfill                                         = _pz;
+               _distbasefill                           = _distancefill * _distancefill;
+               _countRecursiveFill             = 0;
+               _countRecursiveFillProblem      = 0;
+               _countProgressingFill           = 0;
+               _usingAuxImageFill                      = false;
+               ivi                                             = _px + _py*(_maxX+1) + _pz*(_maxX+1)*(_maxY+1);  // index vector image
+ //EED01
//            FillToolRecursive(_px, _py, _pz);
+               FillToolRecursive(_px, _py, _pz, ivi);
              unsigned char *pImage;
+               pImage                                          = (unsigned char *) _auxImageFill->GetScalarPointer();
                int ii, jj, kk;
-               while (_countRecursiveFillProblem != 0) {
-                       _countRecursiveFillProblem = 0;
-                       _usingAuxImageFill = true;
-                       for (ii = 0; ii <= _maxX; ii++) {
-                               for (jj = 0; jj <= _maxY; jj++) {
-                                       for (kk = 0; kk <= _maxZ; kk++) {
-                                               pImage =
-                                                               (unsigned char *) _auxImageFill->GetScalarPointer(
-                                                                               ii, jj, kk);
-                                               if ((*pImage) == 1) {
-                                                       FillToolRecursive(ii, jj, kk);
-                                               }
-                                       } // for kk
+               ivi                                                     = 0;
+               while (_countRecursiveFillProblem != 0) 
+               {
+                       _countRecursiveFillProblem  = 0;
+                       _usingAuxImageFill                      = true;
+                       for (kk = 0; kk <= _maxZ; kk++) 
+                       {
+                               for (jj = 0; jj <= _maxY; jj++) 
+                               {
+                                       for (ii = 0; ii <= _maxX; ii++) 
+                                       {
+                                               if (pImage[ivi] == 1) 
+                                               {
+ //EED01
+ //                                                    FillToolRecursive(ii, jj, kk);
+                                                       FillToolRecursive(ii, jj, kk, ivi);
+                                               }  // if
+                                               ivi++;
+                                       } // for ii
                                } // for jj
-                       } //for ii
+                       } //for kk
  //                    printf("-\n");
                } // while
        } //if _minX _maxX _minY _maxY _minZ _maxZ
  }
  
  //---------------------------------------------------------------------------
- void FillFilter::FillToolRecursive(int px, int py, int pz) 
+ void FillFilter::FillToolRecursive(int px, int py, int pz,long int ivi
  {
-       _countRecursiveFill++;
+ 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)             
  
+       _countRecursiveFill++;
        _countProgressingFill++;
        if (_countProgressingFill > 200000) 
        {
                if (_usingAuxImageFill == true) 
                {
                        this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH
-                       _auxImageFill->SetScalarComponentFromFloat(px, py, pz, 0, 0);
+ //EED01
+ //                    _auxImageFill->SetScalarComponentFromFloat(px, py, pz, 0, 0);
+                       _ptrAuxImageFill[ ivi ]=0;
                }
-               _tmpDistfill = (px - _pxfill) * (px - _pxfill)
-                               + (py - _pyfill) * (py - _pyfill)
-                               + (pz - _pzfill) * (pz - _pzfill);
-               _tmpiglfill     = _image->GetScalarComponentAsDouble(px, py, pz, 0);
+               _tmpDistfill = (px-_pxfill)*(px-_pxfill)
+                                       +  (py-_pyfill)*(py-_pyfill)
+                                       +  (pz-_pzfill)*(pz-_pzfill);
+ //if (_countRecursiveFill >1 )
+ //{
+ //    printf("   -> %d %d %d   cr=%ld  r=%f\n", px,py,pz,_countRecursiveFill , _tmpDistfill);
+ //}
+  
+ //EED01 
+ //            _tmpiglfill     = _image->GetScalarComponentAsDouble(px, py, pz, 0);
+ GETVALUE2_VTK_CREA(_tmpiglfill,p_image,st_image,ivi)  
  
                if (_image2!=NULL)
                {
-                       _tmpiglfill2    =       _image2->GetScalarComponentAsDouble(px, py, pz, 0);
+ //EED01
+ //                    _tmpiglfill2    =       _image2->GetScalarComponentAsDouble(px, py, pz, 0);
+ GETVALUE2_VTK_CREA(_tmpiglfill2,p_image2,st_image2,ivi)       
                } else {
                        _tmpiglfill2    =       _tmpiglfill;
                }
  
-               float grayLBFMTOL = _graylevelbasefill - _tolerancefill;
-               float grayLBFPTOL = _graylevelbasefill + _tolerancefill;
-               bool isInRange = false;
+               float grayLBFMTOL       = _graylevelbasefill - _tolerancefill;
+               float grayLBFPTOL       = _graylevelbasefill + _tolerancefill;
+               bool isInRange          = false;
                //DFCH
                if (_RangeMin <= grayLBFMTOL && _RangeMax >= grayLBFPTOL) {
-                       isInRange = true;
+                       isInRange               = true;
                } //fi esle
                else if (_RangeMin > grayLBFMTOL && _RangeMax >= grayLBFPTOL) {
-                       grayLBFMTOL = _RangeMin;
-                       isInRange = true;
+                       grayLBFMTOL     = _RangeMin;
+                       isInRange               = true;
                } //fi esle
                else if (_RangeMin <= grayLBFMTOL && _RangeMax < grayLBFPTOL) {
-                       grayLBFPTOL = _RangeMax;
-                       isInRange = true;
-               } //fi esle
-               else if ((_RangeMin <= _graylevelbasefill)
-                               && (_graylevelbasefill <= _RangeMax)) {
-                       grayLBFMTOL = _RangeMin;
-                       grayLBFPTOL = _RangeMax;
-                       isInRange = true;
+                       grayLBFPTOL     = _RangeMax;
+                       isInRange               = true;
                } //fi esle
+               else if ((_RangeMin <= _graylevelbasefill) && (_graylevelbasefill <= _RangeMax)) {
+                       grayLBFMTOL     = _RangeMin;
+                       grayLBFPTOL     = _RangeMax;
+                       isInRange               = true;
+               } //fi Range
  
                if (isInRange) 
                {
                        this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH
                        if (_image2!=NULL)
                        {
-                               _image2->SetScalarComponentFromFloat(px, py, pz, 0,(float) _graylevel);
+ //EED01
+ //                            _image2->SetScalarComponentFromFloat(px, py, pz, 0,(float) _graylevel);
+ SETVALUE2_VTK_CREA(_graylevel,p_image2,st_image2,ivi)
                        } else {
-                               _image->SetScalarComponentFromFloat(px, py, pz, 0,(float) _graylevel);
+ //EED01
+ //                            _image->SetScalarComponentFromFloat(px, py, pz, 0,(float) _graylevel);
+ SETVALUE2_VTK_CREA(_graylevel,p_image,st_image,ivi)
                        }
  
                        if (_countRecursiveFill < _limitRecursionFill) 
                                        {
                                                //FillToolRecursive(px+1,py,pz);
                                                //FillToolRecursive(px-1,py,pz);
-                                               FillToolRecursive(px, py + 1, pz);
-                                               FillToolRecursive(px, py - 1, pz);
-                                               FillToolRecursive(px, py, pz - 1);
-                                               FillToolRecursive(px, py, pz + 1);
+                                               FillToolRecursive(px, py + 1, pz, ivi+_OneLine  );
+                                               FillToolRecursive(px, py - 1, pz, ivi-_OneLine  );
+                                               FillToolRecursive(px, py, pz - 1, ivi-_OnePlane );
+                                               FillToolRecursive(px, py, pz + 1, ivi+_OnePlane );
                                        }
                                        if (_direction == 1) // XZ
                                                        {
-                                               FillToolRecursive(px + 1, py, pz);
-                                               FillToolRecursive(px - 1, py, pz);
+                                               FillToolRecursive(px + 1, py, pz, ivi+_OneColumn);
+                                               FillToolRecursive(px - 1, py, pz, ivi-_OneColumn);
                                                //FillToolRecursive(px,py+1,pz);
                                                //FillToolRecursive(px,py-1,pz);
-                                               FillToolRecursive(px, py, pz - 1);
-                                               FillToolRecursive(px, py, pz + 1);
+                                               FillToolRecursive(px, py, pz - 1, ivi-_OnePlane );
+                                               FillToolRecursive(px, py, pz + 1, ivi+_OnePlane );
                                        }
                                        if (_direction == 2) // XY
                                                        {
-                                               FillToolRecursive(px + 1, py, pz);
-                                               FillToolRecursive(px, py + 1, pz);
-                                               FillToolRecursive(px - 1, py, pz);
-                                               FillToolRecursive(px, py - 1, pz);
+                                               FillToolRecursive(px + 1, py, pz, ivi+_OneColumn);
+                                               FillToolRecursive(px, py + 1, pz, ivi+_OneLine);
+                                               FillToolRecursive(px - 1, py, pz, ivi-_OneColumn);
+                                               FillToolRecursive(px, py - 1, pz, ivi-_OneLine);
                                                //FillToolRecursive(px,py,pz-1);
                                                //FillToolRecursive(px,py,pz+1);
                                        }
                                } else { // 3D
-                                       FillToolRecursive(px + 1, py, pz);
-                                       FillToolRecursive(px - 1, py, pz);
-                                       FillToolRecursive(px, py + 1, pz);
-                                       FillToolRecursive(px, py - 1, pz);
-                                       FillToolRecursive(px, py, pz - 1);
-                                       FillToolRecursive(px, py, pz + 1);
+                                       FillToolRecursive(px + 1, py, pz, ivi+_OneColumn );
+                                       FillToolRecursive(px - 1, py, pz, ivi-_OneColumn );
+                                       FillToolRecursive(px, py + 1, pz, ivi+_OneLine );
+                                       FillToolRecursive(px, py - 1, pz, ivi-_OneLine );
+                                       FillToolRecursive(px, py, pz - 1, ivi-_OnePlane );
+                                       FillToolRecursive(px, py, pz + 1, ivi+_OnePlane );
                                } // 2D 3D
  
                        } //_countRecursiveFill
                } // _graylevel
  
-               if ((_auxGrayLevelValidationFill == true)
-                               && (_countRecursiveFill >= _limitRecursionFill)) 
+               if ((_auxGrayLevelValidationFill == true) && (_countRecursiveFill >= _limitRecursionFill)) 
                {
                        _countRecursiveFillProblem++;
                        if (_2D3D == 0) //2D
-                                       {
+                       {
                                if (_direction == 0) // YZ
-                                               {
+                               {
                                        //SetAuxImageFill(px+1,py,pz);
                                        //SetAuxImageFill(px-1,py,pz);
-                                       SetAuxImageFill(px, py + 1, pz);
-                                       SetAuxImageFill(px, py - 1, pz);
-                                       SetAuxImageFill(px, py, pz - 1);
-                                       SetAuxImageFill(px, py, pz + 1);
+                                       SetAuxImageFill(px, py + 1, pz,ivi+_OneLine);
+                                       SetAuxImageFill(px, py - 1, pz,ivi-_OneLine);
+                                       SetAuxImageFill(px, py, pz - 1,ivi-_OnePlane);
+                                       SetAuxImageFill(px, py, pz + 1,ivi+_OnePlane);
                                }
                                if (_direction == 1) // XZ
-                                               {
-                                       SetAuxImageFill(px + 1, py, pz);
-                                       SetAuxImageFill(px - 1, py, pz);
+                               {
+                                       SetAuxImageFill(px + 1, py, pz,ivi+_OneColumn);
+                                       SetAuxImageFill(px - 1, py, pz,ivi-_OneColumn);
                                        //SetAuxImageFill(px,py+1,pz);
                                        //SetAuxImageFill(px,py-1,pz);
-                                       SetAuxImageFill(px, py, pz - 1);
-                                       SetAuxImageFill(px, py, pz + 1);
+                                       SetAuxImageFill(px, py, pz - 1,ivi-_OnePlane);
+                                       SetAuxImageFill(px, py, pz + 1,ivi+_OnePlane);
                                }
                                if (_direction == 2) // XY
-                                               {
-                                       SetAuxImageFill(px + 1, py, pz);
-                                       SetAuxImageFill(px - 1, py, pz);
-                                       SetAuxImageFill(px, py + 1, pz);
-                                       SetAuxImageFill(px, py - 1, pz);
+                               {
+                                       SetAuxImageFill(px + 1, py, pz,ivi+_OneColumn);
+                                       SetAuxImageFill(px - 1, py, pz,ivi-_OneColumn);
+                                       SetAuxImageFill(px, py + 1, pz,ivi+_OneLine);
+                                       SetAuxImageFill(px, py - 1, pz,ivi-_OneLine);
                                        //SetAuxImageFill(px,py,pz-1);
                                        //SetAuxImageFill(px,py,pz+1);
                                }
                        } else { // 3D
-                               SetAuxImageFill(px + 1, py, pz);
-                               SetAuxImageFill(px - 1, py, pz);
-                               SetAuxImageFill(px, py + 1, pz);
-                               SetAuxImageFill(px, py - 1, pz);
-                               SetAuxImageFill(px, py, pz - 1);
-                               SetAuxImageFill(px, py, pz + 1);
+                               SetAuxImageFill(px + 1, py, pz,ivi+_OneColumn);
+                               SetAuxImageFill(px - 1, py, pz,ivi-_OneColumn);
+                               SetAuxImageFill(px, py + 1, pz,ivi+_OneLine);
+                               SetAuxImageFill(px, py - 1, pz,ivi-_OneLine);
+                               SetAuxImageFill(px, py, pz - 1,ivi-_OnePlane);
+                               SetAuxImageFill(px, py, pz + 1,ivi+_OnePlane);
                        } // 2D 3D
  
                } // _graylevel   //_limitRecursionFill
  
        } //if _minX _maxX _minY _maxY _minZ _maxZ
        _countRecursiveFill--;
  }
  
  //---------------------------------------------------------------------------
- void FillFilter::SetAuxImageFill(int px, int py, int pz) 
+ void FillFilter::SetAuxImageFill(int px, int py, int pz, long int ivi
  {
        if ((px >= _minX) && (px <= _maxX) && (py >= _minY) && (py <= _maxY)
-                       && (pz >= _minZ) && (pz <= _maxZ)) {
+                       && (pz >= _minZ) && (pz <= _maxZ)) 
+       {
                this->_IMManager->AddModifiedPixel(px, py, pz); //DFCH
-               _auxImageFill->SetScalarComponentFromFloat(px, py, pz, 0, 1);
-       }
+ //EED01
+ //            _auxImageFill->SetScalarComponentFromFloat(px, py, pz, 0, 1);
+                       _ptrAuxImageFill[ ivi ]=1;
+       } // if px py pz
  }
  
  //---------------------------------------------------------------------------
index 0ca0de29abf6a7a94ab9f68fbfb2d25b696f9970,3941e84f2b70fc06b6cf214ced36d1b929cff418..909db02c41aac42a13866dfa0ae4dc6c1570361c
@@@ -40,14 -40,12 +40,12 @@@ baseFilterManualPaint::baseFilterManual
        _maxX           = 0;
        _maxY           = 0;
        _maxZ           = 0;
        _pMinX          = 0;
        _pMinY          = 0;
        _pMinZ          = 0;
        _pMaxX          = 0;
        _pMaxY          = 0;
        _pMaxZ          = 0;
        _RangeMin       = 0;
        _RangeMax       = 6000;
  }
@@@ -63,22 -61,26 +61,26 @@@ void baseFilterManualPaint::Run() // vi
  }
  
  //---------------------------------------------------------------------------
- void baseFilterManualPaint::SetGrayLevel(double graylevel) {
+ void baseFilterManualPaint::SetGrayLevel(double graylevel) 
+ {
        _graylevel = graylevel;
  }
  
  //---------------------------------------------------------------------------
- void baseFilterManualPaint::Set2D3D(int dim2D3D) {
+ void baseFilterManualPaint::Set2D3D(int dim2D3D) 
+ {
        _2D3D = dim2D3D;
  }
  
  //---------------------------------------------------------------------------
- void baseFilterManualPaint::SetDirection(int direction) {
+ void baseFilterManualPaint::SetDirection(int direction) 
+ {
        _direction = direction;
  }
  
  //---------------------------------------------------------------------------
- void baseFilterManualPaint::SetPoint(int px, int py, int pz) {
+ void baseFilterManualPaint::SetPoint(int px, int py, int pz) 
+ {
        _px = px;
        _py = py;
        _pz = pz;
@@@ -89,29 -91,15 +91,27 @@@ void baseFilterManualPaint::SetImages(v
  {
        _image  = image;
        _image2 = image2;
        int ext[6];
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        _image->GetWholeExtent(ext);
 +#else
 +      _image->GetExtent(ext);
 +#endif
        _minX = 0;
        _minY = 0;
        _minZ = 0;
        if (_image2!=NULL)
        {
                int extB[6];
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _image2->GetWholeExtent(extB);
 +#else
 +              _image2->GetExtent(extB);
 +#endif
 +
                _maxX = std::min( ext[1]-ext[0] , extB[1]-extB[0] );
                _maxY = std::min( ext[3]-ext[2] , extB[3]-extB[2] );
                _maxZ = std::min( ext[5]-ext[4] , extB[5]-extB[4] );
                _maxY = ext[3]-ext[2];
                _maxZ = ext[5]-ext[4];
        } // if
+       _OneColumn      = 1;
+       _OneLine        = _maxX+1;
+       _OnePlane       = (_maxX+1)*(_maxY+1);
  }
  
  
  //---------------------------------------------------------------------------
- void baseFilterManualPaint::ResetGeneralMinMax() {
+ void baseFilterManualPaint::ResetGeneralMinMax() 
+ {
        _pMinX = 10000;
        _pMinY = 10000;
        _pMinZ = 10000;
  
  //---------------------------------------------------------------------------
  void baseFilterManualPaint::SetGeneralMinMax(int minX, int maxX, int minY,
-               int maxY, int minZ, int maxZ) {
-       if (_pMinX > minX) {
-               _pMinX = minX;
-       }
-       if (_pMinY > minY) {
-               _pMinY = minY;
-       }
-       if (_pMinZ > minZ) {
-               _pMinZ = minZ;
-       }
-       if (_pMaxX < maxX) {
-               _pMaxX = maxX;
-       }
-       if (_pMaxY < maxY) {
-               _pMaxY = maxY;
-       }
-       if (_pMaxZ < maxZ) {
-               _pMaxZ = maxZ;
-       }
+               int maxY, int minZ, int maxZ) 
+ {
+       if (_pMinX > minX) { _pMinX = minX; }
+       if (_pMinY > minY) { _pMinY = minY; }
+       if (_pMinZ > minZ) { _pMinZ = minZ; }
+       if (_pMaxX < maxX) { _pMaxX = maxX; }
+       if (_pMaxY < maxY) { _pMaxY = maxY; }
+       if (_pMaxZ < maxZ) { _pMaxZ = maxZ; }
  }
  
  //---------------------------------------------------------------------------
- void baseFilterManualPaint::GetScalarRange(double * range) {
+ void baseFilterManualPaint::GetScalarRange(double * range) 
+ {
        range = this->_image->GetScalarRange();
  }
  
  //---------------------------------------------------------------------------
- ImageMManager* baseFilterManualPaint::GetImageMManager() {
+ ImageMManager* baseFilterManualPaint::GetImageMManager() 
+ {
        return (this->_IMManager);
  } //DFCH
  
  //---------------------------------------------------------------------------
- void baseFilterManualPaint::CleanImageMManager() {
+ void baseFilterManualPaint::CleanImageMManager() 
+ {
        this->_IMManager->CleanModifiedRegion();
  } //DFCH
  
  //---------------------------------------------------------------------------
  void baseFilterManualPaint::SetRangeMin(int min) 
  {
@@@ -204,6 -180,3 +192,3 @@@ int baseFilterManualPaint::GetRangeMax(
        return _RangeMax;
  }
  
index bca71dd8c8e0231095c189490429b3ee9777c22e,cde27ecfddadb323c610e6c6e02706445721d203..aa398d488971528129d01e2c83955763b62c0f49
@@@ -31,7 -31,8 +31,8 @@@
  vtkClipping3DDataViewer::vtkClipping3DDataViewer()
  {
        int i;
-       for (i=0; i<VTKMPRDATA_MAXTISSUE; i++){
+       for (i=0; i<VTKMPRDATA_MAXTISSUE; i++)
+       {
                _visibleTissue[i]               = false;
                _representationType[i]  = true;
        }
        _shade                                          = false;
  
      _volumerendererdata       = VolumeRendererData::New();
 +
 +#if (VTK_MAJOR_VERSION <= 7) 
      _volumeMapper                     = vtkVolumeRayCastMapper::New();
 +    _compositeFunction                = vtkVolumeRayCastCompositeFunction::New();
 +      _compositeFunctionMIP   = vtkVolumeRayCastMIPFunction::New();
 +#else 
 +    _volumeMapper                     = vtkFixedPointVolumeRayCastMapper::New();
 +#endif
 +
      _newvol                           = vtkVolume::New();
      _volumeProperty           = vtkVolumeProperty::New();
 -    _compositeFunction                = vtkVolumeRayCastCompositeFunction::New();
 -       _compositeFunctionMIP  = vtkVolumeRayCastMIPFunction::New();
  
  }
  //-------------------------------------------------------------------
@@@ -66,15 -61,13 +67,15 @@@ vtkClipping3DDataViewer::~vtkClipping3D
                _tissuePlanes[i]->Delete();
                _tissueClipper[i]->Delete();
        }
 -      _outlineData->Delete();
 -      _mapOutline->Delete();
 -      _outline->Delete();
 +
        // Volume
        _tfun->Delete();
        _ctfun->Delete();
 +#if (VTK_MAJOR_VERSION <= 7) 
        _compositeFunction->Delete();
 +#else 
 +      // ..
 +#endif
        _volumeMapper->Delete();
        _volumeProperty->Delete();
        _newvol->Delete();
        }
        _observerV-> Delete();
  }
 -//-------------------------------------------------------------------
 -vtkActor* vtkClipping3DDataViewer::GetOutlineActor()
 -{
 -      return _outline;
 -}
 +
  //-------------------------------------------------------------------
  vtkClipPolyData* vtkClipping3DDataViewer::GetTissueClipper(int id)
  {
@@@ -213,19 -210,9 +214,19 @@@ void vtkClipping3DDataViewer::SetImage(
        vtkImageData *imagedata=_vtkmprbasedata->GetImageData();
        for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
        {
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _mCubes[i]->SetInput( imagedata );
 +#else
 +              _mCubes[i]->SetInputData( imagedata );
 +#endif
        } // for
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        _volumeMapper->SetInput( imagedata );
 +#else
 +      _volumeMapper->SetInputData( imagedata );
 +#endif
        _volumerendererdata->SetImageData( imagedata );
  }
  
@@@ -240,54 -227,21 +241,54 @@@ void vtkClipping3DDataViewer::Configure
        {
                // Visualisation - original volume
                _mCubes[i] = vtkMarchingCubes::New( );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _mCubes[i]->SetInput( imagedata );
 +#else
 +              _mCubes[i]->SetInputData( imagedata );
 +#endif
 +
                _mCubes[i]->SetValue( 0, range[1]*(4+i) / 8 );
  //            _mCubes[i]->SetValue( 0, 1500 );
            _tissueStripper[i] = vtkStripper::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
            _tissueStripper[i]->SetInput( _mCubes[i]->GetOutput( ) );
 +#else
 +          _tissueStripper[i]->SetInputData( _mCubes[i]->GetOutput( ) );
 +#endif
 +
                _tissuePlanes[i]  = vtkPlanes::New();
                int x1,x2,y1,y2,z1,z2;
                imagedata->GetExtent(x1,x2,y1,y2,z1,z2);
 -              _tissuePlanes[i]->SetBounds  (x1,x2,y1,y2,z1,z2);
 +              _tissuePlanes[i]->SetBounds(x1,x2,y1,y2,z1,z2);
                _tissueClipper[i] = vtkClipPolyData::New();
 -              _tissueClipper[i]->SetInput( _tissueStripper[i]->GetOutput() );
                _tissueClipper[i]->SetClipFunction( _tissuePlanes[i] );
                _tissueClipper[i]->InsideOutOn( );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +              _tissueClipper[i]->SetInput( _tissueStripper[i]->GetOutput() );
 +#else
 +              _tissueClipper[i]->SetInputData( _tissueStripper[i]->GetOutput() );
 +#endif
 +
                _tissueMapper[i] = vtkPolyDataMapper::New( );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _tissueMapper[i]->SetInput( _tissueClipper[i]->GetOutput() );
 +#else
 +              _mCubes[i]->Update();
 +              _tissueStripper[i]->Update();
 +              _tissueClipper[i]->Update();
 +              _tissueMapper[i]->SetInputData( _tissueClipper[i]->GetOutput() );
 +              _tissueMapper[i]->Update();
 +#endif
 +
 +
                _tissueMapper[i]->ScalarVisibilityOff( );
  //            _tissueMapper[i]->Update();
        } // for i  
                _tissue[i]->GetProperty()->SetSpecular(.3);
                _tissue[i]->GetProperty()->SetSpecularPower(20);
                _tissue[i]->GetProperty()->SetOpacity(0.5);
 -              if (i==0) _tissue[i]->GetProperty()->SetColor(0.85, 0.85   , 0.85   );
 -              if (i==1) _tissue[i]->GetProperty()->SetColor(0, 0  ,  1  );
 -              if (i==2) _tissue[i]->GetProperty()->SetColor(0.85, 0.20   , 0.20   );
 -              if (i==3) _tissue[i]->GetProperty()->SetColor(0, 1   , 0   );
 -      }
 +              if (i==0) { _tissue[i]->GetProperty()->SetColor(0.85, 0.85   , 0.85   );        }
 +              if (i==1) { _tissue[i]->GetProperty()->SetColor(0, 0  ,  1  );                          }
 +              if (i==2) { _tissue[i]->GetProperty()->SetColor(0.85, 0.20   , 0.20   );        }
 +              if (i==3) { _tissue[i]->GetProperty()->SetColor(0, 1   , 0   );                         }
 +      } // for
  
        for (i=0; i< VTKMPRDATA_MAXTISSUE ; i++)
        {
                _observerS[i] = boxSurfaceObserver::New();
                _observerS[i]->SetPlanes( GetTissuePlanes(i) );
                _observerS[i]->SetActor( _tissue[i] );
 -      }
 -
 +              _observerS[i]->SetFilters( _mCubes[i], _tissueStripper[i] ,_tissueClipper[i] );
 +      } // for
  }
  
  //-----------------------------------------------------------------------------
@@@ -398,22 -352,11 +399,22 @@@ void vtkClipping3DDataViewer::Configure
        // EED 13/03/2011
  
   // _volumeMapper = vtkVolumeRayCastMapper::New();
 +
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        _volumeMapper->SetInput( this->GetVtkMPRBaseData()->GetImageData() );
 +#else
 +      _volumeMapper->SetInputData( this->GetVtkMPRBaseData()->GetImageData() );
 +#endif
  
 -    _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
  
 -   // _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
 +#if (VTK_MAJOR_VERSION <= 7) 
 +    _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
 +      // _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
 +#else 
 +      // ..
 +#endif
        
  //
        _volumeMapper->SetClippingPlanes( _volumePlanes );
      _observerV = boxSurfaceObserver::New();
        _observerV->SetPlanes( _volumePlanes );
        _observerV->SetActor( _newvol );
 +      
 +#if (VTK_MAJOR_VERSION <= 7) 
        _observerV->SetvtkVolumeRayCastMapper( _volumeMapper );
 +#else 
 +      _observerV->SetvtkFixedPointVolumeRayCastMapper( _volumeMapper );
 +#endif
  }
  
  //-----------------------------------------------------------------------------
@@@ -508,20 -446,16 +509,20 @@@ void vtkClipping3DDataViewer::UpdateVol
  void vtkClipping3DDataViewer::updateVolume()
  {
  
 +#if (VTK_MAJOR_VERSION <= 7) 
      if(_isRayCasting)
      {
          _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
          _volumerendererdata->changeCompositeMIPFunction(0);
 -    }
 -    else if(_isMIP)
 -    {
 +    }    else if(_isMIP) {
          _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
          _volumerendererdata->changeCompositeMIPFunction(1);
      }
 +#else 
 +      // ...   here Composition of MIP
 +      printf("EED vtkClipping3DDataViewer::updateVolume ...   here Composition or MIP \n");
 +#endif
 +
  
      if(_interpolation)
      {
@@@ -549,6 -483,18 +550,6 @@@ void vtkClipping3DDataViewer::Configure
        Configure_Tissue();
        Configure_Volume();
      Configure_VolumeBox();
 -  // An outline provides context around the data.
 -  //
 -      _outlineData    = vtkOutlineFilter::New();
 -    _outlineData->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
 -      _mapOutline     = vtkPolyDataMapper::New();
 -
 -//EED 4 nov 2015 Estelle 
 -//    _mapOutline->SetInput(_outlineData->GetOutput());
 -
 -      _outline        = vtkActor::New();
 -    _outline->SetMapper(_mapOutline);
 -    _outline->GetProperty()->SetColor(0,0,0);
  }
  
  
  void vtkClipping3DDataViewer::SetIsovalue(int idTissue, int isoValue)
  {
        _mCubes[idTissue]->SetValue(0, isoValue);
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +      // ..
 +#else
 +      _mCubes[idTissue]->Update();
 +      _tissueStripper[idTissue]->Update();
 +      _tissueClipper[idTissue]->Update();
 +#endif
  }
  //-------------------------------------------------------------------
  double vtkClipping3DDataViewer::GetIsovalue(int idTissue)
@@@ -576,12 -514,7 +577,12 @@@ vtkVolume* vtkClipping3DDataViewer::Get
     return _newvol;
  }
  //-------------------------------------------------------------------
 -vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper(){
 +#if (VTK_MAJOR_VERSION <= 7) 
 +      vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper()
 +#else 
 +      vtkFixedPointVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper()
 +#endif
 +{
        return _volumeMapper;
  }
  //-------------------------------------------------------------------
@@@ -840,14 -773,7 +841,14 @@@ void vtkClipping3DDataViewer::ReadMeshV
        vtkDataSetReader *reader = vtkDataSetReader::New();
        reader->SetFileName(namefile);
        reader->Update();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        _tissueStripper[3]->SetInput( reader->GetPolyDataOutput()  );
 +#else
 +      _tissueStripper[3]->SetInputData( reader->GetPolyDataOutput()  );
 +#endif
 +
  }
  
  void vtkClipping3DDataViewer::setColorTransferFunction(vtkColorTransferFunction* colortable){
index f35206765b43494bb0fc6c36e5063b224b5656d7,45e4f3869ec476ca0f8295b8eca3fc199be8c3c7..5c4e0c7f98622ae20d7411600b68a06ce5e05848
@@@ -34,7 -34,6 +34,6 @@@ vtkMPR3DDataViewer::vtkMPR3DDataViewer(
        _visiblePosition[2]=false;
        _ctfun                  = NULL;
        _vtkmprbasedata = NULL;
        _ctfun                  = NULL;
        _saggitalColors = NULL;
        _saggital               = NULL;
@@@ -142,16 -141,10 +141,17 @@@ std::vector<double>*     vtkMPR3DDataVi
  //-------------------------------------------------------------------
  void vtkMPR3DDataViewer::SetImage()
  {
 -      _saggitalColors -> SetInput( _vtkmprbasedata->GetImageData() );
 -      _axialColors    -> SetInput( _vtkmprbasedata->GetImageData() );
 -      _coronalColors  -> SetInput( _vtkmprbasedata->GetImageData() );
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +      _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
 +      _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
 +      _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
 +#else
 +      _saggitalColors->SetInputData( _vtkmprbasedata->GetImageData() );
 +      _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
 +      _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
 +#endif
+       _outlineData    -> SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
  }
  
  //-------------------------------------------------------------------
@@@ -182,18 -175,11 +182,16 @@@ void vtkMPR3DDataViewer::Configure(
      _satLut->SetValueRange (1, 1);
  */
  
        double range[2];
        double delta;
-       
        if(_vtkmprbasedata->GetImageData())
        {
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _vtkmprbasedata->GetImageData()->Update();
 +#else
 +              // ..
 +#endif
                _vtkmprbasedata->GetImageData()->Modified();
                _vtkmprbasedata->GetImageData()->GetScalarRange(range);
                delta = range[1]-range[0];
                        _saggitalColors = vtkImageMapToColors::New();
                }
                _saggitalColors->RemoveAllInputs();
 -              _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
++
        //    _saggitalColors->SetLookupTable(_bwLut);
                _saggitalColors->SetLookupTable(_ctfun);
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +              _saggitalColors->SetInput( _vtkmprbasedata->GetImageData() );
 +#else
 +              _saggitalColors->SetInputData( _vtkmprbasedata->GetImageData() );
 +              _saggitalColors->Update();
 +#endif
 +              
 +              
                if(_saggital==NULL)
                {
                        _saggital = vtkImageActor::New();
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                        _saggital->SetInput(_saggitalColors->GetOutput());
 +#else
 +                      _saggital->SetInputData(_saggitalColors->GetOutput());
 +#endif
                }       
                //_saggitalColors->Update();
        
        // Create the second (axial) plane of the three planes. We use the
        // same approach as before except that the extent differs.
  
-               
                if(_axialColors==NULL)
                {
                        _axialColors = vtkImageMapToColors::New();
                }
                _axialColors->RemoveAllInputs();
 -              _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
        //    _axialColors->SetLookupTable(_hueLut);
                _axialColors->SetLookupTable(_ctfun);
 +
++              
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +              _axialColors->SetInput( _vtkmprbasedata->GetImageData() );
 +#else
 +              _axialColors->SetInputData( _vtkmprbasedata->GetImageData() );
 +              _axialColors->Update();
 +#endif
 +
                if(_axial==NULL)
                {
                        _axial = vtkImageActor::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                        _axial->SetInput(_axialColors->GetOutput());
 +#else
 +                      _axial->SetInputData(_axialColors->GetOutput());
 +#endif
 +
                }
                
                //_axialColors->Update();
-       
                // Create the third (coronal) plane of the three planes. We use 
        // the same approach as before except that the extent differs.
                if(_coronalColors==NULL)
                        _coronalColors = vtkImageMapToColors::New();
                }
                _coronalColors->RemoveAllInputs();
 -              _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
        //    _coronalColors->SetLookupTable(_satLut);
                _coronalColors->SetLookupTable(_ctfun);
 +
++              
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +              _coronalColors->SetInput( _vtkmprbasedata->GetImageData() );
 +#else
 +              _coronalColors->SetInputData( _vtkmprbasedata->GetImageData() );
 +              _coronalColors->Update();
 +#endif
 +
 +
                if(_coronal==NULL)
                {
                        _coronal = vtkImageActor::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                        _coronal->SetInput(_coronalColors->GetOutput());
 -              }
 +#else
 +                      _coronal->SetInputData(_coronalColors->GetOutput());
 +#endif
 +
 +              } // if _coronal
                
-       
        // An outline provides context around the data.
        //
                if(_outlineData==NULL)
                {
                        _outlineData = vtkOutlineFilter::New();
 -              }
 +              } // if _outlineData
                _outlineData->RemoveAllInputs();
                if(_vtkmprbasedata->GetImageData())
                {
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                        _outlineData->SetInput((vtkDataSet *) _vtkmprbasedata->GetImageData() );
 -              }
 +#else
 +                      _outlineData->SetInputData((vtkDataSet *) _vtkmprbasedata->GetImageData() );
 +                      _outlineData->Update();    
 +#endif
 +              } // if _image
  
                if(_mapOutline==NULL)
                {
                        _mapOutline = vtkPolyDataMapper::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                        _mapOutline->SetInput(_outlineData->GetOutput());
 +#else
 +                      _mapOutline->SetInputData(_outlineData->GetOutput());
 +#endif
 +
                }
                _mapOutline->Update();    
                //_mapOutline->RemoveAllInputs();
                        _outline->GetProperty()->SetColor(0,0,0);
                }
        }
-       
        //int ext[6];
        //_vtkmprbasedata->GetImageData()->GetExtent(ext);
  }
index 393b3f1160bf84c6ea866df1e7bba3c60459cc32,3879377f94e3ba33d93aae257bed0007e9f3e8e8..b705076c09f201f7006ae2b111b2d886b0dd6ad6
@@@ -46,7 -46,6 +46,6 @@@ wxVtk2DBaseView::~wxVtk2DBaseView(
        {
           delete _vtkIinfoTextImage;
        }
        if (_imageViewer2XYZ!=NULL)
        {
           delete _imageViewer2XYZ;
@@@ -61,19 -60,17 +60,17 @@@ void wxVtk2DBaseView::TransformCoordina
  //    GetVtkBaseData()->GetImageData()->GetSpacing(spc);
  //JCP 04/08/10        W/O Image this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput()->GetSpacing(spc);
        vtkImageData* image = this->_imageViewer2XYZ->GetVtkImageViewer2()->GetInput();
-       if(image){
+       if(image)
+       {
                image->GetSpacing(spc);
        }else{
                spc[0] = 1;
                spc[1] = 1;
                spc[2] = 1;
        }
        X = X / spc[0];
        Y = Y / spc[1];
        Z = Z / spc[2];
  }
  
  //-------------------------------------------------------------------
@@@ -104,23 -101,18 +101,23 @@@ void wxVtk2DBaseView::ResetView(
        double spx = 0,spy = 0,spz = 0;
        int x1 = 1,x2 = 1,y1 = 1,y2 = 1,z1 = 1,z2 = 1;
        wxVtkBaseView::Configure();
 -      wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
 +      crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
        vtkImageData *imageData = GetVtkBaseData()->GetImageData();
-       if(imageData){
+       if(imageData)
+       {
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                imageData->UpdateInformation();
                imageData->SetUpdateExtent( imageData->GetWholeExtent());
                imageData->Update();
                _imageViewer2XYZ->GetVtkImageViewer2()->SetInput(imageData );
 +#else
 +              _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData(imageData );
 +#endif
                imageData->GetSpacing (spx,spy,spz);
                imageData->GetExtent (x1,x2,y1,y2,z1,z2);
        }
+ printf("//EED wxVtk2DBaseView::ResetView %d %d    %d %d     %d %d \n",x1,x2,y1,y2,z1,z2);
        _imageViewer2XYZ -> SetExtentDimension(x1,x2,y1,y2,z1,z2);
        _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
  
  //-------------------------------------------------------------------
  void wxVtk2DBaseView::SetImageToVtkViewer(vtkImageData *imageData)
  {
+       int ext[6];
+       imageData->Update();
+       imageData->GetWholeExtent(ext);
        if (_imageViewer2XYZ!=NULL)
        {
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
+               _imageViewer2XYZ->SetExtentDimension( ext[0],ext[1],ext[2],ext[3],ext[4],ext[5] );
                _imageViewer2XYZ->GetVtkImageViewer2()->SetInput( imageData );
 +#else
 +              _imageViewer2XYZ->GetVtkImageViewer2()->SetInputData( imageData );
 +#endif
        } // if _imageViewer2XYZ
+       GetRenderer()->GetActiveCamera()->SetClippingRange(0.01, 1000000);
  }
  
  //-------------------------------------------------------------------
@@@ -176,7 -170,7 +180,7 @@@ void wxVtk2DBaseView::Configure(bool ok
        if (_imageViewer2XYZ==NULL)
        {
                _imageViewer2XYZ = new vtkImageViewer2_XYZ();
 -              wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
 +              crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
                _imageViewer2XYZ -> GetVtkImageViewer2()->SetupInteractor ( iren );
  
                //////////////
        vtkImageData *imageData = GetVtkBaseData()->GetMarImageData()->GetImageData();
        if (imageData!=NULL)
        {
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                imageData->UpdateInformation();
                imageData->SetUpdateExtent( imageData->GetWholeExtent());
                imageData->Update();
 +#else
 +              //...
 +#endif
 +
                if (okimage==true){
                        imageData->GetSpacing (spx,spy,spz);
                        imageData->GetExtent (x1,x2,y1,y2,z1,z2);
  //EED 21 mars 2012    FLIP problem  ..PLOP..
                        
                        // XY
-                       camera->SetViewUp               ( spx*0                 , -spy*1                        , spz*0         );
+                       camera->SetViewUp               ( spx*0                 , -spy*1                , spz*0         );
                        camera->SetPosition             ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , -spz*10000    );
                        camera->SetFocalPoint   ( spx*(x1+x2)/2 , spy*(y1+y2)/2 , spz*0         );
  /*
@@@ -330,7 -317,7 +334,7 @@@ void wxVtk2DBaseView::Refresh(
  void wxVtk2DBaseView::SetInteractorStyleImage(vtkInteractorStyleBaseView *interactorstylebaseview)
  {
        SetInteractorStyleBaseView(interactorstylebaseview);
 -      wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
 +      crea::wxVTKRenderWindowInteractor *iren = GetWxVTKRenderWindowInteractor();
        interactorstylebaseview->SetInteractor ( iren );
        iren->SetInteractorStyle(interactorstylebaseview);
        interactorstylebaseview->SetwxVtkBaseView(this);
@@@ -394,6 -381,13 +398,13 @@@ void wxVtk2DBaseView::SetColorLevel(dou
        this->Refresh();
  }
  
+ //-------------------------------------------------------------------
+ void wxVtk2DBaseView::SetInterpolate(bool iterpolate)
+ {
+       GetVtkBaseData()->SetInterpolate( iterpolate );
+       this->Refresh();
+ }
  //-------------------------------------------------------------------
  int wxVtk2DBaseView::GetDirection() // virtual
  {
index 82b4b22167f8673e4bd5373e0f82f2c2e6759ae6,eb454c97a37b72c888c3602cf80790fc1277e944..77d384390a912d2156b3bf4e9566c626592a013e
@@@ -45,7 -45,7 +45,7 @@@ wxVtkBaseView::wxVtkBaseView(
  wxVtkBaseView::wxVtkBaseView(wxWindow *parent)
  {
        _parent                         = parent;
 -      _iren                           = (wxVTKRenderWindowInteractor*)new wxVTKRenderWindowInteractorPlus(_parent,this);
 +      _iren                           = (crea::wxVTKRenderWindowInteractor*)new wxVTKRenderWindowInteractorPlus(_parent,this);
  //    _iren->UseCaptureMouseOn();
  //    _iren                           = new wxVTKRenderWindowInteractor(_parent,-1);
        _interactorStyle        = NULL;
@@@ -58,12 -58,11 +58,12 @@@ wxVtkBaseView::~wxVtkBaseView(
        //_iren=NULL;
  }
  //-------------------------------------------------------------------
 -wxVTKRenderWindowInteractor* wxVtkBaseView::GetWxVTKRenderWindowInteractor() throw (char*)
 +crea::wxVTKRenderWindowInteractor* wxVtkBaseView::GetWxVTKRenderWindowInteractor() throw (char*)
  {
  
 -      if(_iren==NULL){
 -              throw "wxVtkBaseView::GetWxVTKRenderWindowInteractor() _iren wxVTKRenderWindowInteractorPlus =NULL";
 +      if(_iren==NULL)
 +      {
 +              throw "wxVtkBaseView::GetWxVTKRenderWindowInteractor() _iren cwxVTKRenderWindowInteractorPlus =NULL";
        }
     return _iren;
  }
@@@ -91,9 -90,7 +91,7 @@@ void wxVtkBaseView::Refresh()  // virtu
  //-------------------------------------------------------------------
  void wxVtkBaseView::RefreshView()  // virtual 
  {
-       printf("EED wxVtkBaseView::RefreshView() \n");
  // EED 10 Oct 2007
        #if defined(WIN32)
                GetRenWin()->Render();
        #else
index 87b4fa3d909c507d49fb273a68eb6e5db4f79b17,bf823640f06f8c218929e53493565cf6c1a9cd43..01c7e1400cc3f42652651dfc2c562649779e7fdf
@@@ -56,14 -56,14 +56,14 @@@ wxVtkMPR2DView::wxVtkMPR2DView( wxWindo
  //-------------------------------------------------------------------
  wxVtkMPR2DView::~wxVtkMPR2DView()
  {
 -      if (_ptsA!=NULL)            { _ptsA                 -> Delete(); }
 -      if (_lineAActor!=NULL)  { _lineAActor   -> Delete(); }
 -      if (_lineAMapper!=NULL) { _lineAMapper  -> Delete(); }
 -      if (_pdA!=NULL)             { _pdA                  -> Delete(); }
 -      if (_ptsB!=NULL)            { _ptsB                 -> Delete(); }
 -      if (_lineBActor!=NULL)  { _lineBActor   -> Delete(); }
 -      if (_lineBMapper!=NULL) { _lineBMapper  -> Delete(); }
 -      if (_pdB!=NULL)             { _pdB                  -> Delete(); }
 +      if (_ptsA!=NULL)            { _ptsA->Delete();                  }
 +      if (_lineAActor!=NULL)  { _lineAActor->Delete();        }
 +      if (_lineAMapper!=NULL) { _lineAMapper->Delete();       }
 +      if (_pdA!=NULL)             { _pdA->Delete();                   }
 +      if (_ptsB!=NULL)            { _ptsB->Delete();                  }
 +      if (_lineBActor!=NULL)  { _lineBActor->Delete();        }
 +      if (_lineBMapper!=NULL) { _lineBMapper->Delete();       }
 +      if (_pdB!=NULL)             { _pdB->Delete();                   }
  }
  //-------------------------------------------------------------------
  vtkMPRBaseData *wxVtkMPR2DView::GetVtkmprbasedata()
@@@ -84,7 -84,8 +84,8 @@@ void wxVtkMPR2DView::Configure(
                ((vtkInteractorStyleBaseView*)GetInteractorStyleBaseView())->AddInteractorStyleMaracas( _interactorstylemprview );
        }
  
-       if(img!=NULL){
+       if(img!=NULL)
+       {
                double* origin = img->GetOrigin();
                img->GetExtent(x1,x2,y1,y2,z1,z2);
                img->GetSpacing(spc);
                _ptsA->SetPoint(1,  1000        ,  1000 ,  1000 );
                _pdA = vtkPolyData::New();
                _lineAMapper = vtkPolyDataMapper::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _lineAMapper->SetInput(_pdA);
 +#else
 +              _lineAMapper->SetInputData(_pdA);
 +#endif
 +
                _lineAMapper->ImmediateModeRenderingOn();
                _lineAActor->SetMapper(_lineAMapper);
        }
  
  
  // Axe B
-       if(_lineBActor==NULL){
+       if(_lineBActor==NULL)
+       {
                _lineBActor                                             =       vtkActor::New();
                _lineBActor->GetProperty()->SetDiffuseColor(1,0,0);
                _lineBActor->GetProperty()->SetLineWidth(0.5);
        _pdB->SetPoints( _ptsB );
        _pdB->SetLines( linesB );
        linesB->Delete();  //do not delete lines ??
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        _lineBMapper->SetInput(_pdB);
 +#else
 +      _lineBMapper->SetInputData(_pdB);
 +#endif
 +
        _lineBMapper->ImmediateModeRenderingOn();
-       if(_imageViewer2XYZ){
+       if(_imageViewer2XYZ)
+       {
                _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineAActor );
                _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->AddActor( _lineBActor );
                vtkCamera *camera =_imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->GetActiveCamera();
        //EED 17Avril2009
      //EED 21 mars 2012  FLIP problem  ..PLOP..
  
-               if (_direction==0) {  // YZ
+               if (_direction==0) 
+               {  // YZ
                        camera->SetViewUp               (   0   ,    0          ,     1         );
                        camera->SetPosition             ( 10000,(y1+y2)/2       , (z1+z2)/2     );
                        camera->SetFocalPoint   (   0   , (y1+y2)/2     , (z1+z2)/2     );
                        camera->SetParallelScale( (z2-z1)/3.0 );
                }
-               if (_direction==1) { // XZ
+               if (_direction==1) 
+               { // XZ
                        camera->SetViewUp               (       0               ,       0       ,       1               );
                        camera->SetPosition             ((x1+x2)/2      , -10000        , (z1+z2)/2     );
                        camera->SetFocalPoint   ((x1+x2)/2      ,   0   , (z1+z2)/2     );
                        camera->SetParallelScale( (x2-x1)/3.0 );
                }
-               if (_direction==2) {  // XY
+               if (_direction==2) 
+               {  // XY
                        camera->SetViewUp               (       0               ,       -1              ,       0       );
                        camera->SetPosition             ((x1+x2)/2      , (y1+y2)/2     , -10000);
                        camera->SetFocalPoint   ((x1+x2)/2      , (y1+y2)/2     ,       0       );
@@@ -240,9 -230,8 +244,8 @@@ void wxVtkMPR2DView::SetVisibleAxis(boo
                {
                        _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineAActor );
                        _imageViewer2XYZ->GetVtkImageViewer2()->GetRenderer()->RemoveActor( _lineBActor );
-               }
-       }
+               } // if visible
+       } // ok
  }
  
  //-------------------------------------------------------------------
@@@ -250,17 -239,15 +253,15 @@@ void wxVtkMPR2DView::Refresh(
  {
        //wxVtk2DBaseView::Refresh();
        int x1 = 0,x2 = 0,y1 = 0,y2 = 0,z1 = 0,z2 = 0;
  //EED 02/08/2013
  //    int x = 0, y = 0, z = 0;
-       double x = 0, y = 0, z = 0;
-       int xx = 0, yy = 0, zz = 0;
+       double  x  = 0, y  = 0, z  = 0;
+       int     xx = 0, yy = 0, zz = 0;
        double *spc     = 0;
        double *origin  = 0;
-       
        double xx1,yy1,zz1,xx2,yy2,zz2;
-       
+       bool   fixAxis2D;
+       double opacityAxis;
        vtkImageData* img = GetVtkmprbasedata()->GetImageData();
        if(img!=NULL)
        {
                y2 += origin[1];
                z1 += origin[2];
                z2 += origin[2];
-               
                xx1 =           x1*spc[0];
                yy1 =           y1*spc[1];
                zz1 =           z1*spc[2];
-               
                xx2 =           x2*spc[0];
                yy2 =           y2*spc[1];
                zz2 =           z2*spc[2];
-               
-               x1 = (int)(x1*spc[0]);
-               y1 = (int)(y1*spc[1]);
-               z1 = (int)(z1*spc[2]);
-               
+               x1      = (int)(x1*spc[0]);
+               y1      = (int)(y1*spc[1]);
+               z1      = (int)(z1*spc[2]);
                x2      = (int)(x2*spc[0]);
                y2      = (int)(y2*spc[1]);
                z2      = (int)(z2*spc[2]);
-               xx = (int)(GetVtkmprbasedata()->GetX());
-               yy = (int)(GetVtkmprbasedata()->GetY());
-               zz = (int)(GetVtkmprbasedata()->GetZ());
+               xx      = (int)(GetVtkmprbasedata()->GetX());
+               yy      = (int)(GetVtkmprbasedata()->GetY());
+               zz      = (int)(GetVtkmprbasedata()->GetZ());
  //EED 02/08/2013
  //            x =  round(xx*spc[0]);
  //            y =  round(yy*spc[1]);
  //            z =  round(zz*spc[2]);
-               x =  xx*spc[0];
-               y =  yy*spc[1];
-               z =  zz*spc[2];
-               if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ)) 
+               x       =  xx*spc[0];
+               y       =  yy*spc[1];
+               z       =  zz*spc[2];
+               fixAxis2D               = GetVtkmprbasedata()->GetFixAxis2D();
+               opacityAxis             = GetVtkmprbasedata()->GetOpacityAxis();
+               if ((xx!=_backX) || (yy!=_backY) || (zz!=_backZ)  || (fixAxis2D!=_backFixAxis2D) || (opacityAxis!=_backOpacityAxis)
                {
+                       double position[3];
+                       double focalpoint[3];
+                       GetRenderer()->GetActiveCamera()->GetPosition(position);
+                       GetRenderer()->GetActiveCamera()->GetFocalPoint(focalpoint);
                        if (_direction==0) {    // YZ
                                if(_imageViewer2XYZ)
                                {
                                _ptsA->SetPoint(1, xx2, yy2  , z  );
                                _ptsB->SetPoint(0, xx2, y    , zz1);
                                _ptsB->SetPoint(1, xx2, y    , zz2);
+                               position[1]             = y;    
+                               position[2]             = z;    
+                               focalpoint[1]   = y;    
+                               focalpoint[2]   = z;    
                        }
                        if (_direction==1) {    // XZ
                                if(_imageViewer2XYZ)
                                _ptsA->SetPoint(1, xx2 , y1 , z  );
                                _ptsB->SetPoint(0, x   , y1 , zz1);
                                _ptsB->SetPoint(1, x   , y1 , zz2);
+                               position[0]             = x;    
+                               position[2]             = z;    
+                               focalpoint[0]   = x;    
+                               focalpoint[2]   = z;    
                        }
                        if (_direction==2) {    // XY
                                if(_imageViewer2XYZ)
                                //_ptsA->SetPoint(1, x2 , y , z2 );
                                //_ptsB->SetPoint(0, x  , y1, z2 );
                                //_ptsB->SetPoint(1, x  , y2, z2 );
-                               
                                _ptsA->SetPoint(0, xx1 , y  , z1 );
                                _ptsA->SetPoint(1, xx2 , y  , z1 );
                                _ptsB->SetPoint(0, x   , yy1, z1 );
                                _ptsB->SetPoint(1, x   , yy2, z1 );
-                               
-                               
+                               position[0]             = x;    
+                               position[1]             = y;    
+                               focalpoint[0]   = x;    
+                               focalpoint[1]   = y;                                    
                        } // if back
++                      
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +                              // ..
 +#else
 +                              _ptsA->Modified();
 +                              _ptsB->Modified();
 +#endif
 +
-                       _backX=xx;
-                       _backY=yy;
-                       _backZ=zz;
+                       if (fixAxis2D == true)
+                       {
+                               GetRenderer()->GetActiveCamera()->SetPosition(position);
+                               GetRenderer()->GetActiveCamera()->SetFocalPoint(focalpoint);
+                       } // if GetFixAxis2D
+                       _lineAActor->GetProperty()->SetOpacity( opacityAxis );
+                       _lineBActor->GetProperty()->SetOpacity( opacityAxis );
+                       _backX                  = xx;
+                       _backY                  = yy;
+                       _backZ                  = zz;
+                       _backFixAxis2D  = fixAxis2D;
+                       _backOpacityAxis= opacityAxis;
                } // if image
  
  //EED 2016/02/19
index 7a66d83d0a963ad797aed221182a3485923c2548,aea0d6f8b86a12636d553161f0fda69405e85081..4f5e2267fb61360fa9314c8d4faa7cfb92668cf2
@@@ -62,6 -62,8 +62,10 @@@ private
        int                                                     _backX;
        int                                                     _backY;
        int                                                     _backZ;
++
+       bool                                            _backFixAxis2D;
+       double                                          _backOpacityAxis;
++
        bool                                            _visibleAxis;
        int                                                     _direction;
        vtkPoints                                       *_ptsA;
index d6fb6a53eebbe33672756b43486172ed03026a83,69ffc56b9d505a6dc4c80d0dd9f9cf6df2dbe4ea..3703011e6b5c35dbfc04b34c2d52cf076a99ff3c
@@@ -80,19 -80,15 +80,15 @@@ class vtkWindowLevelImagePlaneWidgetCal
                                   _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY(xyzv[1]);
                                   _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ(xyzv[2]);
                           } else {
-                                  
-                                  
                                   vtkImageData *image = _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
                                   double spc[3];
                                   if(image)
                                   {
                                           image->GetSpacing(spc);
                                   }
-                                  
                                   double normal[3];
                                   slicePosition = ipw->GetSlicePosition();
                                   ipw->GetNormal(normal);
-                                  
                                   // FreePlaneX
                                   if ((normal[0]==1)&&(normal[1]==0)&&(normal[2]==0))
                                   {
                                   }
                           }// ipw->GetCursorDataStatus
                   }// ev
-                       
                   if (needRefresh)     
                   {
                           vtkInteractorStyleBaseView *isbv = (vtkInteractorStyleBaseView*)_wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetInteractorStyleBaseView();
                           isbv->SetParent_refresh_waiting();
                           isbv->EvaluateToRefresh();
                   }
-                       
           } // Execute
-       
                vtkWindowLevelImagePlaneWidgetCallback(){}
                wxVtkMPR3DView *_wxvtkmpr3Dview;
  };
  
  //-------------------------------------------------------------------
  //-------------------------------------------------------------------
  //-------------------------------------------------------------------
  wxVtkMPR3DView::wxVtkMPR3DView( wxVtk3DBaseView *wxvtk3Dbaseview )
  {
        _wxvtk3Dbaseview                        =       wxvtk3Dbaseview;
        _vtkplane                                       =       NULL;
        _probe                                          =       NULL;
        _contourMapper                          =       NULL;
        _planeWidgetX                           =       NULL;
        _planeWidgetY                           =       NULL;
        _planeWidgetZ                           =       NULL;
        //Free Planes
  }
  
  //-------------------------------------------------------------------
  wxVtkMPR3DView::~wxVtkMPR3DView()
  {
        VisiblePointWidget( false );
        VisiblePlaneWidget( false );
        if(_pointWidget!=NULL){
                _pointWidget->Delete();
        }
        if(_planeWidget!=NULL){
                _planeWidget->Delete();
        }
        if(_vtkplane!=NULL){
                _vtkplane->Delete();
                _probe->Delete();
                _contourMapper->Delete();
                _contourPlaneActor->Delete();
        }
  }
  
  //-------------------------------------------------------------------
@@@ -179,18 -162,24 +162,16 @@@ void wxVtkMPR3DView::RemoveActor(vtkAct
  {
        _wxvtk3Dbaseview->GetRenderer()->RemoveActor(actor);
  }
  //-------------------------------------------------------------------
  void wxVtkMPR3DView::Configure()
  {
        vtkImageData *imageData = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
        _wxvtk3Dbaseview->Configure();
        _wxvtkmpr3DviewCntrlPanel->UpdateControlPanel();
 -//EED 27 Mai 2009
 -//    _wxvtk3Dbaseview->GetRenderer()->Clear();
        // Actors are added to the renderer.
        vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor();
        _wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor );
 -//    _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(0)  );    // _saggital
 -//    _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(1)  );    // _axial
 -//    _wxvtk3Dbaseview->GetRenderer()->AddActor( _vtkmpr3Ddataviewer->GetImageActor(2)  );    // _coronal
 -      // vtkPointWidget
 -      //if(_myCallback!=NULL){
 -              //_myCallback->Delete();
 -      //}
++
        vtkmyPWCallback_3DPointWidget *_myCallback = vtkmyPWCallback_3DPointWidget::New();
        _myCallback->SetWxVtkMPR3DView(this);
        if(imageData){
                {
                        _pointWidget = vtkPointWidget::New();
                }
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _pointWidget->SetInput( imageData );
 +#else
 +              _pointWidget->SetInputData( imageData );
 +#endif
                _myCallback->SetVtkPointWidget(_pointWidget);
                _pointWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() );
                _pointWidget->AllOff();
                _pointWidget->PlaceWidget();
                _pointWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback);
                if(_planeWidget==NULL)
                {
                        _planeWidget = vtkPlaneWidget::New();
                }
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _planeWidget->SetInput( imageData );
 +#else
 +              _planeWidget->SetInputData( imageData );
 +#endif
 +
                _myCallback->SetVtkPlaneWidget(_planeWidget);
                _planeWidget->NormalToXAxisOn();
                _planeWidget->SetResolution(50);
                _planeWidget->SetRepresentationToOutline();
                int dim[3];
                imageData->GetDimensions(dim);
                int px=(dim[0]/2);
                int py=(dim[1]/2);
                int pz=(dim[2]/2);
                int dd=20;
                _planeWidget->PlaceWidget( px-dd , px+dd , py-dd , py+dd , pz-dd , pz+dd );
--              if(_vtkplane==NULL){
 -                      _vtkplane = vtkPolyData::New();
 -                      _probe = vtkProbeFilter::New();
++              if(_vtkplane==NULL)
++              {
 +                      _vtkplane               = vtkPolyData::New();
 +                      _probe                  = vtkProbeFilter::New();
 +                      _contourMapper  = vtkPolyDataMapper::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                        _probe->SetInput(_vtkplane);
 -                      _contourMapper = vtkPolyDataMapper::New();
                        _contourMapper->SetInput( _probe->GetPolyDataOutput() );
 +#else
 +                      _myCallback->SetVtkPolyData(_vtkplane);
 +                      _myCallback->SetVtkProbeFilter(_probe);
 +                      _planeWidget->GetPolyData(_vtkplane);
 +                      _probe->SetInputData(_vtkplane);
 +                      _probe->SetSourceData(imageData);
 +//                    _probe->Update();
 +                      _contourMapper->SetInputData( _probe->GetPolyDataOutput() );
 +#endif
 +
                        _contourPlaneActor = vtkActor::New();
                        _contourPlaneActor->SetMapper(_contourMapper);
                        _contourPlaneActor->VisibilityOff();
                        _planeWidget->SetInteractor( GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor() );
                        _planeWidget->AddObserver(vtkCommand::InteractionEvent,_myCallback);
                        _planeWidget->Off();
                        _wxvtk3Dbaseview->GetRenderer()->AddActor( _contourPlaneActor );
                }
                _planeWidget->GetPolyData(_vtkplane);
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _probe->SetSource( imageData );
 +#else
 +              _probe->SetSourceData( imageData );
 +#endif
                _contourMapper->SetScalarRange( imageData->GetScalarRange() );
        ConfigureFreePlanes();
        }
  
        // render window (expressed in pixels).
        _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.36 , 0.36 , 0.36 );
  //EED 23oct2010       _wxvtk3Dbaseview->GetRenWin()->SetSize(400, 400);
  }
  
  //-------------------------------------------------------------------
  void wxVtkMPR3DView::ConfigureFreePlanes()
  {
        // The shared picker enables us to use 3 planes at one time
        // and gets the picking order right
        vtkCellPicker* picker = vtkCellPicker::New();
        picker->SetTolerance(0.005);
        // The 3 image plane widgets
        _planeWidgetX = GetPlaneWidget('x', 1, 0, 0, picker);
        _planeWidgetY = GetPlaneWidget('y', 1, 1, 0, picker);
        _planeWidgetZ = GetPlaneWidget('z', 0, 0, 1, picker);
        _planeWidgetY->SetLookupTable(_planeWidgetX->GetLookupTable());
        _planeWidgetZ->SetLookupTable(_planeWidgetX->GetLookupTable());
        picker->UnRegister(NULL);
  
        // ColorWindow ColorLevel Callback
@@@ -354,21 -296,11 +319,21 @@@ void wxVtkMPR3DView::SetImage(
  {
        vtkImageData *imageData                                 = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
        // Orthogonal planes B&W
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        _planeWidgetX->SetInput( imageData );
        _planeWidgetY->SetInput( imageData );
        _planeWidgetZ->SetInput( imageData );
        // -- Plane widget
        _probe->SetSource( imageData );
 +#else
 +      _planeWidgetX->SetInputData( imageData );
 +      _planeWidgetY->SetInputData( imageData );
 +      _planeWidgetZ->SetInputData( imageData );
 +      // -- Plane widget
 +      _probe->SetSourceData( imageData );
 +#endif
 +
        _vtkmpr3Ddataviewer->SetImage();
  }
  
@@@ -385,13 -317,7 +350,13 @@@ vtkImagePlaneWidget* wxVtkMPR3DView::Ge
        double xSpacing = 0, ySpacing = 0, zSpacing = 0;
        if(image)
        {
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                planeWidget->SetInput( image );
 +#else
 +              planeWidget->SetInputData( image );
 +#endif
                image->GetExtent(xMin, xMax, yMin, yMax, zMin, zMax);
                image->GetSpacing(xSpacing, ySpacing, zSpacing);
        }
@@@ -576,12 -502,7 +541,12 @@@ void wxVtkMPR3DView::RefreshView()   /
  
        if(_pointWidget)
        {
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                _pointWidget->SetInput( image );
 +#else
 +              _pointWidget->SetInputData( image );
 +#endif
                _pointWidget->PlaceWidget();
  
                _pointWidget->SetPosition( x,y,z );
                _planeWidget->SetCenter( x,y,z );
                _planeWidget->UpdatePlacement();
                _planeWidget->GetPolyData(_vtkplane);
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +              // ..
 +#else
 +              _probe->Update();
 +#endif
        }
  
        if (_wxvtkmpr3DviewCntrlPanel!=NULL)
@@@ -679,9 -594,9 +644,9 @@@ void wxVtkMPR3DView::VisibleImageActor(
                        // step 5 Refresh
                        _wxvtk3Dbaseview->GetRenderer()->GetRenderWindow()->Render();
  
 -              }
 +              } // if visible
                _vtkmpr3Ddataviewer->SetVisiblePosition(idPosition,visible);
 -      }
 +      } // if visible 
  }
  
  
@@@ -694,8 -609,8 +659,8 @@@ void wxVtkMPR3DView::VisiblePointWidget
                        _pointWidget->On();
                } else {
                        _pointWidget->Off();
 -              }
 -      }
 +              } // visible
 +      } // _pointWidget
  }
  
  //-------------------------------------------------------------------
@@@ -709,24 -624,21 +674,22 @@@ void wxVtkMPR3DView::VisiblePlaneWidget
  
                } else {
                        _planeWidget->Off();
 -                      _contourPlaneActor->VisibilityOff();
 -              }
 -      }
 +                      _contourPlaneActor->VisibilityOff();                    
 +              } // if visible
 +              _wxvtk3Dbaseview->GetRenderer()->GetRenderWindow()->Render();
 +      } // _planeWidget
  }
  
  //CPR: Method added 30 Nov 2009
  void wxVtkMPR3DView::showOutlineActor(bool value)
  {
        vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor();
        if(value == true)
        {
                _wxvtk3Dbaseview->GetRenderer()->AddActor( _outlineActor );
        } else {
                _wxvtk3Dbaseview->GetRenderer()->RemoveActor( _outlineActor );
 -      }
 +      } // value
  }
  
  //-------------------------------------------------------------------
@@@ -768,12 -680,7 +731,12 @@@ void wxVtkMPR3DView::TestLoic1(
        double spc[3];
        vtkimagedata->GetSpacing(spc);
  
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        vtkimagedata->Update();
 +#else
 +      // ..
 +#endif
  
  
         double p[3], n[3];
      pSource->Update( );
  
      vtkProbeFilter* slices = vtkProbeFilter::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
      slices->SetInput( ( vtkDataSet* )pSource->GetOutput( ) );
      slices->SetSource( vtkimagedata );
      slices->Update( );
      pSource->Delete( );
 +#else
 +    slices->SetInputData( ( vtkDataSet* )pSource->GetOutput( ) );
 +    slices->SetSourceData( vtkimagedata );
 +#endif
  
        vtkStructuredPoints   *stPoints = vtkStructuredPoints::New();
        stPoints -> GetPointData( )->SetScalars(  slices->GetOutput()->GetPointData()->GetScalars()  );
        stPoints -> SetDimensions( sizeIma, sizeIma, 1 );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        stPoints -> SetScalarType( vtkimagedata->GetScalarType() );
        stPoints -> SetScalarTypeToShort();
        stPoints -> Update();
 +#else
 +      vtkInformation* info=stPoints->GetInformation();
 +      vtkDataObject::SetPointDataActiveScalarInfo(info, VTK_SHORT, 1);
 +#endif
 +
 +
  
        vtkImageChangeInformation  *change = vtkImageChangeInformation ::New();
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        change    -> SetInput( stPoints );
 +#else
 +      change    -> SetInputData( stPoints );
 +#endif
        change    -> Update();    //important
  
        double _range[2];
  
  
        vtkMetaImageWriter *writer = vtkMetaImageWriter::New( );
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        writer->SetInput( stPoints );
 +#else
 +      writer->SetInputData( stPoints );
 +#endif
        writer->SetFileName( "C:/Users/Images/temp_EED/image.mhd" );
        writer->SetFileDimensionality( 2 );
        writer->Write( );
  
  
        vtkDataSetMapper *_3DSliceMapper = vtkDataSetMapper::New( );
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
        _3DSliceMapper->SetInput(change->GetOutput( ) );
 +#else
 +      _3DSliceMapper->SetInputData(change->GetOutput( ) );
 +#endif
 +
        _3DSliceMapper->SetLookupTable( _bwlookup );
        _3DSliceMapper->SetScalarRange( _range );
        _3DSliceMapper->ImmediateModeRenderingOn( );
@@@ -924,24 -798,14 +887,24 @@@ void wxVtkMPR3DView::TestLoic2(
  
          vtkCutter* sliceCutter = vtkCutter::New();
                vtkImageData *vtkimagedata =  this->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                  sliceCutter->SetInput( vtkimagedata );
 +#else
 +                sliceCutter->SetInputData( vtkimagedata );
 +#endif
                  sliceCutter->SetCutFunction( slicePlane );
  
  //EED
  //        vtkLookupTable *lut = BuildHueWeightBaseMap();
  
          vtkPolyDataMapper *slice = vtkPolyDataMapper::New();
 -                slice->SetInput( sliceCutter->GetOutput() );
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
 +              slice->SetInput( sliceCutter->GetOutput() );
 +#else
 +              slice->SetInputData( sliceCutter->GetOutput() );
 +#endif
          double range[2];
  // EED
  //                slice->Update();
  //                sliceActor->SetMapper( slice );
  
          vtkPolyDataMapper *contourMapper = vtkPolyDataMapper::New();
 +
 +//EED 2017-01-01 Migration VTK7
 +#if VTK_MAJOR_VERSION <= 5
                  contourMapper->SetInput( sliceCutter->GetOutput() );
 +#else
 +                contourMapper->SetInputData( sliceCutter->GetOutput() );
 +#endif
 +
                  contourMapper->SetScalarRange( range );
    //              contourMapper->SetLookupTable( lut );
  
index 4d42b26342bcdebb9ca990a465bd4d7d10e3bfbc,c1a639f78a503d69512d00f05ce7c82d1863aee1..5ab97aab8a567c76b03aa70a38567a5e3eb85f70
@@@ -47,35 -47,26 +47,27 @@@ public
        void                            VisibleImageActor(int idPosition, bool visible);
        void                            VisiblePointWidget( bool visible );
        void                            VisiblePlaneWidget( bool visible );
        void                            SetVisibleTissue(int idTissue, bool visible);
        bool                            GetVisibleTissue(int idTissue);
        virtual void            Refresh();
        virtual void            RefreshView();
        virtual void            Configure();
        void                            SetImage();
        void                            SetBackGroundType(int type);
        void                            SetVtkMPR3DDataViewer( vtkMPR3DDataViewer *vtkmpr3Ddataviewer );
        wxPanel*                        CreateControlPanel(wxWindow *parent, bool align);
        vtkMPR3DDataViewer* GetVtkMPR3DDataViewer();
        wxVtk3DBaseView*        GetWxvtk3Dbaseview() throw (char*);
        void                            InitOrientationPointWidget(); 
        void                            showOutlineActor(bool value);
        // EED 25 Janvier 2007 testLoic
        void                            TestLoic1();
        void                            TestLoic2();
-       void RemoveActor(vtkActor* actor);
+       void                            RemoveActor(vtkActor* actor);
  //EED 27/05/2013
  //    void ResetCamera(int *ext=NULL,double* spc=NULL);
        void setColorTransferFunction(vtkColorTransferFunction* colortable);
 +
        //Free planes
        //-------------------------------------------------------------------
        void ConfigureFreePlanes();
        void FreePlaneVisible(int plane, bool ok);
        void FreePlaneInteraction(bool ok);
        void SetFreePlanesOrtho();
-       
        void SetColorWindow(double colorWindow);
        void SetColorLevel(double colorLevel);
 +
  private:
        wxVtk3DBaseView                                 *_wxvtk3Dbaseview;
        vtkMPR3DDataViewer                              *_vtkmpr3Ddataviewer;
        vtkPolyDataMapper                               *_contourMapper;
  
        //Free planes
 -      vtkImagePlaneWidget *_planeWidgetX;
 -      vtkImagePlaneWidget *_planeWidgetY;
 -      vtkImagePlaneWidget *_planeWidgetZ;
 +      vtkImagePlaneWidget                     *_planeWidgetX;
 +      vtkImagePlaneWidget                     *_planeWidgetY;
 +      vtkImagePlaneWidget                     *_planeWidgetZ;
        
 -
  protected:
  };
  
index 33294b4fd304add2ba24d1f761b99aba9e6d0e2c,dd182d53d77602d5b2ce074cfcb70e8523e8d502..253a6837fa1802b849ab19a624d45619a4ee70c6
@@@ -60,7 -60,10 +60,10 @@@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DVie
        _ckBoxZ                                         = new wxCheckBox(panel,-1,_T("Z   "));
        _positionZ                                      = new wxSlider(panel,-1,0,0,1, wxDefaultPosition, wxSize(300,40), wxSL_HORIZONTAL | wxSL_LABELS);
  
-       _ckBoxXYZ                                       = new wxCheckBox(panel,-1,_T("XYZ axis   "));
+       _ckBoxXYZ                                       = new wxCheckBox(panel,-1,_T("3D Axis  "));
+       _ckBoxFixAxis2D                         = new wxCheckBox(panel,-1,_T("2D Fix Axis"));
+       _opacityAxis                            = new wxSlider(panel,-1,50,0,100, wxDefaultPosition, wxSize(100,40), wxSL_HORIZONTAL | wxSL_LABELS);
        _ckBoxPlane                                     = new wxCheckBox(panel,-1,_T("Plane"));
  ////EED 05Nov2012     _ckBox_BW_Color_Plane           = new wxCheckBox(panel,-1,_T("GL/Color"));
        wxButton *btnColorTable         = new wxButton (panel, -1, _T("Color table") );
        _cbStereo->Append(_T(" * STEREO ANAGLYPH"));
        _cbStereo->Append(_T("   STEREO CHECKERBOARD"));
        _cbStereo->Select(0);
+       Connect(_ckBoxX->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX     );
+       Connect(_positionX->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionX                );
+       Connect(_ckBoxY->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY     );
+       Connect(_positionY->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionY                );
+       Connect(_ckBoxZ->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ     );
+       Connect(_positionZ->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionZ                );
        
-       
-       
-       
-       Connect(_ckBoxX->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisX                                     );
-       Connect(_positionX->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionX                                        );
-       Connect(_ckBoxY->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisY                                     );
-       Connect(_positionY->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionY                                        );
-       Connect(_ckBoxZ->GetId()                                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ                                     );
-       Connect(_positionZ->GetId()                             , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnPositionZ                                        );
-       
-       Connect(btnColorTable->GetId()                  , wxEVT_COMMAND_BUTTON_CLICKED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnEditColorTable                           );
-       Connect(_ckBoxXYZ->GetId()                              , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisXYZ                           );
-       Connect(_ckBoxPlane->GetId()                    , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisiblePlane                                     );
- ////EED 05Nov2012     Connect(_ckBox_BW_Color_Plane->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::On_BW_Color_Plane  );
-       
-       Connect(_ckFreePlaneX->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneX                        );
-       Connect(_ckFreePlaneY->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneY                        );
-       Connect(_ckFreePlaneZ->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneZ                        );
-       Connect(btnFreePlanesOrtho->GetId()             , wxEVT_COMMAND_BUTTON_CLICKED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFreePlanesOrtho                          );
-       Connect(_ckFreePlaneInteraction->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneInteraction      );
-       Connect(_cbStereo->GetId()                              , wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnSetStereo                                       );
-       Connect(_ckBoxOutline->GetId()                  , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOutline                                          );
-       Connect(_ckBoxBackGroundBlack->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack                          );
-       Connect(_ckBoxInterpolate->GetId()              , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnInterpolate                                      );
-       
+       Connect(btnColorTable->GetId()                  , wxEVT_COMMAND_BUTTON_CLICKED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnEditColorTable   );
+       Connect(_ckBoxXYZ->GetId()                              , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleAxisXYZ   );
+       Connect(_ckBoxPlane->GetId()                    , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisiblePlane     );
+       Connect(_ckFreePlaneX->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneX);
+       Connect(_ckFreePlaneY->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneY);
+       Connect(_ckFreePlaneZ->GetId()          , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneZ);
+       Connect(btnFreePlanesOrtho->GetId()             , wxEVT_COMMAND_BUTTON_CLICKED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFreePlanesOrtho  );
+       Connect(_ckFreePlaneInteraction->GetId(), wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnVisibleFreePlaneInteraction );
+       Connect(_cbStereo->GetId()                              , wxEVT_COMMAND_COMBOBOX_SELECTED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnSetStereo               );
+       Connect(_ckBoxOutline->GetId()                  , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOutline                  );
+       Connect(_ckBoxBackGroundBlack->GetId()  , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnBackGroundBlack  );
+       Connect(_ckBoxInterpolate->GetId()              , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnInterpolate              );
+       Connect(_ckBoxFixAxis2D->GetId()                , wxEVT_COMMAND_CHECKBOX_CLICKED, (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnFixAxis2D                );
+       Connect(_opacityAxis->GetId()                   , wxEVT_COMMAND_SLIDER_UPDATED,   (wxObjectEventFunction) &wxVtkMPR3DViewCntrlPanel::OnOpacityAxis              );
        
        wxFlexGridSizer *sizer;
        
        //      wxBoxSizer *sizerH4 = new wxBoxSizer(wxHORIZONTAL);
        
        //CPR: If-else statements added 30 Nov 2009
 +      wxFlexGridSizer *sizerV1;
        wxFlexGridSizer *sizerH4;
+       wxFlexGridSizer *sizerH4a;
        wxFlexGridSizer *sizerH5;
        wxFlexGridSizer *sizerH6;
  
        {
                sizer   = new wxFlexGridSizer(4);
                sizerH4 = new wxFlexGridSizer(3);
-                               
-               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))       , 1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( new wxStaticText(panel, -1,_T("GL"))      , 1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( new wxStaticText(panel, -1,_T("Color   "))        , 1, wxALL|wxEXPAND, 0);
-               
-               sizerH4->Add( _positionX ,1,wxGROW                          , 0 );
-               sizerH4->Add( _ckFreePlaneX,            1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( _ckBoxX     ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
-               
-               sizerH4->Add( _positionY ,1,wxGROW, 0 );
-               sizerH4->Add( _ckFreePlaneY,            1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( _ckBoxY     ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
++
+               sizerH4a = new wxFlexGridSizer(3);
                
-               sizerH4->Add( _positionZ ,1,wxGROW, 0 );
-               sizerH4->Add( _ckFreePlaneZ,            1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( _ckBoxZ     ,0,wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
+               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T("GL"))              ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T("Color   ")),1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( _positionX                                                                ,1,     wxGROW                                          , 0);
+               sizerH4->Add( _ckFreePlaneX                                                             ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( _ckBoxX                                                                   ,0,     wxALIGN_CENTER_VERTICAL|wxSHAPED        , 0);
+               sizerH4->Add( _positionY                                                                ,1,     wxGROW                                                          , 0);
+               sizerH4->Add( _ckFreePlaneY                                                             ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( _ckBoxY                                                                   ,0,     wxALIGN_CENTER_VERTICAL|wxSHAPED        , 0);
+               sizerH4->Add( _positionZ                                                                ,1,     wxGROW                                                          , 0);
+               sizerH4->Add( _ckFreePlaneZ                                                             ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( _ckBoxZ                                                                   ,0,     wxALIGN_CENTER_VERTICAL|wxSHAPED        , 0);
  
  //EED 2016/02/19              
-               sizerH4->Add( _ckBoxInterpolate                         , 1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))       , 1, wxALL|wxEXPAND, 0);
-               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))       , 1, wxALL|wxEXPAND, 0);
-                               
+               sizerH4->Add( _ckBoxInterpolate                                                 ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+ //            sizerH4->Add( _ckBoxXYZ                                                                 ,1, wxALL|wxEXPAND                                              , 0);
+ //            sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+ //            sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+ //            sizerH4a->Add( new wxStaticText(panel, -1,_T("Axis 2D:")),1, wxALL|wxEXPAND                                             , 0);
+               sizerH4a->Add( _ckBoxXYZ                                                                ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4a->Add( _ckBoxFixAxis2D                                                  ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4a->Add( _opacityAxis                                                             ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( sizerH4a                                                                  ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+               sizerH4->Add( new wxStaticText(panel, -1,_T(" "))               ,1, wxALL|wxEXPAND                                              , 0);
+               
+                       
+               
                sizerH5 = new wxFlexGridSizer(1);
-               sizerH5->Add( _ckBoxXYZ                                 , 1, wxALL|wxEXPAND, 0);
-               sizerH5->Add( _ckBoxPlane                               , 1, wxALL|wxEXPAND, 0);                
-               sizerH5->Add( new wxStaticText(panel, -1,_T("      "))  , 1, wxALL|wxEXPAND, 0);
- ////EED 05Nov2012             sizerH5->Add( _ckBox_BW_Color_Plane                                     , 1, wxALL|wxEXPAND, 0);
-               sizerH5->Add( _ckFreePlaneInteraction , 1, wxALL|wxEXPAND, 0);
-               sizerH5->Add( btnFreePlanesOrtho       , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
-               sizerH5->Add( new wxStaticText(panel, -1,_T(" "))       , 1, wxALL|wxEXPAND, 0);
-               sizerH5->Add( btnColorTable                         , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 0 );
-               sizerH5->Add( new wxStaticText(panel, -1,_T(" "))       , 1, wxALL|wxEXPAND, 0);
-               sizerH5->Add( _cbStereo, 1, wxALL|wxEXPAND, 0);
+               sizerH5->Add( new wxStaticText(panel, -1,_T("      "))  , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH5->Add( _ckBoxPlane                                                               , 1, wxALL|wxEXPAND                                             , 0);           
+               sizerH5->Add( new wxStaticText(panel, -1,_T("      "))  , 1, wxALL|wxEXPAND                                             , 0);
+ ////EED 05Nov2012             sizerH5->Add( _ckBox_BW_Color_Plane             , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH5->Add( _ckFreePlaneInteraction                                   , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH5->Add( btnFreePlanesOrtho                                        , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED   , 0);
+               sizerH5->Add( new wxStaticText(panel, -1,_T(" "))               , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH5->Add( btnColorTable                             , 0, wxALIGN_CENTER_VERTICAL|wxSHAPED   , 0);
+               sizerH5->Add( new wxStaticText(panel, -1,_T(" "))               , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH5->Add( _cbStereo                                                                 , 1, wxALL|wxEXPAND                                             , 0);
                
                sizerH6 = new wxFlexGridSizer(1);
-               sizerH6->Add( _ckBoxOutline                                     , 1, wxALL|wxEXPAND, 0);
-               sizerH6->Add( _ckBoxBackGroundBlack                     , 1, wxALL|wxEXPAND, 0);
+               sizerH6->Add( _ckBoxOutline                                                             , 1, wxALL|wxEXPAND                                             , 0);
+               sizerH6->Add( _ckBoxBackGroundBlack                                             , 1, wxALL|wxEXPAND                                             , 0);
  
 -
 -              sizer->Add( sizerH4                                                                             ,  1, wxALL|wxGROW,     2);
 +              sizer->Add( sizerH4,  1, wxALL|wxGROW,  2);
                sizer->Add( sizerH5,  1, wxALL|wxEXPAND,2);
                sizer->Add( sizerH6,  1, wxALL|wxEXPAND,2);
 -              
 -              
 +                      
        }       else    {
                sizer    = new wxFlexGridSizer(1);
  
        //      sizerH5->Add( ckBoxZ                            ,  1, wxALL|wxEXPAND, 0);
  
  
 -      panel->SetSize(400,50);
 +      panel->ClearBackground();
 +//    panel->SetSize(400,50);
 +      sizer->FitInside(panel);
        panel->SetAutoLayout(true);
        panel->SetSizer(sizer);
        panel->Layout();
@@@ -529,12 -540,7 +542,12 @@@ void wxVtkMPR3DViewCntrlPanel::OnVisibl
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
  
        try{
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
                _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 +#else
 +              _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 +#endif
        }catch(char* e){
                std::cout<<e<<std::endl;
        }
@@@ -546,25 -552,17 +559,25 @@@ void wxVtkMPR3DViewCntrlPanel::OnVisibl
        _wxvtkmpr3Dview->Refresh();
  
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 -
 +#else
 +      _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 +#endif
  }
  //-------------------------------------------------------------------
  void wxVtkMPR3DViewCntrlPanel::OnVisibleAxisZ(wxCommandEvent& event)
  {
        _wxvtkmpr3Dview->VisibleImageActor(2, event.IsChecked() );
        _wxvtkmpr3Dview->Refresh();
 -
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 +#else
 +      _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 +#endif
  }
  
  //-------------------------------------------------------------------
@@@ -578,6 -576,7 +591,6 @@@ void wxVtkMPR3DViewCntrlPanel::OnVisibl
  void wxVtkMPR3DViewCntrlPanel::OnVisiblePlane(wxCommandEvent& event)
  {
        _wxvtkmpr3Dview->VisiblePlaneWidget(event.IsChecked());
 -
  }
  
  //-------------------------------------------------------------------
@@@ -587,12 -586,7 +600,12 @@@ void wxVtkMPR3DViewCntrlPanel::OnPositi
        _wxvtkmpr3Dview->RefreshView();
  
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 +#else
 +      _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 +#endif
  }
  //-------------------------------------------------------------------
  void wxVtkMPR3DViewCntrlPanel::OnPositionY(wxScrollEvent& event)
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetY( _positionY->GetValue() );
        _wxvtkmpr3Dview->RefreshView();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 +#else
 +      _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 +#endif
  }
  //-------------------------------------------------------------------
  void wxVtkMPR3DViewCntrlPanel::OnPositionZ(wxScrollEvent& event)
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetZ( _positionZ->GetValue() );
        _wxvtkmpr3Dview->RefreshView();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121);  // Refresh
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 +#else
 +      _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 +#endif
  }
  
  
@@@ -669,12 -653,7 +682,12 @@@ void wxVtkMPR3DViewCntrlPanel::SetVisib
        _wxvtkmpr3Dview->Refresh();
  
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 +#else
 +      _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 +#endif
  }
  
  //-------------------------------------------------------------------
@@@ -686,12 -665,7 +699,12 @@@ void wxVtkMPR3DViewCntrlPanel::SetVisib
        _wxvtkmpr3Dview->Refresh();
  
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 +#else
 +      _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 +#endif
  }
  
  //-------------------------------------------------------------------
@@@ -703,12 -677,7 +716,12 @@@ void wxVtkMPR3DViewCntrlPanel::SetVisib
        _wxvtkmpr3Dview->Refresh();
  
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 +#else
 +      _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 +#endif
  }
  
  //-------------------------------------------------------------------
@@@ -750,18 -719,27 +763,32 @@@ void wxVtkMPR3DViewCntrlPanel::OnBackGr
  void wxVtkMPR3DViewCntrlPanel::OnInterpolate(wxCommandEvent& event)
  {
        _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetInterpolate(  _ckBoxInterpolate->GetValue() );
        _wxvtkmpr3Dview->Refresh();
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
+ }
  
+ //-------------------------------------------------------------------
+ void wxVtkMPR3DViewCntrlPanel::OnFixAxis2D(wxCommandEvent& event)
+ {
+       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetFixAxis2D(    _ckBoxFixAxis2D->GetValue() );
+       _wxvtkmpr3Dview->Refresh();
        wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
 +//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
 +#if wxMAJOR_VERSION <= 2
        _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
 +#else
 +      _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessWindowEvent(newevent1);
 +#endif
+ }
  
+ //-------------------------------------------------------------------
+ void wxVtkMPR3DViewCntrlPanel::OnOpacityAxis(wxCommandEvent& event)
+ {
+       _wxvtkmpr3Dview->GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->SetOpacityAxis(  _opacityAxis->GetValue()/100.0 );
+       _wxvtkmpr3Dview->Refresh();
+       wxCommandEvent newevent1(wxEVT_COMMAND_MENU_SELECTED,12121); // Refresh
+       _wxvtkmpr3Dview->GetWxvtk3Dbaseview()->GetWxVTKRenderWindowInteractor()->GetParent()->ProcessEvent(newevent1);
  }