MantisBT - VTK
View Issue Details
0012799VTK(No Category)public2011-12-16 05:472016-08-12 09:55
tomasz 
Dave DeMarle 
normalminorhave not tried
closedmoved 
5.6.1 
 
TBD
incorrect functionality
0012799: VRML Exporter disregards UseLookupTableScalarRangeOn on LookupTables
In its (internal) PolyDataMapper the exporter "copies" ScalarRange from the actor (Get/Set), disregarding UseLookupTableScalarRangeOn if such done.
As a result the lookup table (colors) gets reset to the defaout range 0..1.
Remark: I do not now if "by design" the GetScalarRange shall (only) return what has been "Sat" (diregarding UseLookupTableScalarRangeOn) OR if any Exporter shall check UseLookupTableScalarRangeOn and go the other (now missing) way.

My Code:
contourMapper.ScalarVisibilityOn();
contourMapper.SetLookupTable(_LookupTable);
contourMapper.UseLookupTableScalarRangeOn(); // otherwise Mapper overwites lut range!

and in vtkVRMLExporter:
  pm = vtkPolyDataMapper::New();
  pm->SetInput(pd);
  pm->SetScalarRange(anActor->GetMapper()->GetScalarRange()); <================??????
  pm->SetScalarVisibility(anActor->GetMapper()->GetScalarVisibility());
  pm->SetLookupTable(anActor->GetMapper()->GetLookupTable());
  pm->SetScalarMode(anActor->GetMapper()->GetScalarMode());

i.e. no check if UseLookupTableScalarRangeOn used instead
No tags attached.
Issue History
2011-12-16 05:47tomaszNew Issue
2011-12-16 06:03tomaszNote Added: 0027825
2013-07-22 16:54Dave DeMarleNote Added: 0031176
2013-07-22 16:54Dave DeMarleStatusbacklog => expired
2013-07-22 16:54Dave DeMarleAssigned To => Dave DeMarle
2016-08-12 09:55Kitware RobotNote Added: 0037262
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionopen => moved

Notes
(0027825)
tomasz   
2011-12-16 06:03   
Seems the ALL exporters miss the copy:
   pm->SetUseLookupTableScalarRange(m->GetUseLookupTableScalarRange());
an more!
Looking at vtkMapper::ShallowCopy:
    this->SetLookupTable(m->GetLookupTable());
    this->SetScalarVisibility(m->GetScalarVisibility());
    this->SetScalarRange(m->GetScalarRange());
    this->SetColorMode(m->GetColorMode());
    this->SetScalarMode(m->GetScalarMode());
    this->SetScalarMaterialMode(m->GetScalarMaterialMode());
    this->SetImmediateModeRendering(m->GetImmediateModeRendering());
    this->SetUseLookupTableScalarRange(m->GetUseLookupTableScalarRange());<====

Think adding at least
pm->SetUseLookupTableScalarRange(m->GetUseLookupTableScalarRange());
in each exporter
would immediately fix it (i'm not involved in VTK project itself, so please fix it).
Kind Regards, Tomasz.
(0031176)
Dave DeMarle   
2013-07-22 16:54   
Please reopen this report if the bug is still present in 6.0.0.
(0037262)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.