vtkStandardNewMacro(VISU_Extractor);
VISU_Extractor::VISU_Extractor(){
- myScalarMode = 0;
+ myScalarMode = 1;
}
VISU_Extractor::~VISU_Extractor(){
VISU_ScalarMapPL
::SetScalarMode(int theScalarMode)
{
+ vtkDataSet *input = GetInput();
+ if (input){
+ if(input->GetPointData()->GetNumberOfArrays()){
+ vtkPointData *inData = input->GetPointData();
+ if(!inData->GetAttribute(vtkDataSetAttributes::VECTORS)) {
+ if (theScalarMode==0){
+ return;
+ }
+ }
+ }
+ else {
+ vtkCellData *inData = input->GetCellData();
+ if(!inData->GetAttribute(vtkDataSetAttributes::VECTORS)){
+ if (theScalarMode==0){
+ return;
+ }
+ }
+ }
+ }
+ //
myExtractor->SetScalarMode(theScalarMode);
Modified();
}
}
//
myModeCombo->setCurrentItem(thePrs->GetScalarMode());
+ if (aNbComp==1){
+ myModeCombo->setCurrentItem(1);
+ }
//
myModeLbl->setEnabled(isScalarMode);
myModeCombo->setEnabled(isScalarMode);
}
//
myModeCombo->setCurrentItem(thePrs->GetScalarMode());
+ if (aNbComp==1){
+ myModeCombo->setCurrentItem(1);
+ }
//
myModeLbl->setEnabled(isScalarMode);
myModeCombo->setEnabled(isScalarMode);
if(VISU_ScalarBarCtrl *aScalarBarCtrl = anActor->GetScalarBarCtrl()){
vtkIdType aScalarMode = GetScalarMode();
TMinMax aTMinMax = myField->GetMinMax(aScalarMode);
- float *aRange = myScalarMapPL->GetBarTable()->GetRange();
+ float aRange[2];
+ myScalarMapPL->GetSourceRange(aRange);
+ //float *aRange = myScalarMapPL->GetBarTable()->GetRange();
aScalarBarCtrl->SetRangeGlobal(aTMinMax.first, aTMinMax.second);
aScalarBarCtrl->SetRangeLocal(aRange);