<DIV>I have written one program about volume rending .When compiled,there are no bugs.But when executed,there exits one window named <FONT size=2>vtkOutputWindow&nbsp; displaying the message"
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>ERROR: In F:\vtk1\VTK5.0\vtk-5.0.0\VolumeRendering\vtkVolumeRayCastMapper.cxx, line 318</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>vtkVolumeRayCastMapper (0x0279E840): Cannot volume render data of type short, only unsigned char or unsigned short."</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>And the final imagine can not be get.</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>The CT imagine files are <FONT size=2>DICOM <FONT size=3>format.The path</FONT> is</FONT><FONT size=3>"e:/test/dcmdir"</FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3>the primary programs are as follows:</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><FONT face="Times New Roman" size=3></FONT></SPAN>&nbsp;</P></FONT></DIV>
<DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ren = vtkRenderer::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;renWin = vtkWin32OpenGLRenderWindow::New();<BR>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iren = vtkWin32RenderWindowInteractor::New();<BR>&nbsp;    renWin-&gt;AddRenderer(this-&gt;ren);</FONT></DIV><FONT size=2>
<DIV><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // setup the parent window<BR>&nbsp;    renWin-&gt;SetParentId(this-&gt;GetDlgItem(IDC_RENDER)-&gt;m_hWnd); <BR>&nbsp;    iren-&gt;SetRenderWindow(renWin);<BR>   vtkDICOMImageReader *m_DicomReader = vtkDICOMImageReader::New();<BR>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; m_DicomReader-&gt;SetDirectoryName ("e:/test/dcmdir");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_DicomReader-&gt;Update();<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;vtkVolumeRayCastCompositeFunction *ComositeFun =   vtkVolumeRayCastCompositeFunction::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;vtkVolumeRayCastMapper *VolMapper = vtkVolumeRayCastMapper::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;VolMapper-&gt;SetInputConnection(m_DicomReader-&gt;GetOutputPort());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;VolMapper-&gt;SetVolumeRayCastFunction(ComositeFun); &nbsp; &nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;vtkVolume *Volume = vtkVolume::New();<BR>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Volume-&gt;SetMapper(VolMapper);<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;vtkColorTransferFunction *gTFun = vtkColorTransferFunction::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;gTFun-&gt;AddRGBSegment(128.0,126/255.0,16/255.0,16/255.0, &nbsp; &nbsp;255.0,64/255.0,255/255.0,16/255.0);&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vtkVolumeProperty *VolProperty = vtkVolumeProperty::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;VolProperty-&gt;SetColor(gTFun);<BR>&nbsp; &nbsp;<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;vtkPiecewiseFunction *oTFun = vtkPiecewiseFunction::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;oTFun-&gt;AddSegment(48,0.0,255,1.0);</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VolProperty-&gt;SetScalarOpacity(oTFun);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;VolProperty-&gt;SetInterpolationTypeToLinear();<BR>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; VolProperty-&gt;ShadeOn();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;Volume-&gt;SetProperty(VolProperty);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;ren-&gt;AddVolume(Volume);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;ren-&gt;SetBackground(1,1,1);<BR><BR>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; CRect rect;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;this-&gt;GetDlgItem(IDC_RENDER)-&gt;GetClientRect(&amp;rect);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;iren-&gt;Initialize();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;renWin-&gt;SetSize(rect.right-rect.left,rect.bottom-rect.top);<BR>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; ren-&gt;ResetCameraClippingRange();<BR>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; ren-&gt;ResetCamera();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;ren-&gt;GetActiveCamera()-&gt;Zoom(1);<BR>&nbsp;   iren-&gt;Start(); <BR>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; AfxMessageBox("init ok");</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>please help me find the error,and tell me how to solve the problem in detail.Thanks a lot!</FONT><BR></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV><br><!-- footer --><br><br><div style="border-bottom:1px solid #999"></div><br>

        <font color="black" style="font-size:14.8px"> 年 末 数 码 1 0 0 元 专 场 ( 图 ) </font>
        <br>
         <a href="http://adtaobao.allyes.com/main/adfclick?db=adtaobao&bid=600,597,58&cid=30015,198,1&sid=32501&show=ignore&url=http://www.taobao.com/theme/promotion/main.php/71154" target="_blank" style="font-size:13px;line-height:160%;color:blue"> 百 种 数 码 精 品 1 9 元 起 1 0 0 元 封 顶 , 不 抢 真 的 悔 死 你 ( 图 ) </a>