Ignore:
Timestamp:
Aug 2, 2014 1:01:34 AM (9 years ago)
Author:
ldelgass
Message:

more fix merges

Location:
vtkvis/branches/1.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • vtkvis/branches/1.7

  • vtkvis/branches/1.7/Volume.cpp

    r4608 r4609  
    109109    if (ds->GetPointData() == NULL ||
    110110        ds->GetPointData()->GetScalars() == NULL) {
    111         WARN("No scalar point data in dataset %s", _dataSet->getName().c_str());
     111        USER_ERROR("No scalar field was found in the data set");
     112        return;
    112113    }
    113114
     
    354355void Volume::setBlendMode(BlendMode mode)
    355356{
    356     if (_volumeMapper != NULL) {
    357         vtkVolumeMapper *mapper = vtkVolumeMapper::SafeDownCast(_volumeMapper);
    358         if (mapper == NULL) {
     357    if (_volumeMapper == NULL)
     358        return;
     359
     360    vtkVolumeMapper *mapper = vtkVolumeMapper::SafeDownCast(_volumeMapper);
     361    if (mapper == NULL) {
     362        vtkUnstructuredGridVolumeMapper *ugmapper = vtkUnstructuredGridVolumeMapper::SafeDownCast(_volumeMapper);
     363        if (ugmapper == NULL) {
    359364            TRACE("Mapper does not support BlendMode");
    360365            return;
    361366        }
     367        switch (mode) {
     368        case BLEND_COMPOSITE:
     369            ugmapper->SetBlendModeToComposite();
     370            break;
     371        case BLEND_MAX_INTENSITY:
     372            ugmapper->SetBlendModeToMaximumIntensity();
     373            break;
     374        case BLEND_MIN_INTENSITY:
     375        case BLEND_ADDITIVE:
     376        default:
     377            ERROR("Unknown BlendMode");
     378        }
     379    } else {
    362380        switch (mode) {
    363381        case BLEND_COMPOSITE:
Note: See TracChangeset for help on using the changeset viewer.