X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fvtk%2Fsrc%2FbbvtkSphereList.cxx;h=4932d83cc9766d9f24ceba115775c784059dd81c;hb=59a1da6c8c2d9108d4cf84595c7841c6371b9e52;hp=24624139132c46c63f31b4217fa60e039438aec5;hpb=3b9ae551acae07891da406ab6fd0f0ce392dc923;p=bbtk.git diff --git a/packages/vtk/src/bbvtkSphereList.cxx b/packages/vtk/src/bbvtkSphereList.cxx index 2462413..4932d83 100644 --- a/packages/vtk/src/bbvtkSphereList.cxx +++ b/packages/vtk/src/bbvtkSphereList.cxx @@ -41,10 +41,10 @@ BBTK_BLACK_BOX_IMPLEMENTATION(SphereList,bbtk::AtomicBlackBox); double SphereList::GetRadio(int i) { double radio; - if (bbGetInputlstRadio().size()==0) + if ( bbGetInputlstRadio().size()==0 ) { radio = 1.0; - } else if (bbGetInputlstRadio().size() < i ) + } else if ( iSetPosition( px,py,pz ); sphereActor[i] -> GetProperty() -> SetOpacity( bbGetInputOpacity() ); + sphereActor[i] -> GetProperty() -> SetColor( cr,cg,cb ); vtkspheresourceLst[i] -> SetRadius( GetRadio(i) ); } // for i } else { @@ -124,7 +145,7 @@ void SphereList::Process() GetPoint(i, px,py,pz); - + GetColor(i, cr,cg,cb); // Sphere @@ -141,17 +162,8 @@ void SphereList::Process() vtkActor * newActor = vtkActor::New(); sphereActor.push_back(newActor); newActor -> SetMapper(newMapper); - newActor -> SetOrigin(0, 0, 0); - - unsigned int j = 3*i +2; - if (j < bbGetInputColour().size() ) - { - newActor -> GetProperty() -> SetColor( bbGetInputColour()[3*i] , bbGetInputColour()[3*i + 1] , bbGetInputColour()[3*i + 2] ); - last_valid_color_index = 3*i; - } - else - newActor -> GetProperty() -> SetColor( bbGetInputColour()[last_valid_color_index] , bbGetInputColour()[last_valid_color_index + 1] , bbGetInputColour()[last_valid_color_index + 2] ); - + newActor -> SetOrigin(0, 0, 0); + newActor -> GetProperty() -> SetColor(cr,cg,cb); newActor -> GetProperty() -> SetOpacity( bbGetInputOpacity() ); newActor -> SetPosition( px,py,pz );