- void PolyDataToActor::DoProcess()
- {
- polydatamapper->SetInput( bbGetInputIn() );
-
- vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
- vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWitdth() );
-
- vtkactor->GetProperty()->SetColor( bbGetInputColour()[0],
- bbGetInputColour()[1],
- bbGetInputColour()[2] );
-
- vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
-
- if ( bbGetInputTransform()!=NULL )
- {
- vtkactor->SetUserTransform( bbGetInputTransform() );
- }
-
- bbSetOutputOut( vtkactor );
-
- // Interface Update
- if ((firsttime==true) && (bbGetInputRenderer()!=NULL ))
- {
- firsttime=false;
- bbGetInputRenderer()->AddActor( vtkactor );
- }
- }
+void PolyDataToActor::DoProcess()
+{
+ if (bbGetInputRenderer()==NULL)
+ {
+ printf("EED Warnning! PolyDataToActor::DoProcess missing Renderer.\n");
+ }
+
+
+ if (bbGetInputActive()==true)
+ {
+
+
+//EED 2017-01-01 Migration VTK7
+#if VTK_MAJOR_VERSION <= 5
+ polydatamapper->SetInput( bbGetInputIn() );
+#else
+ polydatamapper->SetInputData( bbGetInputIn() );
+#endif
+
+ vtkactor->GetProperty()->SetRepresentation( bbGetInputRepresentation() );
+
+ if (bbGetInputRepresentation()==0)
+ {
+ vtkactor->GetProperty()->SetAmbient(1);
+ vtkactor->GetProperty()->SetDiffuse(1);
+ vtkactor->GetProperty()->SetSpecular(0);
+printf("EED WARNNING! PolyDataToActor::DoProcess which is the default values of Ambient, Diffuse, Specular for points option? \n");
+ } else if (bbGetInputRepresentation()==1)
+ {
+ vtkactor->GetProperty()->SetAmbient(1);
+ vtkactor->GetProperty()->SetDiffuse(1);
+ vtkactor->GetProperty()->SetSpecular(0);
+ } else if (bbGetInputRepresentation()==2)
+ {
+ vtkactor->GetProperty()->SetAmbient(0);
+ vtkactor->GetProperty()->SetDiffuse(1);
+ vtkactor->GetProperty()->SetSpecular(0);
+ }
+
+ vtkactor->GetProperty()->SetLineWidth( bbGetInputLineWidth() );
+
+ vtkactor->GetProperty()->SetColor( bbGetInputColour()[0],
+ bbGetInputColour()[1],
+ bbGetInputColour()[2] );
+
+ vtkactor->GetProperty()->SetOpacity( bbGetInputOpacity() );
+
+
+ if ( bbGetInputTransform()!=NULL )
+ {
+ vtkactor->SetUserTransform( bbGetInputTransform() );
+ }
+
+ bbSetOutputOut( vtkactor );
+
+ // Interface Update
+ if ((actorAdded==false) && (bbGetInputRenderer()!=NULL ))
+ {
+ actorAdded=true;
+ bbGetInputRenderer()->AddActor( vtkactor );
+ } // actorAdded
+
+ if (bbGetInputScalarVisibility()==true )
+ {
+ polydatamapper->ScalarVisibilityOn();
+ if (bbGetInputScalarVisibilityOn_LookupTable()!=NULL)
+ {
+// polydatamapper->SetScalarModeToDefault();
+// polydatamapper->SetScalarModeToUseCellData();
+// polydatamapper->SetScalarModeToUseCellFieldData();
+// polydatamapper->SetScalarModeToUseFieldData(); // 1/2 hausdorff->SetTargetDistanceMethodToPointToCell();
+// polydatamapper->SetScalarModeToUsePointData(); // *
+ polydatamapper->SetScalarModeToUsePointFieldData();
+
+ polydatamapper->SetColorModeToMapScalars();
+ polydatamapper->SetLookupTable( bbGetInputScalarVisibilityOn_LookupTable() );
+ if (bbGetInputScalarVisibilityOn_NameColorArray()!="")
+ {
+ polydatamapper->SelectColorArray( bbGetInputScalarVisibilityOn_NameColorArray().c_str() );
+ }
+ if (bbGetInputScalarVisibilityOn_ScalarRange().size()==2)
+ {
+ polydatamapper->SetScalarRange( bbGetInputScalarVisibilityOn_ScalarRange()[0] , bbGetInputScalarVisibilityOn_ScalarRange()[1] );
+ }
+
+ } // if ScalarVisibilityOn_LookupTable
+ } else {
+ polydatamapper->ScalarVisibilityOff();
+ } // ScalarVisibility
+ } else {
+ // Interface Update
+ if ((actorAdded==true) && (bbGetInputRenderer()!=NULL ))
+ {
+ actorAdded=false;
+ bbGetInputRenderer()->RemoveActor( vtkactor );
+ } // actorAdded
+ } // Active
+}
+
+
+