X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fvtk%2Fsrc%2FbbvtkPolyDataToActor.cxx;fp=packages%2Fvtk%2Fsrc%2FbbvtkPolyDataToActor.cxx;h=569bcb25b0832dad19bc1e3dc9f4a38ab9cd4687;hb=2041845854a8995d3987de68896251ae72cc2eb4;hp=ba441439b4cb99b5466141ac7029ceb69ec2b190;hpb=4991d6610e749af260232b17b612de7435a5dff0;p=bbtk.git diff --git a/packages/vtk/src/bbvtkPolyDataToActor.cxx b/packages/vtk/src/bbvtkPolyDataToActor.cxx index ba44143..569bcb2 100644 --- a/packages/vtk/src/bbvtkPolyDataToActor.cxx +++ b/packages/vtk/src/bbvtkPolyDataToActor.cxx @@ -43,10 +43,12 @@ #include "vtkProperty.h" #include "vtkLinearTransform.h" +#include "vtkCleanPolyData.h" #include "bbvtkPolyDataToActor.h" #include "bbvtkPackage.h" +#include "vtkRenderWindow.h" namespace bbvtk { @@ -107,13 +109,32 @@ namespace bbvtk void PolyDataToActor::DoProcess() { +printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n"); +printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n"); +printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n"); +printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n"); +printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n"); +printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n"); +printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n"); +printf("EED WARNNIN!!!!! PolyDataToActor::DoProcess For better transparent ... Clean this code in the correct part ..........\n"); +//https://stackoverflow.com/questions/47528086/problems-with-rendering-transparent-objects-in-vtk +//https://itk.org/Wiki/VTK/Depth_Peeling +bbGetInputRenderer()->SetUseDepthPeeling(1); +bbGetInputRenderer()->SetOcclusionRatio(0.1); +bbGetInputRenderer()->SetMaximumNumberOfPeels(100); +bbGetInputRenderer()->GetRenderWindow()->SetMultiSamples(0); +bbGetInputRenderer()->GetRenderWindow()->SetAlphaBitPlanes(1); + + if (bbGetInputActive()==true) { + + //EED 2017-01-01 Migration VTK7 #if VTK_MAJOR_VERSION <= 5 polydatamapper->SetInput( bbGetInputIn() ); #else - polydatamapper->SetInputData( bbGetInputIn() ); + polydatamapper->SetInputData( bbGetInputIn() ); #endif vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );