Fellow VTK Users,<br><br>    If I could borrow some of your attention for a moment. I am trying to extract isosurfaces from bmp files. I have written some code that I believe reads in all my files then go about trying to create a nice smooth surface but when I render the window and try to view the images, all I see is just the box holding the data. I assumed if the data types did not work together an error would have been thrown but that is not the case and when I comment everything else out except for the code that reads in my files, it stops and thinks for a bit so I am under the impression that it is reading in my files. I am just confused as to why the render window comes up blank when I run the program. Here is the code I am using:<br>

<br>#include &lt;vtkSmartPointer.h&gt;<br>#include &lt;vtkImageViewer2.h&gt;<br>#include &lt;vtkBMPReader.h&gt;<br>#include &lt;vtkPolyDataMapper.h&gt;<br>#include &lt;vtkActor.h&gt;<br>#include &lt;vtkOutlineFilter.h&gt;<br>

#include &lt;vtkCamera.h&gt;<br>#include &lt;vtkProperty.h&gt;<br>#include &lt;vtkPolyDataNormals.h&gt;<br>#include &lt;vtkContourFilter.h&gt;<br>#include &lt;vtkRenderWindow.h&gt;<br>#include &lt;vtkRenderWindowInteractor.h&gt;<br>

#include &lt;vtkInteractorStyleTrackballCamera.h&gt;<br>#include &lt;vtkRenderer.h&gt;<br> <br>int main(int argc, char* argv[])<br>{<br><br>  //Read the images<br>  vtkSmartPointer&lt;vtkBMPReader&gt; bmp =<br>    vtkSmartPointer&lt;vtkBMPReader&gt;::New();<br>

   bmp-&gt;SetFilePrefix(&quot;../../../../../Auxillary/Data/Data_Set_1/Threshold_Data/fetus_threshold_&quot;); <br>   bmp-&gt;SetFilePattern(&quot;%s%04d.bmp&quot;); <br>   bmp-&gt;SetFileNameSliceOffset(1);<br>   bmp-&gt;SetFileNameSliceSpacing(1);<br>

   bmp-&gt;SetNumberOfScalarComponents(3);<br>   bmp-&gt;SetDataSpacing(1,1,1);<br>   bmp-&gt;SetDataOrigin(0,0,0);<br>   bmp-&gt;SetDataExtent(0,400,0,400,22,679); <br>   bmp-&gt;Update();<br><br><br>   //isosurface extraction attempt<br>

   vtkSmartPointer&lt;vtkContourFilter&gt; Extract1 =<br>     vtkSmartPointer&lt;vtkContourFilter&gt;::New();<br>   Extract1-&gt;SetInputConnection( bmp-&gt;GetOutputPort() );<br>   Extract1-&gt;SetValue( 0, 1200 );<br><br>

   vtkSmartPointer&lt;vtkPolyDataNormals&gt; Normals =<br>     vtkSmartPointer&lt;vtkPolyDataNormals&gt;::New();<br>   Normals-&gt;SetInputConnection( Extract1-&gt;GetOutputPort() );<br>   Normals-&gt;SetFeatureAngle( 60.0 );<br>

<br>   vtkSmartPointer&lt;vtkPolyDataMapper&gt; Mapper =<br>     vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();<br>   Mapper-&gt;SetInputConnection( Normals-&gt;GetOutputPort() );<br>   Mapper-&gt;ScalarVisibilityOff();<br>

<br>   vtkSmartPointer&lt;vtkActor&gt; Actor =<br>     vtkSmartPointer&lt;vtkActor&gt;::New();<br>   Actor-&gt;SetMapper( Mapper );<br><br>  // An outline provides context around the data.<br>  vtkSmartPointer&lt;vtkOutlineFilter&gt; outlineData =<br>

    vtkSmartPointer&lt;vtkOutlineFilter&gt;::New();<br>  outlineData-&gt;SetInputConnection( bmp-&gt;GetOutputPort() );<br><br>  vtkSmartPointer&lt;vtkPolyDataMapper&gt; mapOutline =<br>    vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();<br>

  mapOutline-&gt;SetInputConnection( outlineData-&gt;GetOutputPort() );<br><br>  vtkSmartPointer&lt;vtkActor&gt; outline =<br>    vtkSmartPointer&lt;vtkActor&gt;::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>  vtkSmartPointer&lt;vtkCamera&gt; aCamera =<br>    vtkSmartPointer&lt;vtkCamera&gt;::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>  aCamera-&gt;Azimuth( 30.0 );<br>  aCamera-&gt;Elevation( 30.0 );<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>  vtkSmartPointer&lt;vtkRenderer&gt; aRenderer =<br>    vtkSmartPointer&lt;vtkRenderer&gt;::New();<br>  <br>  vtkSmartPointer&lt;vtkRenderWindow&gt; renWin =<br>

    vtkSmartPointer&lt;vtkRenderWindow&gt;::New();<br>  renWin-&gt;AddRenderer(aRenderer);<br><br>  vtkSmartPointer&lt;vtkRenderWindowInteractor&gt; iren =<br>    vtkSmartPointer&lt;vtkRenderWindowInteractor&gt;::New();<br>

  iren-&gt;SetRenderWindow(renWin); <br><br>  vtkSmartPointer&lt;vtkInteractorStyleTrackballCamera&gt; Style =<br>    vtkSmartPointer&lt;vtkInteractorStyleTrackballCamera&gt;::New();<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( Actor );<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( .2, .3, .4 );<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;SetInteractorStyle( Style ); <br>  iren-&gt;Initialize();<br>  iren-&gt;Start();<br><br><br><br>  return EXIT_SUCCESS;<br>}<br><br>There are a few parameters that I can adjust that would have a large impact on the surface I am trying to extract that may be the reason why I am not seeing a volume. SOme of the parapmeters Ithink would be a problem would be the many properites of bmp and the Normals-&gt;SetAngle() property. If you have had similar experience to this or just have an idea of why I can not view anything in the render window, please let me know your thoughts. <br>
<br>Thanks,<br>Luke H<br>