Hi Antonio,<br /><br />
I've written a compilable example, which demonstrates converting an vtkImageData object to vtkPolyData is working properly:<br />
<pre>#<span style=' color: Blue;'>include</span> <vtkVersion.h>
#<span style=' color: Blue;'>include</span> <vtkPolyDataMapper.h>
#<span style=' color: Blue;'>include</span> <vtkActor.h>
#<span style=' color: Blue;'>include</span> <vtkRenderWindow.h>
#<span style=' color: Blue;'>include</span> <vtkRenderer.h>
#<span style=' color: Blue;'>include</span> <vtkRenderWindowInteractor.h>
#<span style=' color: Blue;'>include</span> <vtkInteractorStyleUser.h>
#<span style=' color: Blue;'>include</span> <vtkSmartPointer.h>
#<span style=' color: Blue;'>include</span> <span style=' color: Maroon;'>"vtkVolume16Reader.h"</span>
#<span style=' color: Blue;'>include</span> <span style=' color: Maroon;'>"vtkImageData.h"</span>
#<span style=' color: Blue;'>include</span> <span style=' color: Maroon;'>"vtkImageDataGeometryFilter.h"</span>
<span style=' color: Blue;'>int</span> main(<span style=' color: Blue;'>int</span>, <span style=' color: Blue;'>char</span> *[])
{
vtkSmartPointer<vtkVolume16Reader> v16 = vtkSmartPointer<vtkVolume16Reader>::New();
v16->SetDataDimensions(<span style=' color: Maroon;'>64</span>, <span style=' color: Maroon;'>64</span>);
v16->GetOutput()->SetOrigin(<span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>, <span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>, <span style=' color: Maroon;'>0</span><span style=' color: Maroon;'>.0</span>);
v16->SetDataByteOrderToLittleEndian();
v16->SetFilePrefix(<span style=' color: Maroon;'>"c:\\vtk\\vtkdata-5.8.0\\Data\\headsq\\quarter"</span>);
v16->SetImageRange(<span style=' color: Maroon;'>1</span>, <span style=' color: Maroon;'>93</span>);
v16->SetDataSpacing(<span style=' color: Maroon;'>3</span><span style=' color: Maroon;'>.2</span>, <span style=' color: Maroon;'>3</span><span style=' color: Maroon;'>.2</span>, <span style=' color: Maroon;'>1</span><span style=' color: Maroon;'>.5</span>);
v16->Update();
vtkImageData* imageData = v16->GetOutput();
vtkSmartPointer<vtkImageDataGeometryFilter> filter = vtkSmartPointer<vtkImageDataGeometryFilter>::New();
filter->SetInput(imageData);
vtkSmartPointer<vtkPolyDataMapper> polyDataMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
polyDataMapper->SetInputConnection(filter->GetOutputPort());
vtkSmartPointer<vtkActor> polyActor = vtkSmartPointer<vtkActor>::New();
polyActor->SetMapper(polyDataMapper);
<span style=' color: Green;'>// get a reference to the renderwindow of our renderWindowControl1</span>
<span style=' color: Green;'>// Visualize</span>
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
vtkSmartPointer<vtkRenderWindow> renderWindow =
vtkSmartPointer<vtkRenderWindow>::New();
renderWindow->AddRenderer(renderer);
vtkSmartPointer<vtkRenderWindowInteractor> interactor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
interactor->SetRenderWindow(renderWindow);
renderer->AddActor(polyActor);
renderWindow->SetSize(<span style=' color: Maroon;'>500</span>,<span style=' color: Maroon;'>500</span>);
renderWindow->Render();
renderWindow->Render();
interactor->Start();
<span style=' color: Blue;'>return</span> EXIT_SUCCESS;
}
</pre>
Maybe you will provide us with a full compilable small example demostrating the problem.
<br /><br />
best regards<br />
Jochen
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/vtkVolume-vtkActor-tp5714227p5714252.html">Re: vtkVolume vtkActor</a><br/>
Sent from the <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html">VTK - Users mailing list archive</a> at Nabble.com.<br/>