]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkVecIsoSurfaceExtractor.cxx
#3403 BBTK Feature New Normal - vtk8itk5wx3-macos
[bbtk.git] / packages / vtk / src / bbvtkVecIsoSurfaceExtractor.cxx
index 61e924696ccf9e6a02b8c3936e1a4ebcd8771a3d..e661cc558c450aa1b72b113956e8d60594943126 100644 (file)
@@ -1,3 +1,30 @@
+/*
+ # ---------------------------------------------------------------------
+ #
+ # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+ #                        pour la SantÈ)
+ # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+ # Previous Authors : Laurent Guigues, Jean-Pierre Roux
+ # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+ #
+ #  This software is governed by the CeCILL-B license under French law and
+ #  abiding by the rules of distribution of free software. You can  use,
+ #  modify and/ or redistribute the software under the terms of the CeCILL-B
+ #  license as circulated by CEA, CNRS and INRIA at the following URL
+ #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+ #  or in the file LICENSE.txt.
+ #
+ #  As a counterpart to the access to the source code and  rights to copy,
+ #  modify and redistribute granted by the license, users are provided only
+ #  with a limited warranty  and the software's author,  the holder of the
+ #  economic rights,  and the successive licensors  have only  limited
+ #  liability.
+ #
+ #  The fact that you are presently reading this means that you have had
+ #  knowledge of the CeCILL-B license and that you accept its terms.
+ # ------------------------------------------------------------------------ */
+
+
 #include "bbvtkVecIsoSurfaceExtractor.h"
 #include "bbvtkPackage.h"
 
@@ -13,10 +40,7 @@ BBTK_BLACK_BOX_IMPLEMENTATION(VecIsoSurfaceExtractor,bbtk::AtomicBlackBox);
        //-----------------------------------------------------------   
        void VecIsoSurfaceExtractor::bbUserSetDefaultValues()
        {
-       
-std::cout <<
-"================================VecIsoSurfaceExtractor::bbUserSetDefaultValues()"
-<< std::endl;
+//EED std::cout << "================================VecIsoSurfaceExtractor::bbUserSetDefaultValues()" << std::endl;
                std::vector<double> colour;
                // 1- red
                colour.push_back(1.0);
@@ -59,17 +83,13 @@ std::cout <<
        { 
                //    bbSetInputIn(NULL);
                //    bbSetInputInVtkObject(NULL);
-std::cout <<
-"================================VecIsoSurfaceExtractor::bbUserInitializeProcessing()"
-<< std::endl;  
+//EED std::cout << "================================VecIsoSurfaceExtractor::bbUserInitializeProcessing()" << std::endl;        
        }
        
        //-----------------------------------------------------------   
        void VecIsoSurfaceExtractor::bbUserFinalizeProcessing()
        {
-std::cout <<
-"================================VecIsoSurfaceExtractor::bbUserFinalizeProcessing()"
-<< std::endl;
+//EED std::cout << "================================VecIsoSurfaceExtractor::bbUserFinalizeProcessing()" << std::endl;
                int i,size = VecMarchingcubes.size();
                for (i=0;i<size;i++)
                {
@@ -85,9 +105,7 @@ std::cout <<
        //-----------------------------------------------------------   
        void VecIsoSurfaceExtractor::Process()
        {
-std::cout <<
-"================================VecIsoSurfaceExtractor::Process()"
-<< std::endl;
+//EED std::cout <<"================================VecIsoSurfaceExtractor::Process()" << std::endl;
                double r,g,b;
                vtkMarchingCubes  *marchingcubes;
                vtkPolyDataMapper *polydatamapper;
@@ -116,11 +134,18 @@ std::cout <<
                        polydatamapper = vtkPolyDataMapper::New();
                        vtkactor       = vtkActor::New();
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        polydatamapper->SetInput(marchingcubes->GetOutput());
+#else
+                       polydatamapper->SetInputData(marchingcubes->GetOutput());
+#endif
+
                        vtkactor->SetMapper(polydatamapper);
 
                        polydatamapper->ScalarVisibilityOff();
-                       polydatamapper->ImmediateModeRenderingOn();
+//EED 2020-04-21 vtk8 deprecated
+//                     polydatamapper->ImmediateModeRenderingOn();
 
                        VecMarchingcubes.push_back(marchingcubes);
                        VecPolydatamapper.push_back(polydatamapper);
@@ -132,7 +157,13 @@ std::cout <<
                        marchingcubes=VecMarchingcubes[i];
                        vtkactor=(vtkActor*)VecVtkactor[i];
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        marchingcubes->SetInput( bbGetInputIn()[i] );
+#else
+                       marchingcubes->SetInputData( bbGetInputIn()[i] );
+#endif
+
                        marchingcubes->SetValue(0, bbGetInputIsovalue() );
                        marchingcubes->Update();