Ignore:
Timestamp:
Dec 2, 2014, 5:56:30 PM (10 years ago)
Author:
ldelgass
Message:

Add protocol to toggle interpolation in image slicer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vtkvis/trunk/RendererGraphicsObjs.cpp

    r4090 r4814  
    24082408}
    24092409
     2410void Renderer::setImageSliceInterp(const DataSetId& id, bool state)
     2411{
     2412    ImageHashmap::iterator itr;
     2413
     2414    bool doAll = false;
     2415
     2416    if (id.compare("all") == 0) {
     2417        itr = _images.begin();
     2418        if (itr == _images.end())
     2419            return;
     2420        doAll = true;
     2421    } else {
     2422        itr = _images.find(id);
     2423    }
     2424    if (itr == _images.end()) {
     2425        ERROR("Image not found: %s", id.c_str());
     2426        return;
     2427    }
     2428
     2429    do {
     2430        itr->second->setJumpToNearestSlice(!state);
     2431    } while (doAll && ++itr != _images.end());
     2432
     2433    _needsRedraw = true;
     2434}
     2435
    24102436void Renderer::setImageSlicePlane(const DataSetId& id, double normal[3], double origin[3])
    24112437{
Note: See TracChangeset for help on using the changeset viewer.