X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManager.cxx;h=2373abab970f69a17df88871a0051470ebe371a9;hb=99a4e52ce46e7018a46e94ad4925858165463c1d;hp=813ba2258bc1f2b247b342f9176e5b2be8f91a4b;hpb=9794609d9607a3bc76aec1d10fb58bcb9aed4357;p=clitk.git diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index 813ba22..2373aba 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -1184,14 +1184,15 @@ void vvSlicerManager::SetColorMap(int colormap) case 4: if (LUT == NULL) LUT = vtkLookupTable::New(); - LUT->SetValueRange(0,1); + LUT->SetValueRange(1,1); LUT->SetSaturationRange(1,1); LUT->SetHueRange(0,1); + LUT->SetAlphaRange(1, 1); break; case 5: if (LUT == NULL) LUT = vtkLookupTable::New(); - LUT->SetValueRange(0.,1); + LUT->SetValueRange(1,1); LUT->SetSaturationRange(1,1); LUT->SetHueRange(1,0.1); //LUT->SetRampToLinear(); @@ -1235,15 +1236,17 @@ void vvSlicerManager::SetColorMap(int colormap) double v[4]; // set color table transparency + double alpha_range=(double)mFusionThresOpacity/10; double range_end = frange[0] + (double)mFusionThresOpacity*(frange[1] - frange[0])/100; - double curr_value = frange[0]; + double curr_value = fusRange[0]; int nvalues = fusLUT->GetNumberOfTableValues(); - //for (double i = frange[0]; i <= alpha_range_end; i++) { for (double i = 0; curr_value < range_end; i++) { fusLUT->GetTableValue(i, v); v[3] = 0; + //if (curr_value >= -alpha_range && curr_value <= alpha_range) v[3] = pow(fabs(curr_value/alpha_range),2); + //else v[3] = 1; fusLUT->SetTableValue(i, v); - curr_value += (frange[1] - frange[0])/nvalues; + curr_value += (fusRange[1] - fusRange[0])/nvalues; } } for ( unsigned int i = 0; i < mSlicers.size(); i++) {