]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.cxx
#3109 creaMaracasVisu Bug New Normal - branch vtk7itk4 compilation with vtk7
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / Contour / ContourExtractData.cxx
index a0cfd9ae1e2cb27a3ffcf29866f95e0da7fc886a..2947bdc03f6586de3c99d7f84d4e5ec81bb47340 100644 (file)
@@ -51,7 +51,14 @@ void ContourExtractData::SetImage( vtkImageData* imagedata)
 
        // 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  
@@ -460,8 +467,15 @@ void ContourExtractData::CalculateImageResult()
 
                imagedataValueResult->Modified();
                imagedataMaskResult->Modified();
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
                imagedataValueResult->Update();
                imagedataMaskResult->Update();
+#else
+  //...
+#endif
+
        } // if
 
 }
@@ -559,10 +573,17 @@ void ContourExtractData::InitVtkImagesResult()
        }
        imagedataValueResult = vtkImageData::New();
        //        imagedataValueResult->SetScalarType(scalartype);
-       imagedataValueResult->SetScalarTypeToUnsignedShort();
        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)
        {
@@ -570,10 +591,17 @@ void ContourExtractData::InitVtkImagesResult()
        }
        imagedataMaskResult  = vtkImageData::New();
        //        imagedataMaskResult->SetScalarType(scalartype);
-       imagedataMaskResult->SetScalarTypeToUnsignedShort();
        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
+
 }