Hi everybody,<br><br>I am really new of vtk, and I am trying to write a code that reads an ASCII .vtk file containing a grid defined by structured points and a scalar field. I want to obtain an image of the scalar field plotted on the structured grid. At the moment I wrote the following code 
<br><br>&nbsp;vtkStructuredPointsReader * reader = vtkStructuredPointsReader::New();<br>&nbsp;&nbsp;&nbsp; reader-&gt;SetFileName(&quot;plotSolution.vtk&quot;);<br><br>&nbsp; vtkImageViewer * viewer = vtkImageViewer::New();<br>&nbsp;&nbsp;&nbsp; //viewer-&gt;SetInput(imageData);
<br>&nbsp;&nbsp;&nbsp; viewer-&gt;SetInputConnection(reader-&gt;GetOutputPort());<br>&nbsp;&nbsp;&nbsp; viewer-&gt;SetZSlice(0);<br>&nbsp;&nbsp;&nbsp; viewer-&gt;SetColorWindow(20.0);<br>&nbsp;&nbsp;&nbsp; viewer-&gt;SetColorLevel(0.0);<br>&nbsp;&nbsp;&nbsp; viewer-&gt;Render();<br><br>&nbsp; usleep(5000000);
<br>&nbsp; <br>&nbsp; reader-&gt;Delete();<br>&nbsp; viewer-&gt;Delete();<br><br>but the image displayed is simply black. The file I am using is correct (it is displayed correctly if I read it from Paraview). <br>Does anybody know how to do (or where to find an example) to read from a .vtk file to an ImageViewer? 
<br><br>Thanks in advance for your help.<br><br>Daniele<br><br><br>