[vtkusers] vtkFixedPointVolumeRayCastMapper question

Randall Hand randall.hand at gmail.com
Wed May 25 14:15:23 EDT 2005


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.
My pipeline resembles the following:


vtkDataSetReader -> vtkArrayCalculator (to calculate magnitude) -> 
vtkGaussianSplatter -> vtkImageShiftScale = Dataset with ColorField single 
component scalar
+-> vtkGaussianSplatter -> ImageShiftScale = Dataset with OpacityField 
single component scalar.

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.


I then construct my volume parts:
vtkVolumeProperty *volProp = vtkVolumeProperty::New();
volProp->IndependentComponentsOff();
volProp->SetColor(xf_Color);
volProp->SetScalarOpacity(xf_Opacity);
volProp->SetInterpolationTypeToLinear();
volProp->ShadeOn();
volProp->SetAmbient(0.7);

// Now setup the Ray Caster
vtkFixedPointVolumeRayCastMapper *modelMapper = 
vtkFixedPointVolumeRayCastMapper::New();
modelMapper->SetImageSampleDistance(0.5);
modelMapper->SetSampleDistance(0.1);
modelMapper->SetInput(mergeFilter->GetOutput());

// Creating Volume
vtkVolume *volume = vtkVolume::New();
volume->SetMapper(modelMapper);
volume->SetProperty(volProp);
volume->Update();

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 :)
-- 
Randall Hand
http://www.yeraze.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050525/fc5710a4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output.jpg
Type: image/jpeg
Size: 25740 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050525/fc5710a4/attachment.jpg>


More information about the vtkusers mailing list