X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FThresholdImageView%2FLayerImageBase.cxx;h=c295169ae16fc898a8eb0fab5bb0708ab31cde3e;hb=f9901e756bb82bd333310b47607875331616bb29;hp=316f7851eb5561ed15c7bd9fed4fd6abb2378a97;hpb=56eb704bce4e7a4206ffa16c84f3000b8b8f93eb;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx index 316f785..c295169 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx @@ -97,6 +97,7 @@ LayerImageBase::LayerImageBase() _X = -1; _Y = -1; _Z = -1; + _opacity = 1; _thresholdTable = NULL; _thresholdMapper = NULL; _scalarbarActor = NULL; @@ -235,7 +236,7 @@ void LayerImageBase::SetImage(vtkImageData* image) } // if imagebase } // if wxvtkbaseview _image->GetScalarRange( _range ); - _thresholdTable = vtkLookupTable::New(); +// _thresholdTable = vtkLookupTable::New(); //EED 2017-01-01 Migration VTK7 @@ -469,6 +470,8 @@ void LayerImageBase::onThreshold() } else { _scalarbarActor->SetDisplayPosition(0,0); } + _scalarbarActor->SetHeight(0.4); //default 0.8 + _scalarbarActor->SetWidth(0.08); //default 0.17 _thresholdActor->SetOpacity( 1 ); _thresholdActor->InterpolateOn( ); @@ -556,6 +559,7 @@ void LayerImageBase::onThreshold() _thresholdActor->SetInputData( _thresholdMapper->GetOutput() ); #endif + _thresholdActor->SetOpacity(_opacity); _scalarbarActor->SetLookupTable( _thresholdTable ); // _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() ); _scalarbarActor->SetTitle("Value"); @@ -600,6 +604,8 @@ void LayerImageBase::onThresholdChangeOpacity (int opacity) { _thresholdActor->SetOpacity(opacity/100.0); } +// EED 2017-12-17 + _opacity = (double)opacity/100.0; } //---------------------------------------------------------------------------- @@ -610,17 +616,10 @@ void LayerImageBase::onThresholdRemove() wxVtkBaseView * baseView = _baseView; baseView->GetRenderer()->RemoveActor( _thresholdActor ); baseView->GetRenderer()->RemoveActor( _scalarbarActor ); - _actorPresent = false; } // if _actorPresent } -//---------------------------------------------------------------------------- -vtkLookupTable *LayerImageBase::GetvtkLookupTable() -{ - return _thresholdTable; -} - //---------------------------------------------------------------------------- vtkImageReslice *LayerImageBase::GetvtkImageReslice() { @@ -637,5 +636,10 @@ void LayerImageBase::GetImageScalarRange() _range[1]=max; } +vtkScalarsToColors* LayerImageBase::GetLookupTable() +{ + return _thresholdTable; +} + // EOF