<HTML>
<HEAD>
<STYLE>
BODY{FONT-FAMILY: Gulim;FONT-SIZE: 9pt;}
P {margin-top:2px;margin-bottom:2px;}
</STYLE>
</HEAD>

<BODY><P>Hi all,</P>
<P>I'm quite new using vtk and trying to realize volume rendering from book.</P>
<P>&nbsp;</P>
<P>By the way, when I use vtk 4.4.2 , it has works.</P>
<P>&nbsp;</P>
<P>this is the source.</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>int main()<BR>{</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;vtkStructuredPointsReader *pvtkStructuredPointsReader=vtkStructuredPointsReader::New() ;<BR>&nbsp;&nbsp; pvtkStructuredPointsReader-&gt;SetFileName("C:/vtk/vtkdata/vtkdata-5.0.3/Data/ironProt.vtk");</P>
<P>&nbsp;vtkPiecewiseFunction *opacityTransferFunction=&nbsp;vtkPiecewiseFunction::New();<BR>&nbsp;vtkColorTransferFunction *colorTransferFunction=vtkColorTransferFunction::New();<BR>&nbsp;vtkVolumeProperty&nbsp;&nbsp; *volumeProperty = &nbsp;vtkVolumeProperty::New();<BR>&nbsp;vtkVolumeRayCastCompositeFunction *compositeFunction = &nbsp;vtkVolumeRayCastCompositeFunction::New();<BR>&nbsp;vtkVolumeRayCastMapper *volumeMapper = &nbsp;vtkVolumeRayCastMapper::New();<BR>&nbsp;vtkVolume *volume = vtkVolume::New();</P>
<P>&nbsp;</P>
<P><BR>&nbsp;&nbsp;&nbsp; opacityTransferFunction-&gt;AddPoint(40,0.0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; opacityTransferFunction-&gt;AddPoint(255,0.2);</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; colorTransferFunction-&gt;AddRGBPoint(&nbsp; 0.0,0.0,0.0,0.0);<BR>&nbsp;&nbsp;&nbsp; colorTransferFunction-&gt;AddRGBPoint( 64.0,1.0,0.0,0.0);<BR>&nbsp;&nbsp;&nbsp; colorTransferFunction-&gt;AddRGBPoint(128.0,0.0,0.0,1.0);<BR>&nbsp;&nbsp;&nbsp; colorTransferFunction-&gt;AddRGBPoint(192.0,0.0,1.0,0.0);<BR>&nbsp;&nbsp;&nbsp; colorTransferFunction-&gt;AddRGBPoint(255.0,0.0,0.2,0.0);</P>
<P>&nbsp;&nbsp;&nbsp; volumeProperty-&gt;SetColor(colorTransferFunction);<BR>&nbsp;&nbsp;&nbsp; volumeProperty-&gt;SetScalarOpacity(opacityTransferFunction);<BR>&nbsp;&nbsp;&nbsp; volumeProperty-&gt;ShadeOn();<BR>&nbsp;&nbsp;&nbsp; volumeProperty-&gt;SetInterpolationTypeToLinear();</P>
<P>&nbsp;&nbsp;&nbsp; compositeFunction-&gt;SetCompositeMethodToInterpolateFirst();<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; volumeMapper -&gt; SetVolumeRayCastFunction(compositeFunction);<BR>&nbsp;&nbsp;&nbsp; volumeMapper -&gt; SetInput((vtkImageData*)pvtkStructuredPointsReader-&gt;GetOutput());<BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; <BR>&nbsp;&nbsp; volume-&gt;SetMapper(volumeMapper);<BR>&nbsp;&nbsp; volume-&gt;SetProperty(volumeProperty);</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>&nbsp;vtkRenderer *ren1 = vtkRenderer::New();<BR>&nbsp;vtkRenderWindow *renWin = vtkRenderWindow::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; renWin -&gt; AddRenderer( ren1 );<BR>&nbsp;vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iren-&gt; SetRenderWindow (renWin);</P>
<P>&nbsp;&nbsp;&nbsp; ren1-&gt; SetBackground (1, 1, 1);<BR>&nbsp;ren1 -&gt;AddVolume(volume);<BR>&nbsp;ren1-&gt; ResetCamera();<BR>&nbsp;ren1-&gt; GetActiveCamera()-&gt; Zoom( 1.5);<BR>&nbsp;iren-&gt; Initialize();<BR>&nbsp;iren-&gt;Start();</P>
<P>&nbsp;return 0;<BR>}</P>
<P>&nbsp;</P>
<P>but when I used latest version vtk 5.03, it got the error.</P>
<P>&nbsp;</P>
<P>lumeRendering.obj : error LNK2001: unresolved external symbol "public: static class vtkVolumeRayCastMapper * __cdecl vtkVolumeRayCastMapper::New(void)" (<A href="mailto:?New@vtkVolumeRayCastMapper@@SAPAV1@XZ">?New@vtkVolumeRayCastMapper@@SAPAV1@XZ</A>)<BR>VolumeRendering.obj : error LNK2001: unresolved external symbol "public: static class vtkVolumeRayCastCompositeFunction * __cdecl vtkVolumeRayCastCompositeFunction::New(void)" (<A href="mailto:?New@vtkVolumeRayCastCompositeFunction@@SAPAV1@XZ">?New@vtkVolumeRayCastCompositeFunction@@SAPAV1@XZ</A>)<BR>Debug/VolumeRendering.exe : fatal error LNK1120: 2 unresolved externals<BR>Error executing link.exe.</P>
<P>ALL_BUILD - 3 error(s), 0 warning(s)</P>
<P>&nbsp;</P>
<P>what's the problem with this??</P>
<P>&nbsp;</P>
<P>And when I used vtk 4.4.2, I couldn't find GUISupport.</P>
<P>I want to use MFC, but I couldn,t.</P>
<P>what's the problem??</P>
<P>Can you help me??</P>
<P>&nbsp;</P>
<P>&nbsp;</P>
<P>li<BR></P>
<img src="http://webmail.pusan.ac.kr/cgi-bin/setconfirm.cgi?k=118308687412572411332&u=madness78&d=pusan.ac.kr" width=1 height=1>
</BODY>
</HTML>