Commit da1de9a0 authored by Bob Obara's avatar Bob Obara
Browse files

BUG:Fixed crash due to internal mappers not finding the correct scalars

The problem was that the smart mapper was not passing the proper
scalar information to the internal mappers

Change-Id: I6c6979b71bb4ad8e39c9ef843955117ba27822e6
parent 3175ffa3
......@@ -375,6 +375,15 @@ void vtkSmartVolumeMapper::ComputeRenderMode(vtkRenderer *ren, vtkVolume *vol)
{
// We are rendering with the vtkFixedPointVolumeRayCastMapper
case vtkSmartVolumeMapper::RayCastRenderMode:
if (this->ArrayAccessMode == VTK_GET_ARRAY_BY_NAME)
{
this->RayCastMapper->SelectScalarArray(this->ArrayName);
}
else if (this->ArrayAccessMode == VTK_GET_ARRAY_BY_ID)
{
this->RayCastMapper->SelectScalarArray(this->ArrayId);
}
this->RayCastMapper->SetScalarMode(this->GetScalarMode());
this->ConnectMapperInput(this->RayCastMapper);
this->RayCastMapper->SetClippingPlanes(this->GetClippingPlanes());
this->RayCastMapper->SetCropping(this->GetCropping());
......@@ -389,6 +398,15 @@ void vtkSmartVolumeMapper::ComputeRenderMode(vtkRenderer *ren, vtkVolume *vol)
// We are rendering with the vtkVolumeTextureMapper3D
case vtkSmartVolumeMapper::TextureRenderMode:
if (this->ArrayAccessMode == VTK_GET_ARRAY_BY_NAME)
{
this->TextureMapper->SelectScalarArray(this->ArrayName);
}
else if (this->ArrayAccessMode == VTK_GET_ARRAY_BY_ID)
{
this->TextureMapper->SelectScalarArray(this->ArrayId);
}
this->TextureMapper->SetScalarMode(this->GetScalarMode());
this->ConnectMapperInput(this->TextureMapper);
if ( this->RequestedRenderMode == vtkSmartVolumeMapper::DefaultRenderMode ||
this->RequestedRenderMode == vtkSmartVolumeMapper::RayCastAndTextureRenderMode )
......@@ -410,6 +428,15 @@ void vtkSmartVolumeMapper::ComputeRenderMode(vtkRenderer *ren, vtkVolume *vol)
// We are rendering with the vtkGPUVolumeRayCastMapper
case vtkSmartVolumeMapper::GPURenderMode:
if (this->ArrayAccessMode == VTK_GET_ARRAY_BY_NAME)
{
this->GPUMapper->SelectScalarArray(this->ArrayName);
}
else if (this->ArrayAccessMode == VTK_GET_ARRAY_BY_ID)
{
this->GPUMapper->SelectScalarArray(this->ArrayId);
}
this->GPUMapper->SetScalarMode(this->GetScalarMode());
this->GPUMapper->SetMaxMemoryInBytes(this->MaxMemoryInBytes);
this->GPUMapper->SetMaxMemoryFraction(this->MaxMemoryFraction);
this->GPUMapper->SetSampleDistance(
......
Supports Markdown
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