]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkRescaleSlopeIntercept.cxx
#3107 BBTK Bug New Normal - branch vtk7itk4 compilation with vtk7
[bbtk.git] / packages / vtk / src / bbvtkRescaleSlopeIntercept.cxx
index 117b97931a3c68e7634a99f9cb074b2d4e5ceb6b..e9cf56dc03e893b951d6bfd9534afaf84810724e 100644 (file)
@@ -43,6 +43,7 @@ BBTK_BLACK_BOX_IMPLEMENTATION(RescaleSlopeIntercept,bbtk::AtomicBlackBox);
 //===== 
 void RescaleSlopeIntercept::Process()
 {
+printf("RescaleSlopeIntercept::Process Start\n");
 
 // THE MAIN PROCESSING METHOD BODY
 //   Here we simply set the input 'In' value to the output 'Out'
@@ -110,25 +111,50 @@ void RescaleSlopeIntercept::Process()
                        shift= A + (range[1]*newdifrange/difrange);
                } // if type 3
                
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                filter1->SetInput( bbGetInputIn() );
+#else
+               filter1->SetInputData( bbGetInputIn() );
+#endif
+
                filter1->SetOutputScalarType( VTK_DOUBLE );
                filter1->SetShift( 0 );
                filter1->SetScale( scale );
                
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                filter2->SetInput( filter1->GetOutput() );
+#else
+               filter2->SetInputData( filter1->GetOutput() );
+#endif
+
                filter2->SetOutputScalarType( outputformat );
                filter2->SetShift( shift );
                filter2->SetScale( 1 );
                
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                mchange->SetInput( filter2->GetOutput() );
+#else
+               mchange->SetInputData( filter2->GetOutput() );
+#endif
+
                mchange->SetExtentTranslation( -ext[0], -ext[2], -ext[4] );
                mchange->SetOutputSpacing (spc);
+               filter1->Update();    //important
+               filter2->Update();    //important
                mchange->Update();    //important
                bbSetOutputOut( mchange->GetOutput() );
+printf("RescaleSlopeIntercept::Process A\n");
                
        } else  {
+printf("RescaleSlopeIntercept::Process B\n");
                bbSetOutputOut( NULL );
        }               // if bbGetInputIn      
+printf("RescaleSlopeIntercept::Process End\n");
+
 }