I have a long pipeline setup to render a multifield dataset. one
field I want mapped to opacity, and the other one is a vector that I
want magnitude mapped to color.<br>
My pipeline resembles the following:<br>
<br>
<br>
vtkDataSetReader -> vtkArrayCalculator (to calculate magnitude)
-> vtkGaussianSplatter -> vtkImageShiftScale = Dataset with
ColorField single component scalar<br>
+-> vtkGaussianSplatter -> ImageShiftScale = Dataset with
OpacityField single component scalar.<br>
<br>
I then do a
OpacityData->GetPointData()->AddArray(Colordata->GetPointData()->GetArray("colorField")),
and pass the result through a vtkMergeFields to combine the 2 fields
into a single dual-component field, and make the new field the Active
Scalar.<br>
<br>
<br>
I then construct my volume parts:<br>
vtkVolumeProperty *volProp = vtkVolumeProperty::New();<br>
volProp->IndependentComponentsOff();<br>
volProp->SetColor(xf_Color);<br>
volProp->SetScalarOpacity(xf_Opacity);<br>
volProp->SetInterpolationTypeToLinear();<br>
volProp->ShadeOn();<br>
volProp->SetAmbient(0.7);<br>
<br>
// Now setup the Ray Caster<br>
vtkFixedPointVolumeRayCastMapper *modelMapper = vtkFixedPointVolumeRayCastMapper::New();<br>
modelMapper->SetImageSampleDistance(0.5);<br>
modelMapper->SetSampleDistance(0.1);<br>
modelMapper->SetInput(mergeFilter->GetOutput());<br>
<br>
// Creating Volume<br>
vtkVolume *volume = vtkVolume::New();<br>
volume->SetMapper(modelMapper);<br>
volume->SetProperty(volProp);<br>
volume->Update();<br>
<br>
When all is said and done, however, I just get a darkish blurry spot
(image Attached). Can anyone see what's wrong, or have I exposed
a bug in the FixedPointVolumeRayCastMapper ? I've been waiting to
do this since I figured out that the old VolumeRayCastMapper couldn't
handle multi-component data, and i'm anxious to see this work for once
:)<br>-- <br>Randall Hand<br><a href="http://www.yeraze.com">http://www.yeraze.com</a>