X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=bbtk%2Fsrc%2FbbmaracasvisuImageActor.cxx;h=7d6e5c8dec3950419f68904a6bb60e0b25086dce;hb=d79fc05657cfa43ed1cd6937a5acaeaf70e09b45;hp=34c0fd7754dc182e1b025dd1fdf521540ec9812f;hpb=25e3adf442d6a8d357d52410267445c54426c525;p=creaMaracasVisu.git diff --git a/bbtk/src/bbmaracasvisuImageActor.cxx b/bbtk/src/bbmaracasvisuImageActor.cxx index 34c0fd7..7d6e5c8 100644 --- a/bbtk/src/bbmaracasvisuImageActor.cxx +++ b/bbtk/src/bbmaracasvisuImageActor.cxx @@ -40,9 +40,6 @@ BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaMaracasVisu,ImageActor) BBTK_BLACK_BOX_IMPLEMENTATION(ImageActor,bbtk::AtomicBlackBox); void ImageActor::Process() { - -printf("EED ImageActor::Process Start\n"); - //JCP 04/04/09 vtkRenderer *render = bbGetInputRenderer(); vtkImageData *img = bbGetInputIn(); @@ -53,7 +50,12 @@ printf("EED ImageActor::Process Start\n"); { if (bbGetInputLookupTable()==NULL) { +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 imageactor->SetInput( img ); +#else + imageactor->SetInputData( img ); +#endif } else { /* vtkLookupTable *table = vtkLookupTable::New(); @@ -116,10 +118,20 @@ vtkLookupTable *table = vtkLookupTable::New(); // imageshiftscale->SetOutputScalarTypeToUnsignedChar(); // color->SetInput( imageshiftscale->GetOutput() ); + + +//EED 2017-01-01 Migration VTK7 +#if VTK_MAJOR_VERSION <= 5 color->SetInput( img ); color->Update(); imageactor->GetMapper()->SetInput( color->GetOutput() ); +#else + color->SetInputData( img ); + color->Update(); + imageactor->GetMapper()->SetInputData( color->GetOutput() ); +#endif imageactor->GetProperty()->SetInterpolationTypeToNearest(); + imageactor->SetForceOpaque(true); } if (transform!=NULL) @@ -132,23 +144,17 @@ vtkLookupTable *table = vtkLookupTable::New(); } // render bbSetOutputOut(imageactor); } // img - - + // Interface Update if ((firsttime==true) && (bbGetInputRenderer()!=NULL )) { firsttime=false; bbGetInputRenderer()->AddActor( imageactor ); } - imageactor->GetProperty()->SetOpacity( bbGetInputOpacity() ); - bbSetOutputOut(imageactor); - - -printf("EED ImageActor::Process End\n"); - - + bbSetOutputOut(imageactor); } + void ImageActor::bbUserSetDefaultValues() { firsttime = true;