Changeset 5076 for vtkvis/trunk
- Timestamp:
- Mar 5, 2015 12:38:01 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vtkvis/trunk/ColorMap.cpp
r4358 r5076 246 246 return _numTableEntries; 247 247 } 248 #if 0 248 249 249 /** 250 250 * \brief Build the lookup table from the control points in the transfer … … 263 263 264 264 _lookupTable->SetNumberOfTableValues(_numTableEntries); 265 265 #if 0 266 266 std::list<ControlPoint>::iterator itr = _controlPoints.begin(); 267 267 std::list<OpacityControlPoint>::iterator oitr = _opacityControlPoints.begin(); … … 328 328 _lookupTable->SetTableValue(i, color); 329 329 } 330 _needsBuild = false;331 TRACE("Leave");332 }333 330 #else 334 /**335 * \brief Build the lookup table from the control points in the transfer336 * function337 */338 void ColorMap::build()339 {340 if (!_needsBuild)341 return;342 343 TRACE("%s", _name.c_str());344 345 if (_lookupTable == NULL) {346 _lookupTable = vtkSmartPointer<vtkLookupTable>::New();347 }348 349 _lookupTable->SetNumberOfTableValues(_numTableEntries);350 351 331 double colorTable[_numTableEntries*3]; 352 332 _colorTF->GetTable(0., 1., _numTableEntries, colorTable); … … 355 335 356 336 for (int i = 0; i < _numTableEntries; i++) { 357 //double value = _numTableEntries < 2 ? 0.0 : ((double)i)/(_numTableEntries-1);358 337 double color[4]; 359 338 memcpy(color, colorTable+i*3, sizeof(double)*3); … … 361 340 _lookupTable->SetTableValue(i, color); 362 341 } 342 #endif 363 343 _needsBuild = false; 364 344 TRACE("Leave"); 365 345 } 366 #endif 346 367 347 /** 368 348 * \brief Perform linear interpolation of two color control points
Note: See TracChangeset
for help on using the changeset viewer.