X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2FContour%2FContourCrownWidget.cxx;h=010ec0c533cb3ca0b73357c5e14b7ed894ab3a2d;hb=e263b7ace0f53d647a731553a3f67700838ad146;hp=3ab512b57199daf2bb825554452667a0bbcdfce9;hpb=e4ef2b5df5aac431ff3b806f83b7dd5e55e89d86;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourCrownWidget.cxx b/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourCrownWidget.cxx index 3ab512b..010ec0c 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourCrownWidget.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/Contour/ContourCrownWidget.cxx @@ -122,11 +122,22 @@ void wxMaracasCoutourTool::Init(wxVtkBaseView *wxvtkbaseview, vtkImageData* imag table->SetRampToLinear(); table->Build(); - vtkImageMapToColors *mapperImage = vtkImageMapToColors::New(); + vtkImageMapToColors *mapperImage = vtkImageMapToColors::New(); + vtkImageActor *actorImage = vtkImageActor::New(); + mapperImage->SetLookupTable(table); + + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 mapperImage->SetInput( imagedataMaskResult ); - vtkImageActor *actorImage = vtkImageActor::New(); actorImage->SetInput( mapperImage->GetOutput() ); +#else + mapperImage->SetInputData( imagedataMaskResult ); + actorImage->SetInputData( mapperImage->GetOutput() ); +#endif + + actorImage->SetOpacity(1); wxvtkbaseview->GetRenderer()->AddActor(actorImage); @@ -488,17 +499,31 @@ void wxMaracasCoutourTool::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 + 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 + }