Good that you were able to build it :)<br>The error message (essentially a suggestion) says that you need to supply the data directory as the 2nd argument.<br><br>your_dir&gt;Medical1.exe &lt;full_path_to_data_dir&gt;<br><br>
where, full_path_to_data_dir is say, C:\vtkdata\headsq<br>also, add the constant part in the filenames.. xxx.1, xxx.2, xxx.3 then add &#39;xxx&#39;<br><br>from your screenshot, I suggest this:<br><br><b>D:\Test\cxx\OUT\Debug\Medica1.exe C:\vtkdata\headsq\quarter</b><br>
<br>In the 2nd argument, C:\vtkdata\headsq\ is the directory and quarter.1, quarter.2, quarter.3 etc are files in it.<br><br>Hope that helps!<br><br>- Divya Rathore<br><br><div class="gmail_quote">On Tue, Apr 21, 2009 at 2:26 PM, JOHN ATKINSON <span dir="ltr">&lt;<a href="mailto:johnimager@gmail.com">johnimager@gmail.com</a>&gt;</span> 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>
As per your instruction I built Medical1.cxx again with the sample<br>
data set headquarter.I have attached the screen shot of the output<br>
whcih is mere a command prompt .I am not able to view the rendered<br>
output.Please Help.<br>
<br>
Code.<br>
#include &quot;vtkRenderer.h&quot;<br>
#include &quot;vtkRenderWindow.h&quot;<br>
#include &quot;vtkRenderWindowInteractor.h&quot;<br>
#include &quot;vtkVolume16Reader.h&quot;<br>
#include &quot;vtkPolyDataMapper.h&quot;<br>
#include &quot;vtkActor.h&quot;<br>
#include &quot;vtkOutlineFilter.h&quot;<br>
#include &quot;vtkCamera.h&quot;<br>
#include &quot;vtkProperty.h&quot;<br>
#include &quot;vtkPolyDataNormals.h&quot;<br>
#include &quot;vtkContourFilter.h&quot;<br>
<br>
int main (int argc, char **argv)<br>
{<br>
  if (argc &lt; 2)<br>
    {<br>
      cout &lt;&lt; &quot;Usage: &quot; &lt;&lt; argv[0] &lt;&lt; &quot; DATADIR/headsq/quarter&quot; &lt;&lt; endl;<br>
    return 1;<br>
    }<br>
<br>
  // Create the renderer, the render window, and the interactor. The renderer<br>
  // draws into the render window, the interactor enables mouse- and<br>
  // keyboard-based interaction with the data within the render window.<br>
  //<br>
  vtkRenderer *aRenderer = vtkRenderer::New();<br>
  vtkRenderWindow *renWin = vtkRenderWindow::New();<br>
    renWin-&gt;AddRenderer(aRenderer);<br>
  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>
    iren-&gt;SetRenderWindow(renWin);<br>
<br>
  // The following reader is used to read a series of 2D slices (images)<br>
  // that compose the volume. The slice dimensions are set, and the<br>
  // pixel spacing. The data Endianness must also be specified. The reader<br>
  // usese the FilePrefix in combination with the slice number to construct<br>
  // filenames using the format FilePrefix.%d. (In this case the FilePrefix<br>
  // is the root name of the file: quarter.)<br>
  vtkVolume16Reader *v16 = vtkVolume16Reader::New();<br>
    v16-&gt;SetDataDimensions (64,64);<br>
    v16-&gt;SetImageRange (1,93);<br>
    v16-&gt;SetDataByteOrderToLittleEndian();<br>
    v16-&gt;SetFilePrefix (argv[1]);<br>
    v16-&gt;SetDataSpacing (3.2, 3.2, 1.5);<br>
<br>
  // An isosurface, or contour value of 500 is known to correspond to the<br>
  // skin of the patient. Once generated, a vtkPolyDataNormals filter is<br>
  // is used to create normals for smooth surface shading during rendering.<br>
  vtkContourFilter *skinExtractor = vtkContourFilter::New();<br>
    skinExtractor-&gt;SetInputConnection(v16-&gt;GetOutputPort());<br>
    skinExtractor-&gt;SetValue(0, 500);<br>
  vtkPolyDataNormals *skinNormals = vtkPolyDataNormals::New();<br>
    skinNormals-&gt;SetInputConnection(skinExtractor-&gt;GetOutputPort());<br>
    skinNormals-&gt;SetFeatureAngle(60.0);<br>
  vtkPolyDataMapper *skinMapper = vtkPolyDataMapper::New();<br>
    skinMapper-&gt;SetInputConnection(skinNormals-&gt;GetOutputPort());<br>
    skinMapper-&gt;ScalarVisibilityOff();<br>
  vtkActor *skin = vtkActor::New();<br>
    skin-&gt;SetMapper(skinMapper);<br>
<br>
  // An outline provides context around the data.<br>
  //<br>
  vtkOutlineFilter *outlineData = vtkOutlineFilter::New();<br>
    outlineData-&gt;SetInputConnection(v16-&gt;GetOutputPort());<br>
  vtkPolyDataMapper *mapOutline = vtkPolyDataMapper::New();<br>
    mapOutline-&gt;SetInputConnection(outlineData-&gt;GetOutputPort());<br>
  vtkActor *outline = vtkActor::New();<br>
    outline-&gt;SetMapper(mapOutline);<br>
    outline-&gt;GetProperty()-&gt;SetColor(0,0,0);<br>
<br>
  // It is convenient to create an initial view of the data. The FocalPoint<br>
  // and Position form a vector direction. Later on (ResetCamera() method)<br>
  // this vector is used to position the camera to look at the data in<br>
  // this direction.<br>
  vtkCamera *aCamera = vtkCamera::New();<br>
    aCamera-&gt;SetViewUp (0, 0, -1);<br>
    aCamera-&gt;SetPosition (0, 1, 0);<br>
    aCamera-&gt;SetFocalPoint (0, 0, 0);<br>
    aCamera-&gt;ComputeViewPlaneNormal();<br>
<br>
  // Actors are added to the renderer. An initial camera view is created.<br>
  // The Dolly() method moves the camera towards the FocalPoint,<br>
  // thereby enlarging the image.<br>
  aRenderer-&gt;AddActor(outline);<br>
  aRenderer-&gt;AddActor(skin);<br>
  aRenderer-&gt;SetActiveCamera(aCamera);<br>
  aRenderer-&gt;ResetCamera ();<br>
  aCamera-&gt;Dolly(1.5);<br>
<br>
  // Set a background color for the renderer and set the size of the<br>
  // render window (expressed in pixels).<br>
  aRenderer-&gt;SetBackground(1,1,1);<br>
  renWin-&gt;SetSize(640, 480);<br>
<br>
  // Note that when camera movement occurs (as it does in the Dolly()<br>
  // method), the clipping planes often need adjusting. Clipping planes<br>
  // consist of two planes: near and far along the view direction. The<br>
  // near plane clips out objects in front of the plane; the far plane<br>
  // clips out objects behind the plane. This way only what is drawn<br>
  // between the planes is actually rendered.<br>
  aRenderer-&gt;ResetCameraClippingRange ();<br>
<br>
  // Initialize the event loop and then start it.<br>
  iren-&gt;Initialize();<br>
  iren-&gt;Start();<br>
<br>
  // It is important to delete all objects created previously to prevent<br>
  // memory leaks. In this case, since the program is on its way to<br>
  // exiting, it is not so important. But in applications it is<br>
  // essential.<br>
  v16-&gt;Delete();<br>
  skinExtractor-&gt;Delete();<br>
  skinNormals-&gt;Delete();<br>
  skinMapper-&gt;Delete();<br>
  skin-&gt;Delete();<br>
  outlineData-&gt;Delete();<br>
  mapOutline-&gt;Delete();<br>
  outline-&gt;Delete();<br>
  aCamera-&gt;Delete();<br>
  iren-&gt;Delete();<br>
  renWin-&gt;Delete();<br>
  aRenderer-&gt;Delete();<br>
<br>
  return 0;<br>
}<br>
<br>
<br>
Regards<br>
<font color="#888888">John<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>&quot;The difference between school and life? In school, you&#39;re taught a lesson and then given a test. In life, you&#39;re given a test that teaches you a lesson.&quot;<br>