X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fvtk%2Fsrc%2FbbvtkMaskPoint.cxx;h=eb1457c3b297f57613db29894ed08f6e89a71b7c;hb=9ce7b1159290d46aa6e38c4706d3fe5435d80508;hp=c192648b2747b206f4ba2f5600997b851cabb72c;hpb=427d8c0ac838ab789a57b28f62a7f9ff243e7b60;p=bbtk.git diff --git a/packages/vtk/src/bbvtkMaskPoint.cxx b/packages/vtk/src/bbvtkMaskPoint.cxx index c192648..eb1457c 100644 --- a/packages/vtk/src/bbvtkMaskPoint.cxx +++ b/packages/vtk/src/bbvtkMaskPoint.cxx @@ -26,14 +26,31 @@ void MaskPoint::Process() // * TYPE is the C++ type of the input/output // (the one provided in the attribute 'type' of the tag 'input') -printf("EED MaskPoint::Process Start\n"); - maskpoints->SetInput( bbGetInputIn() ); - maskpoints->SetOnRatio( bbGetInputRatio() ); - maskpoints->RandomModeOn(); - maskpoints->SetMaximumNumberOfPoints(5000); - maskpoints->Update(); - bbSetOutputOut( maskpoints->GetOutput() ); -printf("EED MaskPoint::Process End\n"); + + if (bbGetInputActive()==true) + { + //EED 2017-01-01 Migration VTK7 + #if (VTK_MAJOR_VERSION <= 5) + maskpoints->SetInput( bbGetInputIn() ); + #endif + #if (VTK_MAJOR_VERSION >= 6) + maskpoints->SetInputData( bbGetInputIn() ); + #endif + + maskpoints->SetOnRatio( bbGetInputRatio() ); + + if (bbGetInputRandomType()==-1) + { + maskpoints->RandomModeOff(); + } else if(bbGetInputRandomType()==0) { + maskpoints->RandomModeOn(); + maskpoints->SetRandomModeType(0); + } + + // maskpoints->SetMaximumNumberOfPoints(5000); + maskpoints->Update(); + bbSetOutputOut( maskpoints->GetOutput() ); + } // if Active } //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) @@ -43,8 +60,11 @@ void MaskPoint::bbUserSetDefaultValues() // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX // Here we initialize the input 'In' to 0 + bbSetInputActive( true ); bbSetInputIn(NULL); bbSetOutputOut(NULL); + bbSetInputRandomType(-1); + bbSetInputRatio(30); } //=====