maskpoints->SetOnRatio( bbGetInputRatio() );
 
-// option 1
-               maskpoints->RandomModeOff();    
-// option 2            
-//             maskpoints->RandomModeOn();     
-//             maskpoints->SetRandomModeType(0);
-               
+               if (bbGetInputRandomType()==-1)
+               {
+                       maskpoints->RandomModeOff();    
+               } else if(bbGetInputRandomType()==0) {
+                       maskpoints->RandomModeOn();     
+                       maskpoints->SetRandomModeType(0);
+               }
+
        //      maskpoints->SetMaximumNumberOfPoints(5000);     
                maskpoints->Update();
                bbSetOutputOut( maskpoints->GetOutput() );
    bbSetInputActive( true );
    bbSetInputIn(NULL);
    bbSetOutputOut(NULL);
+   bbSetInputRandomType(-1);
+   bbSetInputRatio(30);
   
 }
 //===== 
 
   BBTK_DECLARE_INPUT(Active,bool);
   BBTK_DECLARE_INPUT(In,vtkImageData*);
   BBTK_DECLARE_INPUT(Ratio,int);
+  BBTK_DECLARE_INPUT(RandomType,int);
   BBTK_DECLARE_OUTPUT(Out,vtkPolyData*);
   BBTK_PROCESS(Process);
   void Process();
 
   BBTK_INPUT(MaskPoint,Active,"(default true)  true/false",bool,"");
   BBTK_INPUT(MaskPoint,In,"vtkImageData",vtkImageData*,"");
-  BBTK_INPUT(MaskPoint,Ratio,"Ratio",int,"");
+  BBTK_INPUT(MaskPoint,Ratio,"(default 30) Ratio",int,"");
+  BBTK_INPUT(MaskPoint,RandomType,"(default -1)  -1:RandomOff  0:Random(0)  1:Random(1 not set)",int,"");
 
   BBTK_OUTPUT(MaskPoint,Out,"vtkPolyData",vtkPolyData*,"");