X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2FContour%2FContourExtractData.cxx;h=2947bdc03f6586de3c99d7f84d4e5ec81bb47340;hb=56eb704bce4e7a4206ffa16c84f3000b8b8f93eb;hp=a0cfd9ae1e2cb27a3ffcf29866f95e0da7fc886a;hpb=e4ef2b5df5aac431ff3b806f83b7dd5e55e89d86;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.cxx b/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.cxx index a0cfd9a..2947bdc 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourExtractData.cxx @@ -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 + }