_Z = 0;
_thresholdTable = NULL;
_thresholdMapper = NULL;
+ _scalarbarActor = NULL;
_thresholdActor = NULL;
_image = NULL;
_baseView = NULL;
if (_thresholdActor==NULL)
{
_thresholdActor = vtkImageActor::New( );
+ _scalarbarActor = vtkScalarBarActor::New();
_thresholdActor->SetOpacity( 0.6 );
_thresholdActor->InterpolateOn( );
if (directionViewer==0)
}
} // _thresholdActor
_baseView->GetRenderer()->AddActor( _thresholdActor );
+ _baseView->GetRenderer()->AddActor2D( _scalarbarActor );
_actorPresent = true;
} // !GetActorPresent()
// img->Update();
// img->UpdateInformation();
+// _thresholdTable->Update();
_thresholdMapper->SetInput( img );
_thresholdMapper->SetLookupTable( _thresholdTable );
_thresholdActor->SetInput( _thresholdMapper->GetOutput() );
+// _scalarbarActor->SetLookupTable( _thresholdTable );
+ _scalarbarActor->SetLookupTable( _thresholdMapper->GetLookupTable() );
+
+ _scalarbarActor->SetTitle("Value");
+ _scalarbarActor->SetNumberOfLabels(5);
+// _scalarbarActor->SetTextPad(4); ??
+
} // _image
}
{
wxVtkBaseView * baseView = _baseView;
baseView->GetRenderer()->RemoveActor( _thresholdActor );
+ baseView->GetRenderer()->RemoveActor( _scalarbarActor );
+
_actorPresent = false;
}
}