X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fvtk%2Fsrc%2FbbvtkSurfaceTexture.cxx;h=12d32b03aeed898588478a3b1bc4693d72755962;hb=59a1da6c8c2d9108d4cf84595c7841c6371b9e52;hp=d59b7a866d2afd13f222ed180b9447bbf3fc74e9;hpb=251e090bd2628040b8f49de9de5c4cb31281f192;p=bbtk.git diff --git a/packages/vtk/src/bbvtkSurfaceTexture.cxx b/packages/vtk/src/bbvtkSurfaceTexture.cxx index d59b7a8..12d32b0 100644 --- a/packages/vtk/src/bbvtkSurfaceTexture.cxx +++ b/packages/vtk/src/bbvtkSurfaceTexture.cxx @@ -62,9 +62,26 @@ printf("EED SurfaceTexture::Process Start\n"); } else { colorLookupTable = vtkLookupTable::New(); } + colorLookupTable->SetTableRange(range[0],range[1]); + colorLookupTable->Build(); + double rgba1[4]; + double rgba2[4]; + for (int iLookTable = 0; iLookTable<128; iLookTable++) + { + colorLookupTable->GetTableValue( iLookTable, rgba1); + colorLookupTable->GetTableValue(256-1-iLookTable, rgba2); + + colorLookupTable->SetTableValue(256-1-iLookTable , rgba1[0],rgba1[1],rgba1[2],rgba1[3]); + colorLookupTable->SetTableValue( iLookTable , rgba2[0],rgba2[1],rgba2[2],rgba2[3]); + } // for iLookTable + } - colorLookupTable->SetTableRange(range[0],range[1]); - colorLookupTable->Build(); + + + + + + bbGetInputMesh()->GetPointData()->SetScalars(colors); if (bbGetInputColorType()==1)