X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=vv%2FvvSlicerManager.cxx;h=4aa48cf562d8d92e36ec2aacbce888062bb0a6dd;hb=90cfdf0b32d3e867e6df248d8c4b410ffdd4c354;hp=3f096644d374fa3ed04612f3fb8aa325e6b51ad9;hpb=447b33d987bae78fbf4e7fcb90057b6c89c0b7b8;p=clitk.git diff --git a/vv/vvSlicerManager.cxx b/vv/vvSlicerManager.cxx index 3f09664..4aa48cf 100644 --- a/vv/vvSlicerManager.cxx +++ b/vv/vvSlicerManager.cxx @@ -401,7 +401,7 @@ void vvSlicerManager::SetPreviousTSlice(int originating_slicer) void vvSlicerManager::ToggleInterpolation() { - bool interpolate=not (mSlicers[0]->GetImageActor()->GetInterpolate()); + bool interpolate=!(mSlicers[0]->GetImageActor()->GetInterpolate()); for ( unsigned int i = 0; i < mSlicers.size(); i++) { mSlicers[i]->GetImageActor()->SetInterpolate(interpolate); @@ -856,7 +856,7 @@ void vvSlicerManager::SetPreset(int preset) break; case 7: window=1.; - level=1; + level=0.; break; } mPreset = preset; @@ -886,8 +886,6 @@ void vvSlicerManager::SetColorMap(int colormap) switch (colormap) { case -1: - if (LUT) - LUT->SetTableRange(level-fabs(window)/4,level+fabs(window)/4); break; case 0: LUT = NULL; @@ -895,7 +893,6 @@ void vvSlicerManager::SetColorMap(int colormap) case 1: if (LUT == NULL) LUT = vtkLookupTable::New(); - LUT->SetTableRange(level-fabs(window)/4,level+fabs(window)/4); LUT->SetValueRange(0,1); LUT->SetSaturationRange(1,1); LUT->SetHueRange(0,0.18); @@ -903,7 +900,6 @@ void vvSlicerManager::SetColorMap(int colormap) case 2: if (LUT == NULL) LUT = vtkLookupTable::New(); - LUT->SetTableRange(level-fabs(window)/4,level+fabs(window)/4); LUT->SetValueRange(0,1); LUT->SetSaturationRange(1,1); LUT->SetHueRange(0.4,0.80); @@ -911,7 +907,6 @@ void vvSlicerManager::SetColorMap(int colormap) case 3: if (LUT == NULL) LUT = vtkLookupTable::New(); - LUT->SetTableRange(level-fabs(window)/4,level+fabs(window)/4); LUT->SetValueRange(0,1); LUT->SetSaturationRange(1,1); LUT->SetHueRange(0,1); @@ -926,7 +921,10 @@ void vvSlicerManager::SetColorMap(int colormap) break; } if (LUT) + { + LUT->SetTableRange(level-fabs(window)/4,level+fabs(window)/4); LUT->Build(); + } vtkLookupTable* fusLUT = NULL; if (mSlicers[0]->GetFusion()) {