]> Creatis software - creaMaracasVisu.git/commitdiff
#3207 creaMaracasVisu Feature New Normal branch vtk7itk4wx3-mingw
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 25 Jul 2018 14:30:18 +0000 (16:30 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 25 Jul 2018 14:30:18 +0000 (16:30 +0200)
lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanager.cxx
lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.cxx
lib/Kernel/VTKObjects/VolumeRenderer/volumerenderermanagerdata.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/pPlotter/HistogramDialog.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/vtkClipping3DDataViewer.h

index 4931d51876ba5d43680e40b94595a25280a1e477..1678768c46e24e734c62821b28765b89f090f1ec 100644 (file)
@@ -56,14 +56,17 @@ using namespace std;
 /**
 **     Start of the manager class
 **/
-VolumeRendererManager::VolumeRendererManager(){
-        _renderer = NULL;
-        _idCount=0;
+VolumeRendererManager::VolumeRendererManager()
+{
+    _renderer  = NULL;
+    _idCount   = 0;
 }
-VolumeRendererManager::~VolumeRendererManager(){
-    _renderer = 0;
-    _idCount=0;
-    image = 0;
+
+VolumeRendererManager::~VolumeRendererManager()
+{
+    _renderer  = 0;
+    _idCount   = 0;
+    image              = 0;
     for(unsigned i = 0; i < prop3Dvect.size();i++){
         prop3Dvect[i]->Delete();
     }
@@ -73,7 +76,8 @@ VolumeRendererManager::~VolumeRendererManager(){
 /**
 **     Sets the renderer to manage the prop3D from the view
 **/
-void VolumeRendererManager::setRenderer(vtkRenderer*  renderer){
+void VolumeRendererManager::setRenderer(vtkRenderer*  renderer)
+{
         _renderer = renderer;
 }
 
@@ -87,7 +91,8 @@ vtkRenderer* VolumeRendererManager::getRenderer(){
 /**
 ** Updates Volume
 **/
-void VolumeRendererManager::Update(int ppid){
+void VolumeRendererManager::Update(int ppid)
+{
         VolumeRendererManagerData* data = this->getViewData(ppid);
         data->Update();
         _renderer->Render();
@@ -103,13 +108,12 @@ void VolumeRendererManager::Update(int ppid){
               if this flag is set to false and the volume has multiple components, vtkImageAppendComponents is used to create
               a single representation of the image.
 */
-int VolumeRendererManager::addVolume(vtkImageData* img, vtkRenderWindowInteractor* interactor, bool independentcomponents){
-    if(img->GetNumberOfScalarComponents() > 1 && !independentcomponents){
-
-
+int VolumeRendererManager::addVolume(vtkImageData* img, vtkRenderWindowInteractor* interactor, bool independentcomponents)
+{
+    if(img->GetNumberOfScalarComponents() > 1 && !independentcomponents)
+       {
         image = img;
 
-
         vtkSmartPointer< vtkImageLuminance > luminance = vtkSmartPointer< vtkImageLuminance >::New();
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
index ac531f2bf5326e8b3b6a4427153e0a0b2e9d5854..6db6e9142886ae10494201d18cbf4231f2d27826 100644 (file)
 #include "boxSurfaceObserver.h"
 #include "vtkProperty.h"
 
-#include <vtkVolumeRayCastMapper.h>
+
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include <vtkVolumeRayCastMapper.h>
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
 
 
 //EED 2017-01-01 Migration VTK7
 
 using namespace std;
 
-VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, bool usegpu){
+VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, bool usegpu)
+{
     Initialize(vol, "", usegpu);
 }
 
-VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, std::string dataname){
+VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, std::string dataname)
+{
 
     Initialize(vol, dataname);
 
 
 }
 
-VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, vtkRenderer* render, std::string dataname){
+VolumeRendererManagerData::VolumeRendererManagerData(vtkImageData* vol, vtkRenderer* render, std::string dataname)
+{
 
     Initialize(vol, dataname);
     render->AddActor(this->getProp3D());
@@ -107,10 +115,14 @@ void VolumeRendererManagerData::Initialize(vtkImageData* vol, std::string datana
     _newvol->SetProperty(_volumeProperty );    
 
 
-    _compositeFunction = 0;
-    _MIPFunction = 0;
+#if (VTK_MAJOR_VERSION <= 7) 
+    _compositeFunction         = 0;
+    _MIPFunction               = 0;
+#else 
+       // ..
+#endif
 
-    BoxWidget = 0;
+    BoxWidget                  = 0;
 
 /* EED9Juin2011
     if(usegpu && _vol->GetDataDimension() > 2){
@@ -194,10 +206,16 @@ VolumeRendererManagerData::~VolumeRendererManagerData()
         _volumeProperty->Delete();
         _newvol->Delete();
 
+               
+#if (VTK_MAJOR_VERSION <= 7) 
         if(_compositeFunction)
             _compositeFunction->Delete();
         if(_MIPFunction)
             _MIPFunction->Delete();
+#else 
+       // ..
+#endif
+               
         if(VolumeMapper)
             VolumeMapper->Delete();
 
@@ -323,13 +341,21 @@ void VolumeRendererManagerData::setVolumeOpacity(std::vector<double> greylevel,d
 /**
 **     Check if the variables are setted correctly
 **/
-void VolumeRendererManagerData::checkInvariant()throw (char *){
-        if(!_compositeFunction){
-                throw "No composite function initialized";
-        }
-        if(!_MIPFunction){
-                throw "No MIP function initialized";
-        }
+void VolumeRendererManagerData::checkInvariant()throw (char *)
+{
+#if (VTK_MAJOR_VERSION <= 7) 
+       if(!_compositeFunction)
+       {
+               throw "No composite function initialized";
+       }
+    if(!_MIPFunction)
+       {
+               throw "No MIP function initialized";
+       }
+#else 
+       // ..
+#endif
+
         if(!VolumeMapper){
                 throw "No volume mapper initialized";
         }
@@ -394,24 +420,46 @@ void VolumeRendererManagerData::changeCompositeMIPFunction(int function)
         //checkInvariant();
         if(VolumeMapper!=NULL){
 #if VTK_MAJOR_VERSION >= 6
-           if(dynamic_cast<vtkVolumeRayCastMapper*>(VolumeMapper))
-           {
-                vtkVolumeRayCastMapper* volumemapper = dynamic_cast<vtkVolumeRayCastMapper*>(VolumeMapper);
-                if(function == 0){
-                        volumemapper->SetVolumeRayCastFunction(_compositeFunction);
-                }else{
-                        volumemapper->SetVolumeRayCastFunction(_MIPFunction);
-                }
-            }else if(dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper)){
-                vtkGPUVolumeRayCastMapper* volumemapper = dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper);
-                if(function == 0){
-                    volumemapper->SetBlendModeToComposite();
-                }else if(function == 1){
-                    volumemapper->SetBlendModeToMaximumIntensity();
-                }else if(function == 2){
-                    volumemapper->SetBlendModeToMinimumIntensity();
-                }
-            }
+
+       #if (VTK_MAJOR_VERSION <= 7) 
+                          if(dynamic_cast<vtkVolumeRayCastMapper*>(VolumeMapper))
+                          {
+                                       vtkVolumeRayCastMapper* volumemapper = dynamic_cast<vtkVolumeRayCastMapper*>(VolumeMapper);
+                                       if(function == 0) {
+                                                       volumemapper->SetVolumeRayCastFunction(_compositeFunction);
+                                       } else {
+                                                       volumemapper->SetVolumeRayCastFunction(_MIPFunction);
+                                       }
+                               } else if(dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper)){
+                                       vtkGPUVolumeRayCastMapper* volumemapper = dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper);
+                                       if(function == 0) {
+                                               volumemapper->SetBlendModeToComposite();
+                                       } else if(function == 1) {
+                                               volumemapper->SetBlendModeToMaximumIntensity();
+                                       } else if(function == 2) {
+                                               volumemapper->SetBlendModeToMinimumIntensity();
+                                       }
+                               }
+                               
+       #else 
+                          if(dynamic_cast<vtkFixedPointVolumeRayCastMapper*>(VolumeMapper))
+                          {
+                                       vtkFixedPointVolumeRayCastMapper* volumemapper = dynamic_cast<vtkFixedPointVolumeRayCastMapper*>(VolumeMapper);
+                                        // ...  for composote or MIP
+                               } else if(dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper)){
+                                       vtkGPUVolumeRayCastMapper* volumemapper = dynamic_cast<vtkGPUVolumeRayCastMapper*>(VolumeMapper);
+                                       if(function == 0) {
+                                               volumemapper->SetBlendModeToComposite();
+                                       } else if(function == 1) {
+                                               volumemapper->SetBlendModeToMaximumIntensity();
+                                       } else if(function == 2) {
+                                               volumemapper->SetBlendModeToMinimumIntensity();
+                                       }
+                               }
+       #endif
+
+                       
+                       
 #else
             vtkVolumeRayCastMapper* volumemapper = dynamic_cast<vtkVolumeRayCastMapper*>(VolumeMapper);
             if(function == 0){
index a26f18a95df35da05d8cee06bbe861f491a25210..bcf6ea25b89d1677a8da10bf8779e0cfb3525f02 100644 (file)
 #define VolumeRendererManagerData_H_
 
 #include "vtkCommand.h"
-#include <vtkVolumeRayCastCompositeFunction.h>
+
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include "vtkVolumeRayCastCompositeFunction.h"
+       #include "vtkVolumeRayCastMIPFunction.h"
+#else 
+       // ..
+#endif
+
+
 #include <vtkPlanes.h>
 #include <vtkVolumeMapper.h>
 
@@ -38,7 +46,6 @@
 #include <vtkImageData.h>
 #include <vtkProp3D.h>
 #include <vtkRenderer.h>
-#include <vtkVolumeRayCastMIPFunction.h>
 #include <vtkLookupTable.h>
 #include <vtkBoxWidget.h>
 #include <vtkAbstractMapper.h>
@@ -196,14 +203,18 @@ private:
          */
         int _id;
 
+#if (VTK_MAJOR_VERSION <= 7) 
         vtkVolumeRayCastCompositeFunction      *_compositeFunction;
-        vtkPlanes                                                      *_volumePlanes;
-       
+        vtkVolumeRayCastMIPFunction                    *_MIPFunction;
+#else 
+               //..
+#endif
+
+        vtkPlanes                                                      *_volumePlanes; 
         vtkVolumeProperty                                      *_volumeProperty;
         vtkVolume                                                      *_newvol;
         vtkPiecewiseFunction                           *_tfun;
         vtkColorTransferFunction                       *_ctfun;
-        vtkVolumeRayCastMIPFunction                    *_MIPFunction;
         /**
         ** boxwidget to control the volume
         **/
index 36e9c9b11e9da5d6d1d4ed84f6246e8f0725f127..85cf750d225c60ba2c6f0ede3124e1b08d46c263 100644 (file)
@@ -42,9 +42,6 @@ void boxSurfaceObserver::Execute(vtkObject *wdg, unsigned long eventId, void* ca
        if ( _vtkVolumeRayCastMapper != NULL )
        {
                _vtkVolumeRayCastMapper->RemoveAllClippingPlanes();
-//             vtkPlanes *planes = vtkPlanes::New();
-//             boxwidget->GetPlanes(planes);
-//             _vtkVolumeRayCastMapper->SetClippingPlanes(planes);
                _vtkVolumeRayCastMapper->SetClippingPlanes(_planes);
        } // if volume
 
@@ -62,7 +59,11 @@ void boxSurfaceObserver::SetActor(vtkProp *actor){
 }
 
 //-------------------------------------------------------------------
-void boxSurfaceObserver::SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper)
+#if (VTK_MAJOR_VERSION <= 7) 
+       void boxSurfaceObserver::SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper)
+#else 
+       void boxSurfaceObserver::SetvtkFixedPointVolumeRayCastMapper(vtkFixedPointVolumeRayCastMapper *vtkvolumeraycastmapper)
+#endif
 {
        _vtkVolumeRayCastMapper = vtkvolumeraycastmapper;
 }
index 92892da6461affbc389f52313b7d48ac5955ebd6..21d8338973775204c94fae6f46791a107e7305ff 100644 (file)
 
 #include "vtkPlanes.h"
 #include "vtkProp.h"
-#include "vtkVolumeRayCastMapper.h"
+
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include "vtkVolumeRayCastMapper.h"
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
+
 #include "vtkObject.h"
 #include "vtkCommand.h"
 
 class boxSurfaceObserver : public vtkCommand
 {
        public:
-               vtkPlanes                                       *_planes;
-               vtkProp                                         *_actor;
+               vtkPlanes                                                       *_planes;
+               vtkProp                                                         *_actor;
 
-               vtkAlgorithm                            *_mCubes;
-               vtkAlgorithm                            *_tissueStripper;
-               vtkAlgorithm                            *_tissueClipper;
-               vtkVolumeRayCastMapper          *_vtkVolumeRayCastMapper;
+               vtkAlgorithm                                            *_mCubes;
+               vtkAlgorithm                                            *_tissueStripper;
+               vtkAlgorithm                                            *_tissueClipper;
+#if (VTK_MAJOR_VERSION <= 7) 
+               vtkVolumeRayCastMapper                          *_vtkVolumeRayCastMapper;
+#else 
+               vtkFixedPointVolumeRayCastMapper        *_vtkVolumeRayCastMapper;
+#endif
 
                boxSurfaceObserver() 
                {  
-                       _mCubes                                 = NULL;
-                       _tissueStripper                 = NULL;
-                       _tissueClipper                  = NULL;
-                       _vtkVolumeRayCastMapper = NULL;
+                       _mCubes                                                         = NULL;
+                       _tissueStripper                                         = NULL;
+                       _tissueClipper                                          = NULL;
+                       _vtkVolumeRayCastMapper                         = NULL;
+                       
                }
 
                virtual char const *GetClassName() const { return "boxSurfaceObserver";}
 
                static boxSurfaceObserver *New(){
-                       boxSurfaceObserver result;
-                       result = new boxSurfaceObserver();
+                       boxSurfaceObserver      *result;
+                       result                          = new boxSurfaceObserver();
                        return result;
                }
 
                virtual void Execute(vtkObject *wdg, unsigned long eventId, void* calldata) ;
                void SetPlanes(vtkPlanes *planes);
                void SetActor(vtkProp *actor);
+#if (VTK_MAJOR_VERSION <= 7) 
                void SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper);
+#else 
+               void SetvtkFixedPointVolumeRayCastMapper(vtkFixedPointVolumeRayCastMapper *vtkvolumeraycastmapper);
+#endif
                void SetFilters(vtkAlgorithm *_mCubes , vtkAlgorithm *_tissueStripper , vtkAlgorithm *_tissueClipper);
 };
 
index 5ac1e398857d340b6fcbdf0fe47cb760a1c4d54b..bb360a714fd89fbec3a8ca0dc942d68e88c92bbc 100644 (file)
  //#include <vector>
  #include <vtkPiecewiseFunction.h>
  #include <vtkColorTransferFunction.h>
- #include <vtkVolumeRayCastMapper.h>
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include <vtkVolumeRayCastMapper.h>
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
  #include <vtkVolume.h>
  //#include "../wxMPRWidget.h"
 
@@ -141,7 +145,11 @@ public:
        bool getRefreshed();
        void setCTF(vtkColorTransferFunction* cf);
        void setTF(vtkPiecewiseFunction* tf);
+#if (VTK_MAJOR_VERSION <= 7) 
        void setVolumeMapper(vtkVolumeRayCastMapper* volMapper);
+#else 
+       void setFixedPointVolumeMapper(vtkFixedPointVolumeRayCastMapper* volMapper);
+#endif
        void setVolume(vtkVolume* vol);
        //void setMPR3Dview(wxVtkMPR3DView *wxvtkmpr3Dview1);
        //void setClipping3DView(wxVtkClipping3DView *wxvtkclipping3Dview1);
@@ -233,9 +241,9 @@ private:
        bool refreshed;
        
        vtkColorTransferFunction                *_ctfun;
-       vtkPiecewiseFunction                            *_tfun;
+       vtkPiecewiseFunction                    *_tfun;
        vtkVolumeRayCastMapper                  *volumeMapper; 
-       vtkVolume                                                       *newvol;
+       vtkVolume                                               *newvol;
 
        //things to refresh
        //wxVtkMPR3DView                                        *wxvtkmpr3Dview;
index 646baf280d5cc60011db3a2a02c141f32ef7d294..bca71dd8c8e0231095c189490429b3ee9777c22e 100644 (file)
@@ -42,11 +42,17 @@ vtkClipping3DDataViewer::vtkClipping3DDataViewer()
        _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();
 
 }
 //-------------------------------------------------------------------
@@ -64,7 +70,11 @@ vtkClipping3DDataViewer::~vtkClipping3DDataViewer()
        // Volume
        _tfun->Delete();
        _ctfun->Delete();
+#if (VTK_MAJOR_VERSION <= 7) 
        _compositeFunction->Delete();
+#else 
+       // ..
+#endif
        _volumeMapper->Delete();
        _volumeProperty->Delete();
        _newvol->Delete();
@@ -398,9 +408,12 @@ void vtkClipping3DDataViewer::Configure_Volume()
 #endif
 
 
+#if (VTK_MAJOR_VERSION <= 7) 
     _volumeMapper->SetVolumeRayCastFunction(_compositeFunction);
-
-   // _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
+       // _volumeMapper->SetVolumeRayCastFunction(_compositeFunctionMIP);
+#else 
+       // ..
+#endif
        
 //
        _volumeMapper->SetClippingPlanes( _volumePlanes );
@@ -429,7 +442,12 @@ void vtkClipping3DDataViewer::Configure_Volume()
     _observerV = boxSurfaceObserver::New();
        _observerV->SetPlanes( _volumePlanes );
        _observerV->SetActor( _newvol );
+       
+#if (VTK_MAJOR_VERSION <= 7) 
        _observerV->SetvtkVolumeRayCastMapper( _volumeMapper );
+#else 
+       _observerV->SetvtkFixedPointVolumeRayCastMapper( _volumeMapper );
+#endif
 }
 
 //-----------------------------------------------------------------------------
@@ -490,16 +508,20 @@ void vtkClipping3DDataViewer::UpdateVolumeBox(vector<double> gf, vector<double>
 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)
     {
@@ -554,7 +576,12 @@ vtkVolume* vtkClipping3DDataViewer::GetVolumeActor()
    return _newvol;
 }
 //-------------------------------------------------------------------
-vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper(){
+#if (VTK_MAJOR_VERSION <= 7) 
+       vtkVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper()
+#else 
+       vtkFixedPointVolumeRayCastMapper* vtkClipping3DDataViewer::GetVolumeMapper()
+#endif
+{
        return _volumeMapper;
 }
 //-------------------------------------------------------------------
index 0c998de28443cfb425a546aaa6eba842586191d0..4a75a62a35fe8bd8988adc630db3776a690042d1 100644 (file)
 #include "vtkStripper.h"
 #include "vtkLODActor.h"
 #include "vtkMarchingCubes.h"
-#include "vtkVolumeRayCastMapper.h"
+#if (VTK_MAJOR_VERSION <= 7) 
+       #include "vtkVolumeRayCastCompositeFunction.h"
+       #include "vtkVolumeRayCastMIPFunction.h"
+       #include "vtkVolumeRayCastMapper.h"
+#else 
+       #include <vtkFixedPointVolumeRayCastMapper.h>
+#endif
 #include "boxSurfaceObserver.h"
-#include "vtkVolumeRayCastCompositeFunction.h"
 #include <vtkPiecewiseFunction.h>
 #include "vtkVolumeProperty.h"
 #include "vtkPolyDataMapper.h"
@@ -44,7 +49,6 @@
 #include "vtkOutlineFilter.h"
 #include "vtkRenderWindowInteractor.h"
 
-#include "vtkVolumeRayCastMIPFunction.h"
 
 #include "volumerendererdata.h"
 
@@ -80,7 +84,13 @@ public:
        double                                  GetIsovalue(int idTissue);
 
        vtkVolume                               *GetVolumeActor();
-       vtkVolumeRayCastMapper  *GetVolumeMapper();
+       
+#if (VTK_MAJOR_VERSION <= 7) 
+       vtkVolumeRayCastMapper                          *GetVolumeMapper();
+#else 
+       vtkFixedPointVolumeRayCastMapper        *GetVolumeMapper();
+#endif
+
        vtkPlanes                               *GetVolumePlanes();
 
        void                                    SetVtkMPRBaseData(vtkMPRBaseData *vtkmprbasedata);
@@ -141,38 +151,50 @@ public:
 
 
 private:
-       vtkMarchingCubes                *_mCubes[ VTKMPRDATA_MAXTISSUE ];
-       vtkStripper                             *_tissueStripper[ VTKMPRDATA_MAXTISSUE ];
-       vtkPolyDataMapper               *_tissueMapper[ VTKMPRDATA_MAXTISSUE ];
-       vtkPlanes                               *_tissuePlanes[ VTKMPRDATA_MAXTISSUE ];
-       vtkClipPolyData                 *_tissueClipper[ VTKMPRDATA_MAXTISSUE ];
+       vtkMarchingCubes                                        *_mCubes[ VTKMPRDATA_MAXTISSUE ];
+       vtkStripper                                                     *_tissueStripper[ VTKMPRDATA_MAXTISSUE ];
+       vtkPolyDataMapper                                       *_tissueMapper[ VTKMPRDATA_MAXTISSUE ];
+       vtkPlanes                                                       *_tissuePlanes[ VTKMPRDATA_MAXTISSUE ];
+       vtkClipPolyData                                         *_tissueClipper[ VTKMPRDATA_MAXTISSUE ];
 
        /// Volume
-       vtkPiecewiseFunction            *_tfun;
-       vtkColorTransferFunction        *_ctfun;
+       vtkPiecewiseFunction                            *_tfun;
+       vtkColorTransferFunction                        *_ctfun;
 //     vtkVolumeRayCastCompositeFunction       *_compositeFunction;
-       vtkPlanes                                       *_volumePlanes;
-       vtkVolumeRayCastMapper          *_volumeMapper;
-       vtkVolumeProperty                       *_volumeProperty;
-       vtkVolume                                       *_newvol;
-       vtkMPRBaseData                          *_vtkmprbasedata;
-       bool                                            _visibleVolume;
-       bool                                            _visibleVolumeBox;
-       bool                                            _representationType[VTKMPRDATA_MAXTISSUE];
-       bool                                            _visibleTissue[VTKMPRDATA_MAXTISSUE];
-       vtkActor                                        *_tissue[VTKMPRDATA_MAXTISSUE];
-       boxSurfaceObserver                      *_observerV;
-       boxSurfaceObserver                      *_observerS[VTKMPRDATA_MAXTISSUE];
-
-       std::vector<double>                     greyValuesTransferenceFVector;
-       std::vector<double>                     intensityValuesTransferenceFVector;
-       std::vector<double>                     redColorsOfColorTransferenceFVector;
-       std::vector<double>                     greenColorsOfColorTransferenceFVector;
-       std::vector<double>                     blueColorsOfColorTransferenceFVector;
-       std::vector<double>                     greyValueColorsOfColorTransferenceFVector;
-
+       vtkPlanes                                                       *_volumePlanes;
+       
+#if (VTK_MAJOR_VERSION <= 7) 
+       vtkVolumeRayCastMapper                          *_volumeMapper;
+#else 
+       vtkFixedPointVolumeRayCastMapper        *_volumeMapper;
+#endif
+       
+       
+       vtkVolumeProperty                                       *_volumeProperty;
+       vtkVolume                                                       *_newvol;
+       vtkMPRBaseData                                          *_vtkmprbasedata;
+       bool                                                            _visibleVolume;
+       bool                                                            _visibleVolumeBox;
+       bool                                                            _representationType[VTKMPRDATA_MAXTISSUE];
+       bool                                                            _visibleTissue[VTKMPRDATA_MAXTISSUE];
+       vtkActor                                                        *_tissue[VTKMPRDATA_MAXTISSUE];
+       boxSurfaceObserver                                      *_observerV;
+       boxSurfaceObserver                                      *_observerS[VTKMPRDATA_MAXTISSUE];
+
+       std::vector<double>                                     greyValuesTransferenceFVector;
+       std::vector<double>                                     intensityValuesTransferenceFVector;
+       std::vector<double>                                     redColorsOfColorTransferenceFVector;
+       std::vector<double>                                     greenColorsOfColorTransferenceFVector;
+       std::vector<double>                                     blueColorsOfColorTransferenceFVector;
+       std::vector<double>                                     greyValueColorsOfColorTransferenceFVector;
+
+#if (VTK_MAJOR_VERSION <= 7) 
        vtkVolumeRayCastCompositeFunction   *_compositeFunction;
        vtkVolumeRayCastMIPFunction         *_compositeFunctionMIP ;
+#else 
+       // ..
+#endif
+
 
        bool _isRayCasting;
        bool _isMIP;