<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> </P>
<P>By the way, when I use vtk 4.4.2 , it has works.</P>
<P> </P>
<P>this is the source.</P>
<P> </P>
<P> </P>
<P>int main()<BR>{</P>
<P> </P>
<P> </P>
<P> </P>
<P> vtkStructuredPointsReader *pvtkStructuredPointsReader=vtkStructuredPointsReader::New() ;<BR> pvtkStructuredPointsReader->SetFileName("C:/vtk/vtkdata/vtkdata-5.0.3/Data/ironProt.vtk");</P>
<P> vtkPiecewiseFunction *opacityTransferFunction= vtkPiecewiseFunction::New();<BR> vtkColorTransferFunction *colorTransferFunction=vtkColorTransferFunction::New();<BR> vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New();<BR> vtkVolumeRayCastCompositeFunction *compositeFunction = vtkVolumeRayCastCompositeFunction::New();<BR> vtkVolumeRayCastMapper *volumeMapper = vtkVolumeRayCastMapper::New();<BR> vtkVolume *volume = vtkVolume::New();</P>
<P> </P>
<P><BR> opacityTransferFunction->AddPoint(40,0.0);<BR> opacityTransferFunction->AddPoint(255,0.2);</P>
<P> colorTransferFunction->AddRGBPoint( 0.0,0.0,0.0,0.0);<BR> colorTransferFunction->AddRGBPoint( 64.0,1.0,0.0,0.0);<BR> colorTransferFunction->AddRGBPoint(128.0,0.0,0.0,1.0);<BR> colorTransferFunction->AddRGBPoint(192.0,0.0,1.0,0.0);<BR> colorTransferFunction->AddRGBPoint(255.0,0.0,0.2,0.0);</P>
<P> volumeProperty->SetColor(colorTransferFunction);<BR> volumeProperty->SetScalarOpacity(opacityTransferFunction);<BR> volumeProperty->ShadeOn();<BR> volumeProperty->SetInterpolationTypeToLinear();</P>
<P> compositeFunction->SetCompositeMethodToInterpolateFirst();<BR> <BR> volumeMapper -> SetVolumeRayCastFunction(compositeFunction);<BR> volumeMapper -> SetInput((vtkImageData*)pvtkStructuredPointsReader->GetOutput());<BR> <BR> <BR> <BR> volume->SetMapper(volumeMapper);<BR> volume->SetProperty(volumeProperty);</P>
<P> </P>
<P> </P>
<P> vtkRenderer *ren1 = vtkRenderer::New();<BR> vtkRenderWindow *renWin = vtkRenderWindow::New();<BR> renWin -> AddRenderer( ren1 );<BR> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<BR> iren-> SetRenderWindow (renWin);</P>
<P> ren1-> SetBackground (1, 1, 1);<BR> ren1 ->AddVolume(volume);<BR> ren1-> ResetCamera();<BR> ren1-> GetActiveCamera()-> Zoom( 1.5);<BR> iren-> Initialize();<BR> iren->Start();</P>
<P> return 0;<BR>}</P>
<P> </P>
<P>but when I used latest version vtk 5.03, it got the error.</P>
<P> </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> </P>
<P>what's the problem with this??</P>
<P> </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> </P>
<P> </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>