X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FThresholdImageView%2FLayerImageBase.cxx;h=5fd366cd9ce03bc4f4bf3c44684e1707702fd12b;hb=HEAD;hp=f625d57174f484f40986fe6e4afc9f8692e238f4;hpb=78a76d83140ed2adf38b8906f5d9fbfde1186c9a;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..5fd366c 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(); @@ -449,6 +448,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( ); @@ -509,7 +510,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 +559,8 @@ void LayerImageBase::onThresholdChangeOpacity (int opacity) { _thresholdActor->SetOpacity(opacity/100.0); } +// EED 2017-12-17 + _opacity = (double)opacity/100.0; } //---------------------------------------------------------------------------- @@ -594,6 +598,12 @@ void LayerImageBase::GetImageScalarRange() _range[1]=max; } +vtkScalarsToColors* LayerImageBase::GetLookupTable() +{ + return _thresholdTable; +} + + // EOF