]> Creatis software - creaVtk.git/commitdiff
#3198 creaVtk Bug New Normal - VtkLightKit
authorEduardo DAVILA <davila@localhost.localdomain>
Thu, 14 Jun 2018 17:23:45 +0000 (19:23 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Thu, 14 Jun 2018 17:23:45 +0000 (19:23 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkLightKit.cxx
bbtk_creaVtk_PKG/src/bbcreaVtkLightKit.h
bbtk_creaVtk_PKG/src/bbcreaVtkScalarsToColors.cxx

index e4d1ea505c3f758db3f78494ef3e48daaf4f8640..fc8f397dc9c8e33d7aa71ed73035c78586eed4d3 100644 (file)
@@ -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() );
        }
 
index 145f260cd265c359ff984d21e36e2876f173e859..2298c2ac0773d351ea3b06799014c3e8436e9efd 100644 (file)
@@ -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);
index 91569f7df16fbb057d67f2492eb585aa9c1bdfc3..f3c8c99a6970658ca415372ebb89ab2528107d33 100644 (file)
@@ -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;i<iMax;i++)
+                       {
+
+                               _colorLookupTable->GetTableValue(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;i<iMax;i++)
                        {
+
                                _colorLookupTable->GetTableValue(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;i<iMax;i++)
                        {
                                _colorLookupTable->GetTableValue(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