]> Creatis software - bbtk.git/commitdiff
#3107 BBTK Bug New Normal - branch vtk7itk4 compilation with vtk7
authorEduardo DAVILA <davila@localhost.localdomain>
Fri, 21 Jul 2017 16:05:21 +0000 (18:05 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Fri, 21 Jul 2017 16:05:21 +0000 (18:05 +0200)
32 files changed:
kernel/src/bbtkVtkBlackBoxMacros.h
packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.cxx
packages/itkvtk/src/itkVTKImageToImageFilter.txx
packages/vtk/src/bbvtkAppendPolyData.xml
packages/vtk/src/bbvtkInversCrop.cxx
packages/vtk/src/bbvtkMIPCreator.cxx
packages/vtk/src/bbvtkMagnitud.cxx
packages/vtk/src/bbvtkMaskPoint.cxx
packages/vtk/src/bbvtkMetaImageWriter.xml
packages/vtk/src/bbvtkPlaneClipPolyData.cxx
packages/vtk/src/bbvtkPolyDataReaderPlus.cxx
packages/vtk/src/bbvtkPolyDataToActor.cxx
packages/vtk/src/bbvtkPolyDataWriter.xml
packages/vtk/src/bbvtkPolyDataWriterPlus.cxx
packages/vtk/src/bbvtkProbeFilter.cxx
packages/vtk/src/bbvtkRescaleSlopeIntercept.cxx
packages/vtk/src/bbvtkSegmentationConnectivity.cxx
packages/vtk/src/bbvtkSliceImage.cxx
packages/vtk/src/bbvtkSphereList.cxx
packages/vtk/src/bbvtkStructuredPointsReader.cxx
packages/vtk/src/bbvtkSurfaceTexture.cxx
packages/vtk/src/bbvtkTemporalPicker.cxx
packages/vtk/src/bbvtkUnMosaic.cxx
packages/vtk/src/bbvtkUnaryOperations.cxx
packages/vtk/src/bbvtkVecImageGaussianSmooth.cxx
packages/vtk/src/bbvtkVecIsoSurfaceExtractor.cxx
packages/vtk/src/bbvtkVolumeRenderer.cxx
packages/wxvtk/src/bbwxvtkViewer2D.cxx
packages/wxvtk/src/wxVTKRenderWindowInteractor.cxx
packages/wxvtk/src/wxVTKRenderWindowInteractor.h
packages/wxvtk/src/wxvtkImageViewer2.cxx
packages/wxvtk/src/wxvtkImageViewer2.h

index 0bf9acc1a4756efcfcdc6c5f65349bda5e0101ef..615af269c35f018852c26bf1ec82a1021b6eebd6 100644 (file)
 */
 
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+
 //===========================================================================
 /// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input 
-#define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE)              \
-  public:                                                              \
-  TYPE bbGetInput##NAME ()                                             \
-  { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
-  void bbSetInput##NAME (TYPE d)                                       \
-  { if (mVtkObject) mVtkObject->SetInput( (vtkDataObject*) d); }
+  #define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE)            \
+    public:                                                            \
+    TYPE bbGetInput##NAME ()                                           \
+    { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
+    void bbSetInput##NAME (TYPE d)                                     \
+    { if (mVtkObject) mVtkObject->SetInput( (vtkDataObject*) d); }
+#else
+//===========================================================================
+/// Declares a vtkImageAlgorithm-inherited AtomicBlackBox input 
+  #define BBTK_DECLARE_VTK_IMAGE_ALGORITHM_INPUT(NAME,TYPE)            \
+    public:                                                            \
+    TYPE bbGetInput##NAME ()                                           \
+    { if (mVtkObject) return mVtkObject->GetImageDataInput(0); return 0; } \
+    void bbSetInput##NAME (TYPE d)                                     \
+    { if (mVtkObject) mVtkObject->SetInputData( (vtkDataObject*) d); }
+
+#endif
+
 
 //===========================================================================
 
 //===========================================================================
 
 //===========================================================================
+
+//EED 2017-01-01 Migration VTK7                                        
+
+#if (VTK_MAJOR_VERSION <= 5)                                           
+
 /// Declares a vtkAlgorithm-inherited AtomicBlackBox input 
 #define BBTK_DECLARE_VTK_INPUT(NAME,TYPE)                              \
   public:                                                              \
   void bbSetInput##NAME (TYPE d)                                       \
   { if (mVtkObject)  mVtkObject->SetInput( (vtkDataObject*) d); }
 
+#endif                                                                         
+
+
+
+#if (VTK_MAJOR_VERSION >= 6)                                           
+
+/// Declares a vtkAlgorithm-inherited AtomicBlackBox input 
+#define BBTK_DECLARE_VTK_INPUT(NAME,TYPE)                              \
+  public:                                                              \
+  TYPE bbGetInput##NAME ()                                             \
+  { if (mVtkObject) return dynamic_cast<TYPE>(mVtkObject->GetInput()); \
+    return 0;}                                                         \
+  void bbSetInput##NAME (TYPE d)                                       \
+  { if (mVtkObject)  mVtkObject->SetInputData( (vtkDataObject*) d); }
+
+#endif                                                                         
+
+
 //===========================================================================
 
 //===========================================================================
index 197ed037997da829b0de5672b6af03575e0bc767..9d945b1c91e54a738a4696c9b6fc2d6ec6f01ebe 100644 (file)
@@ -59,14 +59,21 @@ vtkImageData* GetXCoherentInfoGdcmReader::CreateDefaultImage()
        sizeZ = 1;
        vtkImageData *newImage = vtkImageData::New();
        newImage->Initialize();
-       newImage->SetScalarTypeToUnsignedChar();
        newImage->SetSpacing( 1,1,1 );
        newImage->SetDimensions(  sizeX,sizeY,sizeZ );
-       newImage->SetWholeExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );
        newImage->SetExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+       newImage->SetWholeExtent(0,  sizeX-1,0,sizeY-1,0,sizeZ-1 );
+       newImage->SetScalarTypeToUnsignedChar();
        newImage->SetNumberOfScalarComponents(1);
        newImage->AllocateScalars();
        newImage->Update();
+#else
+       newImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);
+#endif
+
        memset ( (void*)newImage->GetScalarPointer(), 0, sizeX*sizeY*1 );
        for (i=0; i<sizeX; i++)
        {
index 639b689950ab41103425b137b29c502038203337..0da4748a8ee0bd04e390b16d74e0e27c67de60e9 100644 (file)
@@ -99,7 +99,12 @@ void
 VTKImageToImageFilter<TOutputImage>
 ::SetInput( vtkImageData * inputImage )
 {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   m_Exporter->SetInput( inputImage );
+#else
+  m_Exporter->SetInputData( inputImage );
+#endif
 }
 
 
index cb8dd8635ed594e5b1eea9cdeea5e90c1d04a0e4..5ff9389bd00366b391a49e576f077d6597d51047 100644 (file)
 
 <process>
 <PRE>
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   bbGetVtkObject()->SetInput(bbGetInputIn1());
   bbGetVtkObject()->SetInput(bbGetInputIn2());
   bbGetVtkObject()->SetInput(bbGetInputIn3());
   bbGetVtkObject()->SetInput(bbGetInputIn4());
   bbGetVtkObject()->SetInput(bbGetInputIn5());
+#else
+  bbGetVtkObject()->SetInputData(bbGetInputIn1());
+  bbGetVtkObject()->SetInputData(bbGetInputIn2());
+  bbGetVtkObject()->SetInputData(bbGetInputIn3());
+  bbGetVtkObject()->SetInputData(bbGetInputIn4());
+  bbGetVtkObject()->SetInputData(bbGetInputIn5());
+#endif
+
    
   bbGetVtkObject()->Update();
 </PRE>
index 97963bca7327d6d4f3edc07a6ac10e4ba8019d7f..8581943820eb2e983ad2861975efcda79f2223cb 100644 (file)
@@ -34,7 +34,13 @@ void InversCrop::Process()
        int dim[3];
        int ext[6];
        
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        bbGetInputImageFix()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       bbGetInputImageFix()->GetExtent(ext);
+#endif
        dim[0]= ext[1]-ext[0]+1;
        dim[1]= ext[3]-ext[2]+1;
        dim[2]= ext[5]-ext[4]+1;
@@ -43,10 +49,16 @@ void InversCrop::Process()
        {
                _imageoutput = vtkImageData::New();
                _imageoutput->Initialize();
-               _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
                _imageoutput->SetSpacing( bbGetInputImageFix()->GetSpacing() );
                _imageoutput->SetDimensions(  dim[0], dim[1], dim[2] );
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+               _imageoutput->SetScalarType( bbGetInputImageFix()->GetScalarType() );
                _imageoutput->AllocateScalars();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+               _imageoutput->AllocateScalars(bbGetInputImageFix()->GetScalarType() , 1);
+#endif
        }
        if (bbGetInputType()==1)
        {
@@ -62,7 +74,14 @@ void InversCrop::Process()
        int j,k; 
        int px,py,pz;
 
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        bbGetInputImageMove()->GetWholeExtent(ext);
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       bbGetInputImageMove()->GetExtent(ext);
+#endif
+
        int dimMoveX = ext[1]-ext[0]+1;
        int dimMoveY = ext[3]-ext[2]+1;
        int dimMoveZ = ext[5]-ext[4]+1;
index c1bf38d3f63b646b805dc302288c95191ac7ac9f..c822385d7eaba8a256b5c4148a0cadf43148d8c6 100644 (file)
@@ -125,12 +125,24 @@ namespace bbvtk
 
         double ranges[2];
         vtkImageData *image =  bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
         image->Update();
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       // ..
+#endif
         image->GetScalarRange(ranges);
 
           scale = 255/(ranges[1]/100);
 
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        mCast->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       mCast->SetInputData( bbGetInputIn() );
+#endif
        mCast->SetScale( scale / 100.0 );
      //mCast->SetShift( -bbGetInputShift() );
 
@@ -212,7 +224,14 @@ namespace bbvtk
 
         mMapper = vtkVolumeRayCastMapper::New();
         mMapper->SetVolumeRayCastFunction(mMIP);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
         mMapper->SetInput(mCast->GetOutput()); // (smoother.GetOutput())
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+        mMapper->SetInputData(mCast->GetOutput()); // (smoother.GetOutput())
+#endif
 
         mVolume = vtkVolume::New();
         mVolume->SetMapper(mMapper);
index db2fdecf6c50d6ae5e944b7a4bfbd09030adf7ad..c0e21cedf3bc6f2d4775e38226cfcf4f7733c410 100644 (file)
@@ -59,24 +59,54 @@ void Magnitud::Process()
    vGreenToRedLut->Build();
   
   //Input Data
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vVecMagnitude->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vVecMagnitude->SetInputData(bbGetInputIn());
+#endif
+
    vVecMagnitude->NormalizeOff();
    vVecMagnitude->Update();
    vVecMagnitude->GetOutput()->GetScalarRange( range1 );
    vVecMagnitude->Update();
    
    //Glyph
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vMaskPoint->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vMaskPoint->SetInputData(bbGetInputIn());
+#endif
+
    vMaskPoint->SetOnRatio(100);
    vMaskPoint->Update();
    vMaskPoint->RandomModeOn();
    
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vGlyph->SetInput(vMaskPoint->GetOutput());
    vGlyph->SetSource(cone->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vGlyph->SetInputData(vMaskPoint->GetOutput());
+   vGlyph->SetSourceData(cone->GetOutput());
+#endif
+
    vGlyph->SetScaleModeToScaleByVector();
    vGlyph->SetColorModeToColorByVector();
    vGlyph->SetScaleFactor(0.20);
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vGlyphMapper->SetInput( vGlyph->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vGlyphMapper->SetInputData( vGlyph->GetOutput() );
+#endif
+
    step = (range1[1]-range1[0])/10;
       
    //Contour
@@ -84,7 +114,13 @@ void Magnitud::Process()
    dRangeColorForMultipleContourVelocity[1]=1;
    dRangeColorForGlyphVelocity[0]=0;
    dRangeColorForGlyphVelocity[1]=1;
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vMultipleContourVelocity->SetInput((vtkDataSet *) vVecMagnitude->GetOutput()); 
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vMultipleContourVelocity->SetInputData((vtkDataSet *) vVecMagnitude->GetOutput()); 
+#endif
    
    index = 0;
    double h;
@@ -96,7 +132,14 @@ void Magnitud::Process()
       index+=1;
    }
    
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vMultipleContourMapper->SetInput( vMultipleContourVelocity->GetOutput() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vMultipleContourMapper->SetInputData( vMultipleContourVelocity->GetOutput() );
+#endif
+
    vMultipleContourMapper->SetScalarRange( range1 );
    vMultipleContourMapper->SetLookupTable( vGreenToRedLut );
    vMultipleContourMapper->Update();
@@ -109,8 +152,16 @@ void Magnitud::Process()
    vGlyphMapper->ImmediateModeRenderingOn();
  
    //Outline Grid
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vOutlineGrid->SetInput( bbGetInputIn() );
    vOutlineMapper->SetInput(vOutlineGrid->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vOutlineGrid->SetInputData( bbGetInputIn() );
+   vOutlineMapper->SetInputData(vOutlineGrid->GetOutput());
+#endif
+
    
    //Outline Grid Actor
    vOutlineActor->SetMapper(vOutlineMapper);
@@ -192,7 +243,13 @@ void Magnitud::Process()
    //End: Change values by the user
    ///////////////////////////////////////////////////////////////////////////////////////////////////
    //The Plane Widget
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vPlaneWidget->SetInput(bbGetInputIn());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vPlaneWidget->SetInputData(bbGetInputIn());
+#endif
    vPlaneWidget->NormalToXAxisOn();
    vPlaneWidget->NormalToZAxisOn();
    vPlaneWidget->SetResolution(1);
@@ -203,7 +260,7 @@ void Magnitud::Process()
    vPlaneWidget->On();
 
    vPlaneWidget->GetOrigin(p0);
-   vPlaneWidget->GetCenter(c); //These is from Execute Method
+   vPlaneWidget->GetCenter(c); //These is fromvtkImageMathematics Execute Method
    vPlaneWidget->GetNormal(n);
    vPlaneWidget->GetPoint1(p1);
    vPlaneWidget->GetPoint2(p2);
@@ -228,7 +285,14 @@ void Magnitud::Process()
    vDiskSourceEED->SetCircumferentialResolution (20);
 
    //Stream Lines
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vPointWidget->SetInput( bbGetInputIn() );
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vPointWidget->SetInputData( bbGetInputIn() );
+#endif
+
    vPointWidget->AllOff();
    vPointWidget->PlaceWidget();
    //vPointWidget->SetInteractor(vIren);
@@ -246,8 +310,16 @@ void Magnitud::Process()
    source->SetCenter(  c );
    source->SetRadius(5.0);
    
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    streamer->SetInput( bbGetInputIn() );
    streamer->SetSource(source->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   streamer->SetInputData( bbGetInputIn() );
+   streamer->SetSourceData(source->GetOutput());
+#endif
+
    streamer->SetIntegratorTypeToRungeKutta45();
    streamer->SetMaximumPropagation(500000);
 //EED    streamer->SetMaximumPropagationUnitToTimeUnit ();
@@ -257,13 +329,28 @@ void Magnitud::Process()
 //EED   streamer->ComputeVorticityOn ();
    streamer->Update();
 
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    rf->SetInput(streamer->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   rf->SetInputData(streamer->GetOutput());
+#endif
+
    rf->SetRadius(.5);
    rf->SetNumberOfSides(12);
    rf->SetVaryRadiusToVaryRadiusOff();
    
    streamer->GetOutput()->GetScalarRange( range );
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    streamMapper2->SetInput(rf->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   streamMapper2->SetInputData(rf->GetOutput());
+#endif
+
    streamMapper2->SetLookupTable(vGreenToRedLut);
    //vStreamlineActor2->SetMapper( streamMapper2 );
    
@@ -285,31 +372,62 @@ void Magnitud::Process()
    //End: Part of the Execute Method
    //////////////////////////////////////////////////////////////////////////////////////
 
-   vtransformpolydatafilter->SetInput( vDiskSourceEED->GetOutput() );
    vtransformpolydatafilter->SetTransform( transformEED );
-   vtransformpolydatafilter->Update();
    
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
+   vtransformpolydatafilter->SetInput( vDiskSourceEED->GetOutput() );
    vProbeslices->SetInput( ( vtkDataSet* )vtransformpolydatafilter->GetOutput());
    vProbeslices->SetSource( bbGetInputIn() ); 
-   vProbeslices->Update( );
-
    vGlyphFlowPlane->SetInput(vProbeslices->GetOutput());
    vGlyphFlowPlane->SetSource(vArrowSource->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vtransformpolydatafilter->SetInputData( vDiskSourceEED->GetOutput() );
+   vProbeslices->SetInputData( ( vtkDataSet* )vtransformpolydatafilter->GetOutput());
+   vProbeslices->SetSourceData( bbGetInputIn() ); 
+   vGlyphFlowPlane->SetInputData(vProbeslices->GetOutput());
+   vGlyphFlowPlane->SetSourceData(vArrowSource->GetOutput());
+#endif
+
+   vtransformpolydatafilter->Update();
+   vProbeslices->Update( );
+
+
    vGlyphFlowPlane->SetScaleModeToScaleByVector();
    vGlyphFlowPlane->SetColorModeToColorByVector();
    vGlyphFlowPlane->SetScaleFactor(0.2);
    vGlyphFlowPlane->Update();
 
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vProbeslicesFlowWidget->SetInput( ( vtkDataSet* )vPlanSource->GetOutput());
    vProbeslicesFlowWidget->SetSource( vVecMagnitude->GetOutput() ); 
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vProbeslicesFlowWidget->SetInputData( ( vtkDataSet* )vPlanSource->GetOutput());
+   vProbeslicesFlowWidget->SetSourceData( vVecMagnitude->GetOutput() ); 
+#endif
+
    vProbeslicesFlowWidget->Update( );
       
    vVecMagnitude->GetOutput()->GetScalarRange( range );
 
+
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
    vAppendDataForFlowWidgetVisualisation->AddInput(vGlyphFlowPlane->GetOutput());
    vAppendDataForFlowWidgetVisualisation->AddInput(vProbeslicesFlowWidget->GetPolyDataOutput());
-
    vSliceMapper->SetInput( vAppendDataForFlowWidgetVisualisation->GetOutput());
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+   vAppendDataForFlowWidgetVisualisation->AddInputData(vGlyphFlowPlane->GetOutput());
+   vAppendDataForFlowWidgetVisualisation->AddInputData(vProbeslicesFlowWidget->GetPolyDataOutput());
+   vSliceMapper->SetInputData( vAppendDataForFlowWidgetVisualisation->GetOutput());
+#endif
+
    vSliceMapper->SetScalarRange( range );
    vSliceMapper->SetLookupTable( vGreenToRedLut );
    
index c192648b2747b206f4ba2f5600997b851cabb72c..58a2c739344f021adec9f3ad0871f92716aa2f94 100644 (file)
@@ -26,14 +26,19 @@ void MaskPoint::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
 
-printf("EED MaskPoint::Process Start\n");
+//EED 2017-01-01 Migration VTK7
+#if (VTK_MAJOR_VERSION <= 5) 
        maskpoints->SetInput( bbGetInputIn() );  
+#endif
+#if (VTK_MAJOR_VERSION >= 6) 
+       maskpoints->SetInputData( bbGetInputIn() );  
+#endif
+
        maskpoints->SetOnRatio( bbGetInputRatio() );
        maskpoints->RandomModeOn();     
        maskpoints->SetMaximumNumberOfPoints(5000);     
        maskpoints->Update();
        bbSetOutputOut( maskpoints->GetOutput() );
-printf("EED MaskPoint::Process End\n");
 }
 //===== 
 // 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)
index 0a09e3c92715a20f4a470c6441cc713a7ef1fa8c..21f22d72fcc6b1611ad7d0d08a8c55d423940529 100644 (file)
  
  <process><PRE>
    vtkMetaImageWriter* w = vtkMetaImageWriter::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    bbGetInputIn()->Update();
+#else
+       // ...
+#endif
 
 /*
    if (bbGetInputIn() == 0)
 
   if (bbGetInputIn()!=NULL)
   {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
      w->SetInput(bbGetInputIn());
+#else
+     w->SetInputData(bbGetInputIn());
+#endif
      w->SetCompression(bbGetInputCompression());  
      w->SetFileDimensionality(bbGetInputIn()->GetDataDimension()); // NTU
      std::string userGivenName = bbGetInputFilename();
index e3432ee67f12f5bdb9eec91466d2d5668e8385ca..9e63987690a16c1fcd6fb8757738a5505ffb18ca 100644 (file)
@@ -26,7 +26,14 @@ void PlaneClipPolyData::Process()
        plane->SetNormal(normal[0],normal[1],normal[2]);
 
        vtkClipPolyData* clipper = vtkClipPolyData::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        clipper->SetInputConnection(inPolyData->GetProducerPort());
+#else
+       clipper->SetInputData(inPolyData);
+#endif
+
        clipper->SetClipFunction(plane);
        clipper->Update();
 
index e6bc5b639627b5d8f2870c771ff2a554c1c0ef4e..2f7c44f770cbd9ecc4c3ce3e681b0c7b2183c85d 100644 (file)
@@ -82,9 +82,14 @@ void PolyDataReaderPlus::Process()
        vtkActor *actor = (vtkActor*)bbGetOutputOutActor();
        vtkPolyDataMapper *mapper = vtkPolyDataMapper::New();
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        mapper->SetInput(informacion);
-       actor->SetMapper(mapper);
+#else
+       mapper->SetInputData(informacion);
+#endif
 
+       actor->SetMapper(mapper);
        bbSetOutputOutActor(actor);
 
        if (bbGetInputInColor().size()  >= 3)
index 58852e83ed9df71d7b01f60835d83c4e7aff505b..0a2fdfdb24074331ed862707a18e2c28901bfb3b 100644 (file)
@@ -110,7 +110,13 @@ namespace bbvtk
 
                if (bbGetInputActive()==true)
                {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                         polydatamapper->SetInput( bbGetInputIn() );
+#else
+                        polydatamapper->SetInputData( bbGetInputIn() );
+#endif
+
                         vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
                         vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
                           
index a2a583cd97cf7236334917fd7d5105d26d209792..9fec3be1e010e01c80d7d145882204c7fa2adb52 100644 (file)
@@ -16,8 +16,6 @@
  
  <process><PRE>
 
-     printf("EED PolyDataWriter::Process() %s\n", bbGetInputFilename().c_str());
-
    vtkPolyDataWriter* w = vtkPolyDataWriter::New();
    if (bbGetInputFileType()==0) 
        {
        } else {
                w->SetFileTypeToBinary();
        }
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    bbGetInputIn()->Update();
    w->SetInput(bbGetInputIn());
+#else
+   w->SetInputData(bbGetInputIn());
+#endif
+
    w->SetFileName(bbGetInputFilename().c_str());
    w->Update();   
    w->Write();
index bca2a1cd037694130ae608e99478bf6a796f67ce..0c9de87efec7a95e78e6eb5bfc4eaaeca3defc14 100755 (executable)
@@ -87,7 +87,14 @@ void PolyDataWriterPlus::Process()
 
 
        vtkDataSetSurfaceFilter* surfaceFilter = vtkDataSetSurfaceFilter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        surfaceFilter->SetInput(entrada);
+#else
+       surfaceFilter->SetInputData(entrada);
+#endif
+
        surfaceFilter->Update();
        //vtkPolyData* polydata = surfaceFilter->GetOutput();
        entrada = surfaceFilter->GetOutput();
@@ -95,7 +102,14 @@ void PolyDataWriterPlus::Process()
        if (extension.compare("vtk") == 0)
        {
                vtkPolyDataWriter* writer = vtkPolyDataWriter::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                writer->SetInput(entrada);
+#else
+               writer->SetInputData(entrada);
+#endif
+
                writer->SetFileName(nuevo_nombre.data());
                writer->Write();
                writer->Delete();
@@ -105,7 +119,14 @@ void PolyDataWriterPlus::Process()
        {
                vtkXMLPolyDataWriter* writer = vtkXMLPolyDataWriter::New();
                writer->SetFileName ( nuevo_nombre.data() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                writer->SetInput ( entrada );
+#else
+               writer->SetInputData ( entrada );
+#endif
+
                writer->Write();
                writer->Delete();
        }
@@ -114,7 +135,14 @@ void PolyDataWriterPlus::Process()
        {
                vtkSTLWriter* writer = vtkSTLWriter::New();
                writer->SetFileName ( nuevo_nombre.data() );
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                writer->SetInput ( entrada );
+#else
+               writer->SetInputData ( entrada );
+#endif
+
                writer->Write();
                writer->Print(std::cout);
                writer->Delete();
index 4007cfbe93960a848c73032ecfffa4ef2e558f6b..6dc66a9a49e6e98ea8742e51b14f1cb5099d8915 100644 (file)
@@ -26,16 +26,19 @@ void ProbeFilter::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
 
-printf("EED ProbeFilter::Process() Start\n");
-
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
       _probefilter->SetSource( bbGetInputSource() ); 
       _probefilter->SetInput( bbGetInputInput() ); 
+#else
+      _probefilter->SetSourceData( bbGetInputSource() ); 
+      _probefilter->SetInputData( bbGetInputInput() ); 
+#endif
+
       _probefilter->Update();
       bbSetOutputOut( _probefilter->GetOutput() );
 
-printf("EED ProbeFilter::Process() End\n");
-
 }
 //===== 
 // 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)
index 117b97931a3c68e7634a99f9cb074b2d4e5ceb6b..9262c509af330d0effaaa09e1175bb38b470c154 100644 (file)
@@ -110,17 +110,36 @@ 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);
                mchange->Update();    //important
index 3b28389b314c7ba907561d6707610220205a9f43..a04f6bdc11655b7a6948ef72cc4588766dc9ed95 100644 (file)
@@ -84,15 +84,27 @@ namespace bbvtk
        {
 
                thresh2 = vtkImageThreshold::New();
-                       thresh2->SetInValue(255);
-                       thresh2->SetOutputScalarTypeToUnsignedChar();
+               thresh2->SetInValue(255);
+               thresh2->SetOutputScalarTypeToUnsignedChar();
                connect2 = vtkImageSeedConnectivity::New();
-                       connect2->SetInput(thresh2->GetOutput());
-                       connect2->SetInputConnectValue(255);
-                       connect2->SetOutputConnectedValue( 255 );
-                       connect2->SetOutputUnconnectedValue(0);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               connect2->SetInput(thresh2->GetOutput());
+#else
+               connect2->SetInputData(thresh2->GetOutput());
+#endif
+
+               connect2->SetInputConnectValue(255);
+               connect2->SetOutputConnectedValue( 255 );
+               connect2->SetOutputUnconnectedValue(0);
                cast4 = vtkImageCast::New();
-                       cast4->SetInput(connect2->GetOutput());
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+               cast4->SetInput(connect2->GetOutput());
+#else
+               cast4->SetInputData(connect2->GetOutput());
+#endif
 
 // EED 2016 06 15
 
@@ -157,18 +169,32 @@ namespace bbvtk
        {
                int outputformat = bbtkStaticLecture::GetTypeFormat( bbGetInputOutputFormat() , bbGetInputIn() );
                vtkImageData *imagedata = bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                imagedata->UpdateInformation();
                imagedata->SetUpdateExtent(imagedata->GetWholeExtent());
                imagedata->Update();
-               thresh2->ThresholdBetween(3000, 3001);
                thresh2->SetInput(imagedata);
+#else
+               imagedata->SetExtent(imagedata->GetExtent());
+               thresh2->SetInputData(imagedata);
+#endif
+
+               thresh2->ThresholdBetween(3000, 3001);
                thresh2->ThresholdBetween(bbGetInputThresholdMinMax()[0], bbGetInputThresholdMinMax()[1]);
                thresh2->Modified();
                thresh2->Update();
                connect2->RemoveAllSeeds ();
 
                int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                imagedata->GetWholeExtent(ext);
+#else
+               imagedata->GetExtent(ext);
+#endif
+
                int maxX = ext[1]-ext[0]+1;
                int maxY = ext[3]-ext[2]+1;
                int maxZ = ext[5]-ext[4]+1;
index 2088b4843ffc1bce5ed8a1f222fbb5de44067203..4e82b55862039db015962fc5b20292ff2c4d69ad 100755 (executable)
@@ -67,10 +67,15 @@ void SliceImage::Process()
                final = vtkImageData::New();
                final->SetSpacing(space);
                final->SetDimensions(newDim);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                final->SetScalarType(scalar_type);
                final->AllocateScalars();
                final->Update();
-
+#else
+               final->AllocateScalars(scalar_type,1);
+#endif
 
        }
 
@@ -140,7 +145,13 @@ void SliceImage::Process()
        }
 
        caster = vtkImageCast::New();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        caster->SetInput(final);
+#else
+       caster->SetInputData(final);
+#endif
+
        caster->SetOutputScalarTypeToShort();
        caster->Update();
 
index 616f088d4b5093246a909ec71b00e15bcad69b65..24538a70c4f48013b30fd91b953d3aebb87e8f05 100644 (file)
@@ -135,7 +135,14 @@ void SphereList::Process()
                                        newSphere -> SetPhiResolution(20);
                                        newSphere -> SetRadius( 1 ); 
                                        vtkPolyDataMapper * newMapper = vtkPolyDataMapper::New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                                        newMapper -> SetInput( newSphere -> GetOutput() );      
+#else
+                                       newMapper -> SetInputData( newSphere -> GetOutput() );  
+#endif
+
                                        vtkActor * newActor = vtkActor::New();
                                        sphereActor.push_back(newActor);
                                        newActor -> SetMapper(newMapper);
index 930eb905d3e42836a4ebdca03ede83617b1391f1..4dd352be5cdfb93d7279bad332fad4ff72326efa 100644 (file)
@@ -60,7 +60,12 @@ void StructuredPointsReader::Process()
        {
                spr -> SetFileName( bbGetInputIn().c_str() );
                sp = spr->GetOutput();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                sp -> Update();
+#else
+               spr -> Update();
+#endif
                bbSetOutputOut( sp );
        } else {
                bbSetOutputOut( NULL );
index 3e0f81ac70694ef2f423c9c700611b9aba5b628f..119e612c470e8630de8e844c686f7280e5308094 100644 (file)
@@ -33,7 +33,6 @@ void SurfaceTexture::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
   
-printf("EED SurfaceTexture::Process Start\n");
 
        int i;
        double spc[3];
@@ -41,7 +40,15 @@ printf("EED SurfaceTexture::Process Start\n");
        int ext[6];
        bbGetInputImage()->GetSpacing(spc);
        bbGetInputImage()->GetScalarRange(range);
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        bbGetInputImage()->GetWholeExtent(ext);
+#else
+       bbGetInputImage()->GetExtent(ext);
+#endif
+
        int maxX = ext[1]-ext[0]+1;
        int maxY = ext[3]-ext[2]+1;
        int maxZ = ext[5]-ext[4]+1;
index db9240b3e3ac126296855cfad4735d9e7db5d6df..de512515dfbc60118cdce2a615695cc02dab4e0b 100644 (file)
@@ -59,7 +59,14 @@ void TemporalPicker::Process()
        {
                int ext[6];
                int sizeX,sizeY,sizeZ;
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                bbGetInputIn()->GetWholeExtent(ext);
+#else
+               bbGetInputIn()->GetExtent(ext);
+#endif
+
                sizeX=ext[1]-ext[0]+1;
                sizeY=ext[3]-ext[2]+1;
                sizeZ=ext[5]-ext[4]+1;
index 49c617ea587792beed30ad61a878c206874b230e..5e2209f171f5d12157a61c4c2acaeca4b85aed91 100644 (file)
@@ -113,7 +113,13 @@ vtkImageData * UnMosaic::unMosaic(vtkImageData *imageIn, int nbImagesPerRow, int
    int outputdims[3];
    imageIn->GetDimensions (inputdims);
    unsigned short *input = (unsigned short *)(imageIn->GetScalarPointer());
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
    imageIn->Update();
+#else
+       // .. 
+#endif
      
    unsigned int div = (unsigned int)ceil(sqrt( (double)numberOfImagesInMosaic ) );
    outputdims[0] = inputdims[0] / div;
@@ -124,12 +130,21 @@ vtkImageData * UnMosaic::unMosaic(vtkImageData *imageIn, int nbImagesPerRow, int
     vtkImageOut = vtkImageData::New();
     vtkImageOut->SetDimensions( outputdims );
     vtkImageOut->SetExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
-    vtkImageOut->SetWholeExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+   vtkImageOut->SetWholeExtent(0,outputdims[0]-1,0,outputdims[1]-1,0,outputdims[2]-1);
     vtkImageOut->SetNumberOfScalarComponents(1);
 //vtkImageOut->SetSpacing( blabla );
     vtkImageOut->SetScalarType( VTK_UNSIGNED_SHORT );
     vtkImageOut->AllocateScalars();
     vtkImageOut->Update();
+#else
+    vtkImageOut->AllocateScalars(VTK_UNSIGNED_SHORT,1);
+#endif
+
+
+
     
     unsigned short *output =(unsigned short *)(vtkImageOut->GetScalarPointer());
 
index 706949fe06a2c00025ac4e0ea0d301489264561e..f2db9539af4e23a644e65c950ec29cb576086d68 100644 (file)
@@ -54,7 +54,12 @@ void UnaryOperations::Process()
                return;
        }
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
        ope->SetInput1((vtkDataObject*)bbGetInputIn1());
+#else
+       ope->SetInput1Data((vtkDataObject*)bbGetInputIn1());
+#endif
 
 
        switch (bbGetInputOperation())
index 33af404643cc8de4484d5722c58b5136f4856e9e..689b9b14f3def9440e59e2c00ec08c8ad13a43a1 100644 (file)
@@ -82,7 +82,15 @@ BBTK_BLACK_BOX_IMPLEMENTATION(VecImageGaussianSmooth,bbtk::AtomicBlackBox);
                for (i=0 ;  i<size ; i++)
                {       
                        vtkimagegaussiansmooth = vtkImageGaussianSmooth::New();
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                        vtkimagegaussiansmooth->SetInput( bbGetInputIn()[i] );
+#else
+                       vtkimagegaussiansmooth->SetInputData( bbGetInputIn()[i] );
+#endif
+
                        vtkimagegaussiansmooth->SetStandardDeviation( stdvX,stdvY, stdvZ ); 
                        vtkimagegaussiansmooth->Modified();
                        vtkimagegaussiansmooth->Update();
index b3b39fbd2fc72630bb4667f57211990413e4ef0e..2e25383433759e0d7950c4ef2e0051f0f9cc4f9c 100644 (file)
@@ -134,7 +134,13 @@ BBTK_BLACK_BOX_IMPLEMENTATION(VecIsoSurfaceExtractor,bbtk::AtomicBlackBox);
                        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();
@@ -150,7 +156,13 @@ BBTK_BLACK_BOX_IMPLEMENTATION(VecIsoSurfaceExtractor,bbtk::AtomicBlackBox);
                        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();
                         
index a804e1507099a2645db27d23fbc40d8e3ff8e59f..a3b39a5a2d17611513f6b40418fe53348e033ad2 100644 (file)
@@ -126,7 +126,13 @@ void VolumeRenderer::Process()
     bool changed = false;
     if ( bbGetInputStatus("In") != bbtk::UPTODATE )
        {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                mMapper->SetInput( bbGetInputIn() );
+#else
+               mMapper->SetInputData( bbGetInputIn() );
+#endif
                changed = true;
     }
 
index 731d4978e9df71f99fa2d2004a4633082ec760e1..0ab9c25b1bb5231c6a80a8ff6694e21bd7e51227 100644 (file)
@@ -99,10 +99,16 @@ namespace bbwxvtk
     mDefaultImage->SetDimensions ( dim );
     mDefaultImage->SetSpacing(1,1,1);
     mDefaultImage->SetExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
-    mDefaultImage->SetWholeExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+    mDefaultImage->SetWholeExtent(0,dim[0]-1,0,dim[1]-1,0,dim[2]-1);
     mDefaultImage->SetScalarTypeToUnsignedChar();
-    mDefaultImage->AllocateScalars();    
+    mDefaultImage->AllocateScalars();   
+#else
+    mDefaultImage->AllocateScalars(VTK_UNSIGNED_CHAR,1);   
+#endif
     for (int i=0;i<dim[0];i++) 
       for (int j=0;j<dim[1];j++) 
         for (int k=0;k<dim[2];k++) 
@@ -195,7 +201,12 @@ namespace bbwxvtk
        if (backImageData != mBox->bbGetInputIn()) // Don't update if just Slice changed
          {
          backImageData = mBox->bbGetInputIn();
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
          backImageData->Update();
+#else
+       // ..
+#endif
          imageViewer->SetInput( backImageData );
          mUpdateCamera = true;
          }
@@ -272,7 +283,14 @@ namespace bbwxvtk
     {
                int z = mBox->bbGetInputSlice();
                int ext[6];
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                backImageData->GetWholeExtent(ext);
+#else
+               backImageData->GetExtent(ext);
+#endif
+
                /*
                std::cout << "ext = "<<ext[0]<<" - "<<ext[1]<<" ; "
                          <<ext[2]<<" - "<<ext[3]<<" ; "
index ea44bbbf1f74549e6e89b8b8dca9ed3d8692e5e7..0435d9f99ce69957cd6f57c0dad6f1705d1cc4a3 100644 (file)
@@ -160,7 +160,15 @@ BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxWindow)
   EVT_SIZE        (wxVTKRenderWindowInteractor::OnSize)
 END_EVENT_TABLE()
 
-vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+  vtkCxxRevisionMacro(wxVTKRenderWindowInteractor, "$Revision: 1.5 $")
+#else
+  //...
+#endif
+
 vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor)
 
 //---------------------------------------------------------------------------
index 12f33f88b272156d3ebb14bed6576f387548c589..230ef5639d02302e93e6ef2ff0c22eca0655fb02 100644 (file)
@@ -127,7 +127,14 @@ class wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInter
                                 const wxSize &size = wxDefaultSize,
                                 long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
                                 const wxString &name = wxPanelNameStr);
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     vtkTypeRevisionMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
+#else
+    vtkTypeMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
+#endif
+
     static wxVTKRenderWindowInteractor * New();
     void PrintSelf(ostream& os, vtkIndent indent);
 
index adf4c66218bbe8a0095bab8e3201f7ae13351eae..dc3dcfc69586b494efc07ca0b875ca8f7ad4c952 100644 (file)
 #include "vtkRenderWindowInteractor.h"
 #include "vtkRenderer.h"
 
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
 vtkCxxRevisionMacro(wxvtkImageViewer2, "$Revision: 1.8 $");
+#else
+  //...
+#endif
+
 vtkStandardNewMacro(wxvtkImageViewer2);
 
 //----------------------------------------------------------------------------
@@ -222,8 +228,15 @@ void wxvtkImageViewer2::GetSliceRange(int &min, int &max)
   vtkImageData *input = this->GetInput();
   if (input)
     {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     input->UpdateInformation();
     int *w_ext = input->GetWholeExtent();
+#else
+    int *w_ext = input->GetExtent();
+#endif
+
     min = w_ext[this->SliceOrientation * 2];
     max = w_ext[this->SliceOrientation * 2 + 1];
     }
@@ -235,8 +248,15 @@ int* wxvtkImageViewer2::GetSliceRange()
   vtkImageData *input = this->GetInput();
   if (input)
     {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     input->UpdateInformation();
+printf("EED Warning wxvtkImageViewer2::GetSliceRange  GetWholeExtent()[2] ??? /n");
     return input->GetWholeExtent() + this->SliceOrientation * 2;
+#else
+printf("EED Warning wxvtkImageViewer2::GetSliceRange  GetExtent()[2] ??? /n");
+    return input->GetExtent() + this->SliceOrientation * 2;
+#endif
     }
   return NULL;
 }
@@ -398,8 +418,13 @@ void wxvtkImageViewer2::UpdateDisplayExtent()
     }
 
   //  std::cout << "--- wxvtkImageViewer2::UpdateDisplayExtent()"<<std::endl;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   input->UpdateInformation();
   int *w_ext = input->GetWholeExtent();
+#else
+  int *w_ext = input->GetExtent();
+#endif
 
   //   std::cout << "ext = "
   //   <<w_ext[0]<<" - "<<w_ext[1]<<" ; "
@@ -538,10 +563,17 @@ public:
 
       if (event == vtkCommand::ResetWindowLevelEvent)
         {
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
         this->IV->GetInput()->UpdateInformation();
         this->IV->GetInput()->SetUpdateExtent
           (this->IV->GetInput()->GetWholeExtent());
         this->IV->GetInput()->Update();
+#else
+  //...
+#endif
+
         double *range = this->IV->GetInput()->GetScalarRange();
         this->IV->SetColorWindow(range[1] - range[0]);
         this->IV->SetColorLevel(0.5 * (range[1] + range[0]));
@@ -668,7 +700,12 @@ void wxvtkImageViewer2::InstallPipeline()
 
   if (this->ImageActor && this->WindowLevel)
     {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     this->ImageActor->SetInput(this->WindowLevel->GetOutput());
+#else
+    this->ImageActor->SetInputData(this->WindowLevel->GetOutput());
+#endif
     }
 }
 
@@ -677,7 +714,12 @@ void wxvtkImageViewer2::UnInstallPipeline()
 {
   if (this->ImageActor)
     {
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
     this->ImageActor->SetInput(NULL);
+#else
+    this->ImageActor->SetInputData(NULL);
+#endif
     }
 
   if (this->Renderer && this->ImageActor)
@@ -709,8 +751,15 @@ void wxvtkImageViewer2::Render()
        input)
       {
 
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
       input->UpdateInformation();
       int *w_ext = input->GetWholeExtent();
+#else
+      int *w_ext = input->GetExtent();
+#endif
+
       int xs = 0, ys = 0;
 
       //       std::cout << "wxvtkImageViewer2::Render ext = "
@@ -784,7 +833,13 @@ int wxvtkImageViewer2::GetOffScreenRendering()
 void wxvtkImageViewer2::SetInput(vtkImageData *in)
 {
   //  std::cout << "### wxvtkImageViewer2::SetInput"<<std::endl;
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   this->WindowLevel->SetInput(in);
+#else
+  this->WindowLevel->SetInputData(in);
+#endif
+
   this->UpdateDisplayExtent();
   // LG 03/12/08
   //  FirstRender = 1;
index ff097bd36d186db26cc91562fef737dc5935bbea..8592ee399836e952937dda94a6c15bda4bd923d2 100644 (file)
@@ -96,7 +96,14 @@ class /*VTK_RENDERING_EXPORT*/ wxvtkImageViewer2 : public vtkObject
 {
 public:
   static wxvtkImageViewer2 *New();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
   vtkTypeRevisionMacro(wxvtkImageViewer2,vtkObject);
+#else
+  vtkTypeMacro(wxvtkImageViewer2,vtkObject);
+#endif
+
   void PrintSelf(ostream& os, vtkIndent indent);
 
   // Description: