X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FThresholdImageView%2FLayerImageBase.cxx;h=06a085a5634fbf8c4bb87aabbc3a31be2fa09484;hb=dea0efc567d8332b2e7eb936e3ba4ac1c11b2542;hp=f625d57174f484f40986fe6e4afc9f8692e238f4;hpb=6a53e2824169e67e6e8a2a4174354b8a489193de;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 f625d57..06a085a 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; @@ -409,12 +410,10 @@ void LayerImageBase::onThreshold() double y=GetY(); double z=GetZ(); - x = x*_spcBase[0]; y = y*_spcBase[1]; z = z*_spcBase[2]; - CleanXYZ(x,y,z); vtkCamera *camera = _baseView->GetRenderer()->GetActiveCamera(); @@ -509,7 +508,8 @@ void LayerImageBase::onThreshold() _thresholdMapper->SetInput( img ); _thresholdMapper->SetLookupTable( _thresholdTable ); _thresholdActor->SetInput( _thresholdMapper->GetOutput() ); - + _thresholdActor->SetOpacity(_opacity); + _scalarbarActor->SetLookupTable( _thresholdTable ); // _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() ); _scalarbarActor->SetTitle("Value"); @@ -557,6 +557,8 @@ void LayerImageBase::onThresholdChangeOpacity (int opacity) { _thresholdActor->SetOpacity(opacity/100.0); } +// EED 2017-12-17 + _opacity = (double)opacity/100.0; } //----------------------------------------------------------------------------