<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2>hi<SPAN
class=935004104-03112004> ,</SPAN><BR> I need to develop a viewer
which displays slices from the 3D volume data. I would like to render the
slices(2D Image) on the main plane, so that I could draw line annotations over
the displayed slices, i.e., on the overlay plane. As of now, I am able to
extract the slices from the volume, but I am unable to display it on the main
plane. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>The code I have written to display the
slices. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> vtkImageReader2 *vtkImgRdr =
vtkImageReader2::New();<BR>
vtkImgRdr->ReleaseDataFlagOn();<BR>
vtkImgRdr->SetDataByteOrderToBigEndian();<BR>
vtkImgRdr->SetDataExtent(0,255,0,255,1,113);<BR>
vtkImgRdr->SetDataScalarTypeToUnsignedShort();<BR>
<BR> vtkImgRdr->SetDataOrigin(-128.5, -128.5,
-57);<BR> <BR>
vtkImgRdr->SetFilePrefix("E:/GUI/sample_code/CTHead/CThead");<BR>
<BR> vtkImgRdr->Update();<BR>
<BR> vtkImageReslice
*axial=vtkImageReslice::New();<BR>
axial->SetInput(vtkImgRdr->GetOutput());<BR>
axial->SetOutputDimensionality(2);<BR>
axial->SetInterpolationModeToCubic();<BR>
axial->SetResliceAxesDirectionCosines(1, 0,
0,<BR> 0, 1,
0,<BR> 0, 0, 1);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> axial->Update();</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> // Following code displays slice
on the overlay plane.<BR> vtkImageMapper
*axial_mapper=vtkImageMapper::New();<BR>
axial_mapper->SetInput(axial->GetOutput());<BR>
axial_mapper->SetColorWindow(500);<BR>
axial_mapper->SetColorLevel(1000);<BR> vtkActor2D
*axial_actor = vtkActor2D::New();<BR>
axial_actor->SetMapper(axial_mapper);<BR> vtkRenderer
*renAxial= vtkRenderer :: New();<BR>
renAxial->AddActor(axial_actor);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> renWin->AddRenderer( renAxial
);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> renWin->SetSize( 500,
500);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> vtkRenderWindowInteractor
*renInt = vtkRenderWindowInteractor::New();<BR> <BR>
renInt->SetRenderWindow(renWin);<BR>
renWin->Render();</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>Can any one suggest, how do we modify the above code to display the
slice on the main plane, instead on an overlay plane, i.e., we need to replace
vtkActor2D, with appropriate Actor for displaying slice on main plane.</DIV>
<DIV> </DIV>
<DIV>Thanks & Regards<BR>Prashanth</FONT></DIV></BODY></HTML>
<table><tr><td bgcolor=#ffffff><font color=#000000><br>
Confidentiality Notice <br>
<br>
The information contained in this electronic message and any attachments to this message are intended<br>
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If<br>
you are not the intended recipient, please notify the sender at Wipro or Mailadmin@wipro.com immediately<br>
and destroy all copies of this message and any attachments.<br>
</font></td></tr></table>