[vtkusers] Voxelizing geometry

Stefan Bruckner stefan.bruckner at chello.at
Thu Jun 12 14:23:30 EDT 2003


Hi!

I am trying to voxelize a geometric object and then perform volume
rendering, however, I can't seem to get it working:

vtkSphereSource *sphere = vtkSphereSource::New();
sphere->SetThetaResolution(30);
sphere->SetPhiResolution(30);

vtkVoxelModeller *modeller = vtkVoxelModeller::New();
modeller->SetSampleDimensions(64,64,64);
modeller->SetInput(sphere->GetOutput());

vtkCastToConcrete *caster = vtkCastToConcrete::New();
caster->SetInput(modeller->GetOutput());

I pass the result of "caster->GetStructuredPointsOutput()" to the volume
mapper.

After rather lengthy processing I get the following error message in the
output window, and the rendering shows nothing.

"ERROR: In C:\martink\vtk42\VTK\Filtering\vtkImageToImageFilter.cxx,
line 94
vtkImageClip (0x054BD9A8): ExecuteInformation: Input is not set."

What am I doing wrong? Can anyone please assist me with some sample code
or point me to an example (I didn't mange to find examples for
voxelization).

Thanks, 
Stefan Bruckner






More information about the vtkusers mailing list