From: Eduardo DAVILA Date: Thu, 14 Jun 2018 17:23:45 +0000 (+0200) Subject: #3198 creaVtk Bug New Normal - VtkLightKit X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=b14773c04cfae41766a01441d155225c9fc4668f;p=creaVtk.git #3198 creaVtk Bug New Normal - VtkLightKit --- diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkLightKit.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkLightKit.cxx index e4d1ea5..fc8f397 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkLightKit.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkLightKit.cxx @@ -44,8 +44,8 @@ void LightKit::Process() vtkLightKit *lightKit=vtkLightKit::New(); //bbGetInputRenderer()->SetTwoSidedLighting(0); lightKit->SetKeyLightWarmth( bbGetInputKeyLightWarmth() ); - lightKit->SetFillLightWarmth( bbSetInputFillLightWarmth() ); - lightKit->SetBackLightWarmth( bbSetInputBackLightWarmth() ); + lightKit->SetFillLightWarmth( bbGetInputFillLightWarmth() ); + lightKit->SetBackLightWarmth( bbGetInputBackLightWarmth() ); lightKit->AddLightsToRenderer( bbGetInputRenderer() ); } diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkLightKit.h b/bbtk_creaVtk_PKG/src/bbcreaVtkLightKit.h index 145f260..2298c2a 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkLightKit.h +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkLightKit.h @@ -24,7 +24,7 @@ class bbcreaVtk_EXPORT LightKit BBTK_DECLARE_INPUT(FillLightWarmth,double); BBTK_DECLARE_INPUT(BackLightWarmth,double); BBTK_DECLARE_INPUT(Renderer,vtkRenderer *); -( + // BBTK_DECLARE_OUTPUT(Out,double); BBTK_PROCESS(Process); void Process(); @@ -40,6 +40,9 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(LightKit,bbtk::AtomicBlackBox); BBTK_AUTHOR("InfoDev"); BBTK_DESCRIPTION("No Description."); BBTK_CATEGORY("empty"); + BBTK_INPUT(LightKit,KeyLightWarmth,"KeyLightWarmth", double ,""); + BBTK_INPUT(LightKit,FillLightWarmth,"FillLightWarmth", double ,""); + BBTK_INPUT(LightKit,BackLightWarmth,"BackLightWarmth", double ,""); BBTK_INPUT(LightKit,Renderer,"3D scene in which to insert the surface",vtkRenderer*,""); // BBTK_OUTPUT(LightKit,Out,"First output",double,""); BBTK_END_DESCRIBE_BLACK_BOX(LightKit); diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkScalarsToColors.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkScalarsToColors.cxx index 91569f7..f3c8c99 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkScalarsToColors.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkScalarsToColors.cxx @@ -62,18 +62,37 @@ printf("EED ScalarsToColors::Process Start\n"); rgba[3]=0; _colorLookupTable->SetTableValue(0,rgba); - int i,iMax=200; + int i,iMax; + + iMax=(1000/16)*4; + for (i=0;iGetTableValue(500+i, rgba); + rgba[3]=(double)i/(double)iMax; + _colorLookupTable->SetTableValue(500+i,rgba); + _colorLookupTable->GetTableValue(500-i, rgba); + rgba[3]=(double)i/(double)iMax; + _colorLookupTable->SetTableValue(500-i,rgba); + + } // for + + +/* + iMax=100; for (i=0;iGetTableValue(500+100+i, rgba); rgba[3]=(double)i/(double)iMax; _colorLookupTable->SetTableValue(500+100+i,rgba); _colorLookupTable->GetTableValue(500-100-i, rgba); rgba[3]=(double)i/(double)iMax; _colorLookupTable->SetTableValue(500-100-i,rgba); + } // for - iMax=100; + iMax=200; for (i=0;iGetTableValue(500+i, rgba); @@ -83,6 +102,9 @@ printf("EED ScalarsToColors::Process Start\n"); rgba[3]=0; _colorLookupTable->SetTableValue(500-i,rgba); } // for +*/ + + } // if Type 0