X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=packages%2Fvtk%2Fsrc%2FbbvtkSurfaceTexture.cxx;fp=packages%2Fvtk%2Fsrc%2FbbvtkSurfaceTexture.cxx;h=0016c6eeb502c29ce1a2985119e8a679e8087418;hb=360978002d02369e42cb4ab8008828613e3b8bf4;hp=76b0b6d953f49286a4ac0530ef2917d1352640bc;hpb=9ca9c2a92d7d7f653ce424f477960e5a00ac0e8a;p=bbtk.git diff --git a/packages/vtk/src/bbvtkSurfaceTexture.cxx b/packages/vtk/src/bbvtkSurfaceTexture.cxx index 76b0b6d..0016c6e 100644 --- a/packages/vtk/src/bbvtkSurfaceTexture.cxx +++ b/packages/vtk/src/bbvtkSurfaceTexture.cxx @@ -34,14 +34,13 @@ void SurfaceTexture::Process() // std::cout << "Output value = " <GetSpacing(spc); bbGetInputImage()->GetScalarRange(range); - //EED 2017-01-01 Migration VTK7 #if VTK_MAJOR_VERSION <= 5 bbGetInputImage()->GetWholeExtent(ext); @@ -144,12 +143,13 @@ void SurfaceTexture::Process() colorLookupTable->SetTableValue(10,1 ,0.5,0.5,1); colorLookupTable->SetTableValue(11,0.5,0.5,1 ,1); - } // type 2 + } // type 3 + + } // firsttime - } bbGetInputMesh()->GetPointData()->SetScalars(colors); @@ -158,6 +158,14 @@ void SurfaceTexture::Process() colorLookupTableWL->SetLevel( bbGetInputColorLevel() ); colorLookupTableWL->SetWindow( bbGetInputColorWindow() ); } + + + if (bbGetInputExternalLookupTable()!=NULL) + { + generalLookupTable = bbGetInputExternalLookupTable(); + } else { + generalLookupTable = colorLookupTable; + } int missingpoints = bbGetInputMesh()->GetNumberOfPoints() - colors->GetDataSize()/colors->GetNumberOfComponents(); for(i = 0; i < missingpoints; i++) @@ -193,7 +201,7 @@ void SurfaceTexture::Process() } else { gl=0; } - colorLookupTable->GetColor(gl, dcolor); + generalLookupTable->GetColor(gl, dcolor); colors->SetTuple3(i,255*dcolor[0],255*dcolor[1],255*dcolor[2]); } // for i bbGetInputMesh()->Modified(); @@ -217,7 +225,7 @@ void SurfaceTexture::bbUserSetDefaultValues() firsttime = true; colors = NULL; colorLookupTable = NULL; - colorLookupTableWL = NULL; + colorLookupTableWL = NULL; } //===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)