- {
- for (int i = 0; i < sphereActor.size(); i++)
- sphereActor[i] -> GetProperty() -> SetOpacity( bbGetInputOpacity() );
- }
- else
- {
- if (bbGetInputSpacing().size()==3)
- {
- spc[0]=bbGetInputSpacing()[0];
- spc[1]=bbGetInputSpacing()[1];
- spc[2]=bbGetInputSpacing()[2];
- }
- else
- {
- spc[0]=spc[1]=spc[2]=1;
- }
-
- iMin=0;
- iMax=bbGetInputlstPointX().size();
- printf("EED SphereList::Process iMax=%d \n", iMax);
- for (int i = 0; i < iMax; i++)
- {
- std::cout << "CM SphereList::Process i=" << i << " bbGetInputlstPointX()[i]=" << bbGetInputlstPointX()[i] << std::endl;
- std::cout << "CM SphereList::Process i=" << i << " bbGetInputlstPointY()[i]=" << bbGetInputlstPointY()[i] << std::endl;
- std::cout << "CM SphereList::Process i=" << i << " bbGetInputlstPointZ()[i]=" << bbGetInputlstPointZ()[i] << std::endl;
- }
- // If the vector Y or respectively the vector Z has a different size from the vector X, the position value py or respectively pz is set to 0.
- for ( int i=iMin ; i<iMax; i=i+1 )
- {
- px = bbGetInputlstPointX()[i]*spc[0];
- if (bbGetInputlstPointY().size() == bbGetInputlstPointX().size() )
- {
- py = bbGetInputlstPointY()[i]*spc[1];
- }
- if (bbGetInputlstPointZ().size() == bbGetInputlstPointX().size() )
- {
- pz = bbGetInputlstPointZ()[i]*spc[2];
- }
-
- // If the number of elements in the radio list is different from the number of X coordinates, the radio value is set to 1.
- if (bbGetInputlstRadio().size() == bbGetInputlstPointX().size() )
- {
- radio = bbGetInputlstRadio()[i];
- }
- else
- {
- if (bbGetInputlstRadio().size()>=1)
- {
- radio = bbGetInputlstRadio()[ bbGetInputlstRadio().size() - 1 ];
- }
- else
- {
- radio = 1.0;
- }
- }
-
- // Sphere
- vtkSphereSource * newSphere = vtkSphereSource::New();
-
- newSphere -> SetThetaResolution(20);
- newSphere -> SetPhiResolution(20);
- newSphere -> SetRadius(radio);
-
- vtkPolyDataMapper * newMapper = vtkPolyDataMapper::New();
- newMapper -> SetInput( newSphere -> GetOutput() );
+ {
+ for (int i = 0; i < sphereActor.size(); i++)
+ {
+ GetPoint(i, px,py,pz);
+ GetColor(i, cr,cg,cb);
+ sphereActor[i] ->SetPosition( px,py,pz );
+printf("EED SphereList::Process() %f %f %f\n",px,py,pz);
+ sphereActor[i] -> GetProperty() -> SetOpacity( bbGetInputOpacity() );
+ sphereActor[i] -> GetProperty() -> SetColor( cr,cg,cb );
+ vtkspheresourceLst[i] -> SetRadius( GetRadio(i) );
+ } // for i
+ } else {
+ iMin=0;
+ iMax=bbGetInputlstPointX().size();
+// printf("EED SphereList::Process iMax=%d \n", iMax);
+// for (int i = 0; i < iMax; i++)
+// {
+// std::cout << "CM SphereList::Process i=" << i << " bbGetInputlstPointX()[i]=" << bbGetInputlstPointX()[i] << std::endl;
+// std::cout << "CM SphereList::Process i=" << i << " bbGetInputlstPointY()[i]=" << bbGetInputlstPointY()[i] << std::endl;
+// std::cout << "CM SphereList::Process i=" << i << " bbGetInputlstPointZ()[i]=" << bbGetInputlstPointZ()[i] << std::endl;
+// } // for i
+
+ // If the vector Y or respectively the vector Z has a different size from the vector X, the position value py or respectively pz is set to 0.
+ for ( int i=iMin ; i<iMax; i=i+1 )
+ {
+ GetPoint(i, px,py,pz);
+ GetColor(i, cr,cg,cb);
+ // Sphere
+ vtkSphereSource * newSphere = vtkSphereSource::New();
+ vtkspheresourceLst.push_back(newSphere);
+
+ newSphere -> SetThetaResolution(20);
+ newSphere -> SetPhiResolution(20);
+ newSphere -> SetRadius( GetRadio(i) );
+
+ vtkPolyDataMapper * newMapper = vtkPolyDataMapper::New();
+ newMapper -> SetInput( newSphere -> GetOutput() );