Changeset 4255


Ignore:
Timestamp:
Mar 20, 2014 9:12:49 PM (10 years ago)
Author:
ldelgass
Message:

add method to set snapping to data slices

Location:
trunk/packages/vizservers/vtkvis
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/vizservers/vtkvis/Image.cpp

    r4081 r4255  
    7676        TRACE("Creating mapper");
    7777        vtkSmartPointer<vtkImageResliceMapper> newMapper = vtkSmartPointer<vtkImageResliceMapper>::New();
     78        newMapper->AutoAdjustImageQualityOff();
    7879        getImageSlice()->SetMapper(newMapper);
    7980        mapper = getImageMapper();
  • trunk/packages/vizservers/vtkvis/Image.h

    r4090 r4255  
    8989    }
    9090
     91    void setJumpToNearestSlice(bool state)
     92    {
     93        vtkImageMapper3D *mapper = getImageMapper();
     94        vtkImageResliceMapper *resliceMapper = vtkImageResliceMapper::SafeDownCast(mapper);
     95        if (resliceMapper != NULL) {
     96            resliceMapper->SetJumpToNearestSlice(state ? 1 : 0);
     97        }
     98    }
     99
    91100    void setExtents(int extent[6])
    92101    {
Note: See TracChangeset for help on using the changeset viewer.