dim[2] = _dimBase[2];
}
-
//------------------------------------------------------------------------------
void LayerImageBase::SetColorBarPosition(std::vector<int> &colorbarposition)
{
_colorBarPosition=colorbarposition;
+ UpdateColorBarPosition();
}
+//------------------------------------------------------------------------------
+void LayerImageBase::UpdateColorBarPosition()
+{
+ if ( _scalarbarActor!=NULL)
+ {
+ if (_colorBarPosition.size()==2)
+ {
+ _scalarbarActor->SetDisplayPosition( _colorBarPosition[0] , _colorBarPosition[1] );
+ } else {
+ _scalarbarActor->SetDisplayPosition(0,0);
+ }
+ } // if
+}//
+
//------------------------------------------------------------------------------
void LayerImageBase::SetRangeForColorBar(std::vector<double> &range)
{
{
z = maxSize;
}
-
}
//----------------------------------------------------------------------------
{
_thresholdActor = vtkImageActor::New( );
_scalarbarActor = vtkScalarBarActor::New();
- if (_colorBarPosition.size()==2)
- {
- _scalarbarActor->SetDisplayPosition(_colorBarPosition[0],_colorBarPosition[1]);
- } else {
- _scalarbarActor->SetDisplayPosition(0,0);
- }
+ UpdateColorBarPosition();
_scalarbarActor->SetHeight(0.4); //default 0.8
- _scalarbarActor->SetWidth(0.08); //default 0.17
-
+ _scalarbarActor->SetWidth(0.10); //default 0.17
_thresholdActor->SetOpacity( 1 );
_thresholdActor->InterpolateOn( );
-
if (directionViewer==0)
{
_thresholdActor->SetPosition( 900-1,0,0 );