Changeset 5076 for vtkvis/trunk


Ignore:
Timestamp:
Mar 5, 2015 12:38:01 AM (9 years ago)
Author:
ldelgass
Message:

minor cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vtkvis/trunk/ColorMap.cpp

    r4358 r5076  
    246246    return _numTableEntries;
    247247}
    248 #if 0
     248
    249249/**
    250250 * \brief Build the lookup table from the control points in the transfer
     
    263263
    264264    _lookupTable->SetNumberOfTableValues(_numTableEntries);
    265 
     265#if 0
    266266    std::list<ControlPoint>::iterator itr = _controlPoints.begin();
    267267    std::list<OpacityControlPoint>::iterator oitr = _opacityControlPoints.begin();
     
    328328        _lookupTable->SetTableValue(i, color);
    329329    }
    330     _needsBuild = false;
    331     TRACE("Leave");
    332 }
    333330#else
    334 /**
    335  * \brief Build the lookup table from the control points in the transfer
    336  * function
    337  */
    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 
    351331    double colorTable[_numTableEntries*3];
    352332    _colorTF->GetTable(0., 1., _numTableEntries, colorTable);
     
    355335
    356336    for (int i = 0; i < _numTableEntries; i++) {
    357         //double value = _numTableEntries < 2 ? 0.0 : ((double)i)/(_numTableEntries-1);
    358337        double color[4];
    359338        memcpy(color, colorTable+i*3, sizeof(double)*3);
     
    361340        _lookupTable->SetTableValue(i, color);
    362341    }
     342#endif
    363343    _needsBuild = false;
    364344    TRACE("Leave");
    365345}
    366 #endif
     346
    367347/**
    368348 * \brief Perform linear interpolation of two color control points
Note: See TracChangeset for help on using the changeset viewer.