<DIV>&nbsp;</DIV>
<DIV>
<DIV>Hi,</DIV>
<DIV>I'am appreciate that you can help me to solve my problems:</DIV>
<DIV>1,When I compiled the follow code,there were 2 errors and 1 warning like this:</DIV>
<DIV>Linking...<BR>LINK : warning LNK4001: no object files specified; libraries used<BR>LINK : error LNK2001: unresolved external symbol _mainCRTStartup<BR>Debug/image1.exe : fatal error LNK1120: 1 unresolved externals<BR>Error executing link.exe.</DIV>
<DIV>2,I had added the lib files to vc workplace:vtkzlib.lib,CommonCxxTests.lib,vtkCommon.lib,vtkDICOMParser.lib,and so on.</DIV>
<DIV>3,What's the problem did I have?</DIV>
<DIV>Here is my code:</DIV>
<DIV>#include "vtkBMPReader.h"<BR>#include "vtkContourFilter.h"<BR>#include "vtkPolyDataMapper.h"<BR>#include "vtkActor.h"<BR>#include "vtkProperty.h"<BR>#include "vtkRenderer.h"<BR>#include "vtkRenderWindow.h"<BR>#include "vtkRenderWindowInteractor.h"<BR>#include "vtkActor2D.h"<BR>void main()<BR>{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //create an instance of the class vtkBMPReader<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkBMPReader *image = vtkBMPReader::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;SetFilePrefix("D://image//head"); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;SetFilePattern("%s%d.bmp"); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;SetFileNameSliceOffset(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;SetFileNameSliceSpacing(1);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;SetNumberOfScalarComponents(3);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;SetDataSpacing(0.4,0.4,10);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;SetDataOrigin(0,0,0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;SetDataExtent(0,255,0,255,1,10); <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;Update();</DIV>
<DIV><BR>&nbsp;&nbsp; vtkContourFilter *contour=vtkContourFilter::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; contour-&gt;SetInput((vtkDataSet *)image-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp;&nbsp; contour-&gt;SetValue(0,800);</DIV>
<DIV>&nbsp;&nbsp;&nbsp; vtkPolyDataMapper *mapper=vtkPolyDataMapper::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mapper-&gt;SetInput(contour-&gt;GetOutput());&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp; vtkActor *actor=vtkActor::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; actor-&gt;SetMapper(mapper);<BR>&nbsp;&nbsp;&nbsp;&nbsp; actor-&gt;GetProperty()-&gt;SetColor(0,0, .9412);</DIV>
<DIV><BR>&nbsp; <BR>&nbsp; vtkRenderer *render=vtkRenderer::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; render-&gt;AddActor(actor);</DIV>
<DIV>&nbsp; vtkRenderWindow *renwin=vtkRenderWindow::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; renwin-&gt;AddRenderer(render);</DIV>
<DIV>&nbsp; vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New();<BR>&nbsp;&nbsp;iren-&gt;SetRenderWindow(renwin);<BR>&nbsp;&nbsp;&nbsp;&nbsp; renwin-&gt;Render();<BR>&nbsp;&nbsp;&nbsp;&nbsp; iren-&gt;Start();<BR>&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;CDialog::OnOK();<BR>}</DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV><SPAN ></SPAN><br><!-- footer --><br><br><br><br><br><div style="border-bottom:1px solid #999"></div><br>

        <font color="black" style="font-size:14.8px">3G 时 代 来 临 了,坚 决 对 传 统 邮 箱 说 不 !</font>
        <br>
         <a href="http://www.126.com/" target="_blank" style="font-size:13px;line-height:160%;color:blue">新 一 代 极 速 3G 邮 箱 闪 亮 登 场 ,280 兆 网 盘 免 费 送 ! 点 击 此 处 注 册
</a>