X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fvtk%2Fsrc%2FbbvtkSphereList.cxx;h=50889bd9dc746a47fba9e79a37a34de6f5f8c0c8;hb=d918bf0b79d67ae98ec9b0c0966525bfa879dacb;hp=7577a0a7ed47a6d1c5e980a03102507a2b5c235d;hpb=cfad95b6e08e6e53846ffcda7fbc5932065f2c47;p=bbtk.git diff --git a/packages/vtk/src/bbvtkSphereList.cxx b/packages/vtk/src/bbvtkSphereList.cxx index 7577a0a..50889bd 100644 --- a/packages/vtk/src/bbvtkSphereList.cxx +++ b/packages/vtk/src/bbvtkSphereList.cxx @@ -41,7 +41,7 @@ BBTK_BLACK_BOX_IMPLEMENTATION(SphereList,bbtk::AtomicBlackBox); void SphereList::Process() { - int iMin, iMax; + int iMin, iMax; double px = 0.0; double py = 0.0; double pz = 0.0; @@ -50,23 +50,40 @@ void SphereList::Process() int last_valid_color_index = 0; + if (bbGetInputRenderer()!=NULL) { - if (bbGetInputSpacing().size()==3) - { + // If it is not the first time Process is executed, the actors have already been created. The only thing to do is to update the opacity. + if (sphereActor.size() != 0) + { + 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 { + } + else + { spc[0]=spc[1]=spc[2]=1; - } - - iMin=0; - iMax=bbGetInputlstPointX().size(); - printf("EED SphereList::Process iMax=%d \n", iMax); - // 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