<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-9" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear Friends,</FONT></DIV>
<DIV><FONT face=Arial size=2>I have a little problem (I think).But unfortunetely 
I can't solve it.</FONT></DIV>
<DIV><FONT face=Arial size=2>My problem is like this:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I rendered a volume with 
vtkRayCastingMapper.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have visualized it on the 
renderwindow.</FONT></DIV>
<DIV><FONT face=Arial size=2>But when I make&nbsp;some changes on 
vtkRayCastMapper, I want my program to render the new changes by 
itself.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have added update() methods for all related 
filters and objects , but ý can not render it. I think I couldn't understand 
backward lazy execution of the pipeline.</FONT></DIV>
<DIV><FONT face=Arial size=2>My code is as follows:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkVolumeProperty 
*volProperty=vtkVolumeProperty::New();<BR>vtkPieceWiseFunction 
*opacityTFunc=vtkPiecewiseFunction::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opacityTFunc-&gt;AddPoint(0,0.0);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;opacityTFunc-&gt;AddPoint(255,0.5);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>vtkColorTransferFunction 
*colorTFunc=vtkColorTransferFunction::New();<BR>&nbsp;&nbsp;&nbsp;colorTFunc-&gt;AddRGBPoint(0,0.1,0.1,0.2);<BR>&nbsp;&nbsp;&nbsp;colorTFunc-&gt;AddRGBPoint(64,1,0.0,0.0);<BR>&nbsp;&nbsp;&nbsp;volProperty-&gt;SetColor(colorTFunc);<BR>&nbsp;&nbsp;&nbsp;volProperty-&gt;SetScalarOpacity(opacityTFunc);<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>vtkVolumeRayCastCompositeFunction 
*compositeFunction=vtkVolumeRayCastCompositeFunction::New();<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>vtkVolumeRayCastMapper 
*volumeMapper=vtkVolumeRayCastMapper::New();<BR>&nbsp;&nbsp;&nbsp; 
volumeMapper-&gt;SetVolumeRayCastFunction(compositeFunction);<BR>&nbsp;&nbsp;&nbsp; 
volumeMapper-&gt;SetInput(VTK_Form-&gt;tiffReader-&gt;GetOutput());<BR><BR>vtkVolume 
*volume=vtkVolume::New();<BR>&nbsp;&nbsp;&nbsp; 
volume-&gt;SetMapper(volumeMapper);<BR>&nbsp;&nbsp;&nbsp; 
volume-&gt;SetProperty(volProperty);<BR>&nbsp;&nbsp;&nbsp; 
vtkRenderWindow1-&gt;GetRenderer()-&gt;AddProp(volume);<BR></FONT><FONT 
face=Arial 
size=2>&nbsp;vtkRenderWindow1-&gt;GetRenderer()-&gt;ResetCamera();<BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>NOW EVERYTHING IS OK. When I click a button. I want 
to change Raycast compositefunction like this:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkVolumeRayCastMIPFunction 
*MIPFunction=vtkVolumeRayCastMIPFunction::New();</FONT></DIV>
<DIV><FONT face=Arial 
size=2>volumeMapper-&gt;SetVolumeRayCastFunction(MIPFunction);</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>vtkRenderWindow1-&gt;GetRenderer()-&gt;Render();//here it does not update 
the view.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>but when I use mouse in renderwindow, it updates 
and true image appears on the window. But I want to display the updated volume 
by itself. HOW CAN I DO THIS.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thank you very much.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Sedat DOGAN</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;</DIV></FONT>
<DIV>&nbsp;</DIV></BODY></HTML>