- Timestamp:
- Oct 2, 2013, 12:13:32 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/vizservers/vtkvis/ColorMap.cpp
r3616 r3976 67 67 { 68 68 vtkSmartPointer<vtkColorTransferFunction> tf = vtkSmartPointer<vtkColorTransferFunction>::New(); 69 tf->DeepCopy(_colorTF);70 69 double tmp[6]; 71 for (int i = 0; i < tf->GetSize(); i++) {72 tf->GetNodeValue(i, tmp);70 for (int i = 0; i < _colorTF->GetSize(); i++) { 71 _colorTF->GetNodeValue(i, tmp); 73 72 tmp[0] = range[0] + tmp[0] * (range[1] - range[0]); 74 tf-> SetNodeValue(i, tmp);73 tf->AddRGBPoint(tmp[0], tmp[1], tmp[2], tmp[3], tmp[4], tmp[5]); 75 74 } 76 75 return tf; … … 85 84 { 86 85 vtkSmartPointer<vtkPiecewiseFunction> tf = vtkSmartPointer<vtkPiecewiseFunction>::New(); 87 tf->DeepCopy(_opacityTF);88 86 double tmp[4]; 89 for (int i = 0; i < tf->GetSize(); i++) {90 tf->GetNodeValue(i, tmp);87 for (int i = 0; i < _opacityTF->GetSize(); i++) { 88 _opacityTF->GetNodeValue(i, tmp); 91 89 tmp[0] = range[0] + tmp[0] * (range[1] - range[0]); 92 tf-> SetNodeValue(i, tmp);90 tf->AddPoint(tmp[0], tmp[1], tmp[2], tmp[3]); 93 91 } 94 92 return tf;
Note: See TracChangeset
for help on using the changeset viewer.