Bonjour Audrey,<br><br>Have you tried :<br><br>double modelBounds[6];<br>holePolyData->GetBounds( modelBounds );<br>
<br>HTH,<br>Sylvain<br><br><div class="gmail_quote">On Thu, Apr 24, 2008 at 10:54 AM, Audrey Lemoussu <<a href="mailto:audrey.lemoussu@nist.gov">audrey.lemoussu@nist.gov</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br>
<br>
I have started to work with vtk for 2 weeks, and I need some help from vtk Users. I saw on the Internet that other people had had the same problem, but I didn't find any answer. In fact, when I write the output of my vtkVoxelModeller Object, I only get zeros.<br>
I don't know where it comes from!<br>
<br>
This is a part of my program :<br>
vtkPolyDataReader *holeReader = vtkPolyDataReader::New();<br>
holeReader->SetFileName( holeFileName );<br>
holeReader->Update();<br>
<br>
vtkPolyData *holePolyData = vtkPolyData::New();<br>
holePolyData->SetPoints( holeReader->GetOutput()->GetPoints() );<br>
holePolyData->SetPolys( holeReader->GetOutput()->GetLines() );<br>
<br>
int sampleDimensions[3] = { 10, 10, 10 };<br>
double modelBounds[6] = { 0.0, 1.0, 0.0, 1.0, 0.0, 1.0 };<br>
<br>
vtkVoxelModeller *voxelModeller = vtkVoxelModeller::New();<br>
voxelModeller->SetInput( holePolyData );<br>
//voxelModeller->SetSampleDimensions( sampleDimensions );<br>
// voxelModeller->SetModelBounds( modelBounds );<br>
voxelModeller->Update();<br>
<br>
vtkDataSetWriter *writer = vtkDataSetWriter::New();<br>
writer->SetFileName( outputFileName );<br>
writer->SetInputConnection (voxelModeller->GetOutputPort() );<br>
writer->Write();<br>
<br>
holeReader->Delete();<br>
holePolyData->Delete();<br>
voxelModeller->Delete();<br>
writer->Delete();<br>
<br>
Can anyone tell me if I have done some mistakes in my program or where my problem comes from ?<br>
<br>
Audrey Lemoussu<br>
<br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>