View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012113VTK(No Category)public2011-04-20 14:532013-04-05 20:26
ReporterJulien Finet 
Assigned ToJulien Finet 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0012113: vtkColorTransferFunction::SetNodeValue() doesn't refresh function range
DescriptionvtkColorTransferFunction::SetNodeValue() doesn't update the current range.
The new X of the control point can be outside of the current range, however the range is not updated.
Solutions:
+vtkColorTransferFunction::SetNodeValue() can call SortAndUpdateRange()
+Expose vtkColorTransferFunction::MovePoint() (it updates correctly the range) to the public API. If the user knows he just want to move the point, then he can call MovePoint() instead.
Steps To ReproducevtkColorTransferFunction* ctf = vtkColorTransferFunction::New();
ctf->AddHSVSegment(0., 0., 1., 1., 0.3333, 0.3333, 1., 1.);
ctf->AddHSVSegment(0.3333, 0.3333, 1., 1., 0.6666, 0.666, 1., 1.);
ctf->AddHSVSegment(0.6666, 0.6666, 1., 1., 1., 0., 1., 1.);
ctf->GetRange(); -> [0., 1.]
double firstPoint[6];
ctf->GetNodeValue(0, firstPoint);
firstPoint[0] = -1.;
ctf->SetNodeValue(0, firstPoint); // move the first point in 0. to -1.
ctf->GetRange(); -> [0., 1.] should be [-1., 1.]
Additional InformationA work around (time consuming) is to use AdjustRange() after calling vtkColorTransferFunction::SetNodeValue().
TagsNo tags attached.
Project
Type
Attached Files

 Relationships

  Notes
(0026234)
Julien Finet (developer)
2011-04-20 15:07

vtkColorTransferFunction::RemovePoint() doesn't refresh the range neither.
(0026441)
Julien Finet (developer)
2011-05-05 16:19

Fixed on April 22th 2011.
Commit SHA1: ec97c6e7cc768b0b25f2
Change-ID: I5944e923555346ce246cbc22581d15f381a29676

 Issue History
Date Modified Username Field Change
2011-04-20 14:53 Julien Finet New Issue
2011-04-20 15:07 Julien Finet Note Added: 0026234
2011-04-20 16:22 Julien Finet Assigned To => Julien Finet
2011-04-20 16:22 Julien Finet Status backlog => tabled
2011-05-05 16:19 Julien Finet Note Added: 0026441
2011-05-05 16:19 Julien Finet Status tabled => @80@
2011-05-05 16:19 Julien Finet Resolution open => fixed
2011-06-16 13:12 Zack Galbreath Category Development => (No Category)
2013-04-05 20:26 Berk Geveci Status customer review => closed


Copyright © 2000 - 2018 MantisBT Team