<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2995" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV style="FONT: 10pt arial">
<DIV>&nbsp;</DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT size=4>As I make matching between the coordinates 
vtkRenderWindow.GetEventPosition () and the coordinates of data into render? 
</FONT></DIV>
<DIV><FONT size=4>That is, which it is the index in the <FONT 
color=#008080>vtkDataArray</FONT> of the point that it has coordinated 
vtkRenderWindow.GetEventPosition () ?</FONT></DIV>
<DIV><FONT size=4>This is my code:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2><FONT size=2>
<P></FONT><FONT color=#008080 size=2>vtkRenderer</FONT><FONT size=2> aRenderer = 
</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> vtk.</FONT><FONT 
color=#008080 size=2>vtkRenderer</FONT><FONT size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkRenderWindowInteractor</FONT><FONT 
size=2> iren = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> 
vtk.</FONT><FONT color=#008080 size=2>vtkRenderWindowInteractor</FONT><FONT 
size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkVolume16Reader</FONT><FONT size=2> v16 = 
</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> vtk.</FONT><FONT 
color=#008080 size=2>vtkVolume16Reader</FONT><FONT size=2>();</P>
<P></P>
<P></FONT><FONT color=#008080 size=2>vtkTransform</FONT><FONT size=2> tr = 
</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT 
color=#008080 size=2>vtkTransform</FONT><FONT size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkImageGaussianSmooth</FONT><FONT size=2> 
gs = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT 
color=#008080 size=2>vtkImageGaussianSmooth</FONT><FONT size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkImageMagnify</FONT><FONT size=2> magnify 
= </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT 
color=#008080 size=2>vtkImageMagnify</FONT><FONT size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkPiecewiseFunction</FONT><FONT size=2> 
opacityTransferFunction = </FONT><FONT color=#0000ff size=2>new</FONT><FONT 
size=2> </FONT><FONT color=#008080 size=2>vtkPiecewiseFunction</FONT><FONT 
size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkColorTransferFunction</FONT><FONT 
size=2> colorTransferFunction = </FONT><FONT color=#0000ff 
size=2>new</FONT><FONT size=2> </FONT><FONT color=#008080 
size=2>vtkColorTransferFunction</FONT><FONT size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkVolumeProperty</FONT><FONT size=2> 
volumeProperty = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> 
</FONT><FONT color=#008080 size=2>vtkVolumeProperty</FONT><FONT size=2>();</P>
<P></FONT><FONT color=#008080 
size=2>vtkVolumeRayCastCompositeFunction</FONT><FONT size=2> compositeFunction = 
</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT 
color=#008080 size=2>vtkVolumeRayCastCompositeFunction</FONT><FONT 
size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkVolumeRayCastMapper</FONT><FONT size=2> 
myMapper = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> 
</FONT><FONT color=#008080 size=2>vtkVolumeRayCastMapper</FONT><FONT 
size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkVolume</FONT><FONT size=2> volume = 
</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT 
color=#008080 size=2>vtkVolume</FONT><FONT size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkDataArray</FONT><FONT size=2> da;</P>
<P></FONT><FONT color=#008080 size=2>vtkCamera</FONT><FONT size=2> camera = 
</FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT 
color=#008080 size=2>vtkCamera</FONT><FONT size=2>();</P>
<P></FONT><FONT color=#008080 size=2>vtkInteractorStyleUser</FONT><FONT size=2> 
stileIren = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> 
</FONT><FONT color=#008080 size=2>vtkInteractorStyleUser</FONT><FONT 
size=2>();</FONT></P>
<P><FONT face=Arial size=2></FONT>&nbsp;</P><FONT size=2><FONT size=2>
<P>renWin.AddRenderer(aRenderer);</P>
<P></P>
<P>iren.SetRenderWindow(renWin);</P>
<P></P>
<P></P>
<P></P></FONT><FONT size=2>
<P>v16.SetDataDimensions(256, 256);</P>
<P>v16.SetDataByteOrderToBigEndian();</P>
<P>v16.SetFilePrefix(</FONT><FONT color=#800000 size=2>"C:/Documents and 
Settings/Andrea/Desktop/vtkWindowsApplication/CThead/CThead"</FONT><FONT 
size=2>);</P>
<P>v16.SetImageRange(1, 113);</P>
<P>v16.SetDataSpacing(1, 1,2);</P></FONT><FONT size=2>
<P>di = v16.GetOutput(); </P>
<P>tr.RotateY(180);</P>
<P>tr.RotateX(90);</P>
<P></P>
<P></P>
<P></P>
<P></FONT>
<P><FONT color=#008000 size=2></P></FONT><FONT 
size=2>gs.SetInput(v16.GetOutput());
<P></P>
<P>gs.SetDimensionality (2);</P>
<P>gs.SetRadiusFactors (1 ,1, 0);</P>
<P></FONT>
<P><FONT color=#008000 size=2></P></FONT><FONT size=2>magnify.SetInput 
(gs.GetOutput ());
<P></P>
<P>magnify.SetMagnificationFactors (3,3,3);</P>
<P></P></FONT><FONT size=2>
<P></P>
<P>di.Update();</P></FONT><FONT size=2>
<P>da = di.GetPointData ().GetScalars ();</P><FONT size=2>
<P>tr.RotateZ(180);</P>
<P></P>
<P></P>
<P>di.Update ();</P></FONT>
<P><FONT size=2>volumeProperty.SetInterpolationTypeToLinear ();</P>
<P></P>
<P></FONT><FONT size=2>myMapper.SetInput(di); </P>
<P>myMapper.SetVolumeRayCastFunction (compositeFunction);</P>
<P></P>
<P></P>
<P></P>
<P>volume.SetMapper (myMapper);</P>
<P>volume.SetProperty (volumeProperty); </P>
<P>volume.SetUserMatrix (tr.GetMatrix());</P>
<P></P>
<P></P>
<P>aRenderer.AddVolume (volume);</P>
<P></P>
<P></P>
<P></P></FONT><FONT size=2>
<P></P>
<P></P></FONT><FONT face=Arial size=2>
<P></P></FONT></FONT></FONT></FONT></DIV>
<P>
<HR>

<P></P>_______________________________________________<BR>This is the private 
VTK discussion list. <BR>Please keep messages on-topic. Check the FAQ at: 
http://www.vtk.org/Wiki/VTK_FAQ<BR>Follow this link to 
subscribe/unsubscribe:<BR>http://www.vtk.org/mailman/listinfo/vtkusers<BR></BODY></HTML>