Commit 4d5a1b4a authored by Sankhesh Jhaveri's avatar Sankhesh Jhaveri

Safely error out of fixed point mapper when using the average IP mode

parent d53eb241
......@@ -1475,6 +1475,20 @@ void vtkFixedPointVolumeRayCastMapper::Render( vtkRenderer *ren, vtkVolume *vol
// << " is > 1. This class does not produce repeatable results when the number of threads exceeds 1.");
// this->ThreadWarning = false;
// }
if(this->GetBlendMode()!=vtkVolumeMapper::COMPOSITE_BLEND &&
this->GetBlendMode()!=vtkVolumeMapper::MAXIMUM_INTENSITY_BLEND &&
this->GetBlendMode()!=vtkVolumeMapper::MINIMUM_INTENSITY_BLEND &&
this->GetBlendMode()!=vtkVolumeMapper::AVERAGE_INTENSITY_BLEND &&
this->GetBlendMode()!=vtkVolumeMapper::ADDITIVE_BLEND)
{
vtkErrorMacro(<< "Selected blend mode not supported. "
<< "Only Composite, MIP, MinIP, averageIP and additive modes "
<< "are supported by the fixed point implementation.");
return;
}
this->Timer->StartTimer();
// Since we are passing in a value of 0 for the multiRender flag
......
......@@ -370,7 +370,8 @@ int vtkGPUVolumeRayCastMapper::ValidateRender(vtkRenderer *ren,
}
}
// Check on the blending type - we support composite and min / max intensity
// Check on the blending type - we support composite, additive, average
// and min / max intensity
if ( goodSoFar )
{
if(this->BlendMode!=vtkVolumeMapper::COMPOSITE_BLEND &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment