<!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.2096" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Dear Ravi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>It indeed is clear..</FONT></DIV>
<DIV><FONT face=Arial size=2>I am attaching the .cpp file for you to use.. There 
is a tcl example too&nbsp;with same name where you can access individual alice 
using a slider.</FONT></DIV>
<DIV><FONT face=Arial size=2>follow a comment in it for providing the 
data.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>revert back in case of problems. You might have to 
comment a line or two here and there ..just a tweak not something of 
importance.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>warm regards,</FONT></DIV>
<DIV><FONT face=Arial size=2>Divya Rathore</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=raviksamala@yahoo.com href="mailto:raviksamala@yahoo.com">Ravi 
  Samala</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@vtk.org 
  href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, October 05, 2005 6:06 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [vtkusers] Re: how to access 
  3D volume</DIV>
  <DIV><BR></DIV>
  <DIV>hi Rathore,</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>may be my question is not that clear, after loading the 3D volume from 2D 
  slices using vtkVolume16Reader, I want to access individual slices to perform 
  filtering operation (on a slice-by-slice basis).</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>(Put it in other way, I need to extract a single slice from the 3Dvolume 
  image (from the v16Img object)&nbsp;, -- how can I do that?)</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>thank you,</DIV>
  <DIV>Ravi.<BR><BR><BR><B><I>Divya Rathore &lt;divyaksr@iitk.ac.in&gt;</I></B> 
  wrote:</DIV>
  <BLOCKQUOTE class=replbq 
  style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
    <META content="MSHTML 6.00.2900.2096" name=GENERATOR>
    <DIV><FONT face=Arial size=2>
    <DIV><FONT face=Arial size=2>Search in the examples directory if you are 
    using the source code of VTK.</FONT></DIV>
    <DIV><FONT face=Arial size=2>If you are using the binary (installable) 
    version then also it is a matter of a simple file searching.</FONT></DIV>
    <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2>Windows/Linux?</FONT></DIV></FONT></DIV>
    <BLOCKQUOTE 
    style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
      <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
      <DIV 
      style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
      <A title=raviksamala@yahoo.com href="mailto:raviksamala@yahoo.com">Ravi 
      Samala</A> </DIV>
      <DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@vtk.org 
      href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A> </DIV>
      <DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, October 04, 2005 10:00 
      PM</DIV>
      <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [vtkusers] Re: how to 
      access 3D volume</DIV>
      <DIV><BR></DIV>
      <DIV>hi Rathore,</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>I am kind of new to VTK, can you tell me where can I find 
      ImagePlaneWidget.cpp file.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>thank you,</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>Ravi<BR><BR><B><I>Divya Rathore &lt;<A 
      href="mailto:divyaksr@iitk.ac.in">divyaksr@iitk.ac.in</A>&gt;</I></B> 
      wrote:</DIV>
      <BLOCKQUOTE class=replbq 
      style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
        <META content="MSHTML 6.00.2900.2096" name=GENERATOR>
        <STYLE></STYLE>

        <DIV><FONT face=Arial size=2>Check out ImagePlaneWidget.cpp (I would 
        like to thank Dr. Nagarajan,&nbsp;<A 
        href="mailto:raman_nagarajan@vsnl.net">raman_nagarajan@vsnl.net</A>, a 
        member of this list).</FONT></DIV>
        <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
        <DIV><FONT face=Arial size=2>regards,</FONT></DIV>
        <DIV><FONT face=Arial size=2>D. Rathore</FONT></DIV>
        <BLOCKQUOTE 
        style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
          <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
          <DIV 
          style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
          <A title=raviksamala@yahoo.com 
          href="mailto:raviksamala@yahoo.com">Ravi Samala</A> </DIV>
          <DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@vtk.org 
          href="mailto:vtkusers@vtk.org">vtkusers@vtk.org</A> </DIV>
          <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, October 03, 2005 
          7:02 PM</DIV>
          <DIV style="FONT: 10pt arial"><B>Subject:</B> [vtkusers] how to access 
          3D volume</DIV>
          <DIV><BR></DIV>
          <DIV>hi vtkusers,</DIV>
          <DIV>&nbsp;</DIV>
          <DIV>&nbsp;I am reading 2D slices and constructing a 3D volume, using 
          the following code....</DIV>
          <DIV>&nbsp;</DIV>
          <DIV><FONT size=2>
          <P>vtkVolume16Reader *v16Img = vtkVolume16Reader::New();</P>
          <P>v16Img-&gt;SetDataDimensions (sizex,sizey);</P>
          <P>v16Img-&gt;SetImageRange (atoi(argv[3]),atoi(argv[4])); 
          </P></FONT><FONT size=2>
          <P>v16Img-&gt;SetHeaderSize(HeadS);</P>
          <P>v16Img-&gt;SetFilePrefix (argv[2]); </P>
          <P>v16Img-&gt;SetDataSpacing (0.1, 0.1, 0.5);</P>
          <P>v16Img-&gt;SetDataOrigin(0, 0, 0);</P>
          <P>cout&lt;&lt;"Image Volume Read...."&lt;&lt;endl;</P></FONT><FONT 
          color=#008000 size=2>
          <P>&nbsp;</P></FONT><FONT size=2>
          <P></P>
          <P></FONT><FONT color=#008000 size=2>//CompositeFunction with 
          option</P></FONT><FONT size=2>
          <P>vtkVolumeRayCastCompositeFunction *compositeFunction = 
          vtkVolumeRayCastCompositeFunction::New();</P>
          <P>compositeFunction-&gt;SetCompositeMethodToInterpolateFirst(); </P>
          <P></FONT><FONT color=#008000 size=2></FONT>&nbsp;</P>
          <P><FONT color=#008000 size=2>//Mapper with selected 
          RayCastFunction</P></FONT><FONT size=2>
          <P>vtkVolumeRayCastMapper *volumeMapper = 
          vtkVolumeRayCastMapper::New();</P>
          <P>volumeMapper-&gt;SetInput(v16Img -&gt; GetOutput());</P>
          <P>volumeMapper-&gt;SetVolumeRayCastFunction(compositeFunction);</P></FONT><FONT 
          color=#008000 size=2>
          <P>&nbsp;</P>
          <P>// Create transfer mapping scalar value to opacity</P></FONT><FONT 
          size=2>
          <P>vtkPiecewiseFunction *pieceFunc = vtkPiecewiseFunction::New();</P>
          <P>pieceFunc-&gt;AddPoint(0, 0.0); </FONT><FONT color=#008000 
          size=2>// alpha value for the lower intensity limit</P></FONT><FONT 
          size=2>
          <P>pieceFunc-&gt;AddPoint(15000, 0.5); </FONT><FONT color=#008000 
          size=2>// alpha value for the upper intensity limit</P></FONT><FONT 
          color=#008000 size=2>
          <P>&nbsp;</P>
          <P>//Set Volume Property</P></FONT><FONT size=2>
          <P>vtkVolumeProperty *volumeProperty = vtkVolumeProperty::New();</P>
          <P>volumeProperty-&gt;SetInterpolationTypeToLinear();</P></FONT><FONT 
          size=2>
          <P>volumeProperty-&gt;SetScalarOpacity(pieceFunc);</P>
          <P>volumeProperty-&gt;ShadeOn();</P></FONT><FONT color=#008000 size=2>
          <P>&nbsp;</P>
          <P>//The special actor with properties</P></FONT><FONT size=2>
          <P>vtkVolume *vol = vtkVolume::New();</P>
          <P>vol-&gt;SetMapper(volumeMapper);</P>
          <P>vol-&gt;SetProperty(volumeProperty);</P></FONT><FONT color=#008000 
          size=2>
          <P>&nbsp;</P>
          <P>// An outline provides context around the data.</P></FONT><FONT 
          size=2>
          <P>vtkOutlineFilter *outlineData = vtkOutlineFilter::New();</P>
          <P>outlineData-&gt;SetInput((vtkDataSet *) 
v16Img-&gt;GetOutput());</P>
          <P>vtkPolyDataMapper *mapOutline = vtkPolyDataMapper::New();</P>
          <P>mapOutline-&gt;SetInput(outlineData-&gt;GetOutput());</P>
          <P>vtkActor *outline = vtkActor::New();</P>
          <P>outline-&gt;SetMapper(mapOutline);</P>
          <P>outline-&gt;GetProperty()-&gt;SetColor(0,0,0); </P>
          <P></P></FONT><FONT color=#008000 size=2>
          <P>&nbsp;</P>
          <P>//Starting to Render</P></FONT><FONT size=2>
          <P>vtkRenderer *renderer=vtkRenderer::New();</P></FONT><FONT size=2>
          <P>renderer-&gt;AddVolume(vol); </P>
          <P>renderer-&gt;SetBackground(1,1,1);</P></FONT><FONT color=#008000 
          size=2>
          <P></FONT><FONT color=#008000 size=2>&nbsp;</P></FONT><FONT size=2>
          <P>vtkRenderWindow *renWin=vtkRenderWindow::New();</P>
          <P>renWin-&gt;SetSize(500,500);</P>
          <P>renWin-&gt;DoubleBufferOn(); </P>
          <P>renWin-&gt;AddRenderer(renderer);</P>
          <P></P>
          <P>vtkRenderWindowInteractor 
          *iren=vtkRenderWindowInteractor::New();</P>
          <P>iren-&gt;SetRenderWindow(renWin);</P>
          <P>iren-&gt;Initialize(); </P>
          <P>iren-&gt;Start();</P>
          <P>&nbsp;</P>
          <P>my question is : is there any way I can access individual slices 
          and a point in the 3 dimensional space (like p(x,y,z).</P>
          <P>&nbsp;</P>
          <P>thanks in advance,</P>
          <P>&nbsp;</P>
          <P>Ravi.</P></FONT></DIV>
          <P>
          <HR SIZE=1>
          Yahoo! for Good<BR><A 
          href="http://store.yahoo.com/redcross-donate3/">Click here to 
          donate</A> to the Hurricane Katrina relief effort. 
          <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></BLOCKQUOTE>_______________________________________________<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></BLOCKQUOTE>
      <P>
      <HR SIZE=1>
      Yahoo! for Good<BR><A 
      href="http://store.yahoo.com/redcross-donate3/">Click here to donate</A> 
      to the Hurricane Katrina relief effort. 
      <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></BLOCKQUOTE>_______________________________________________<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></BLOCKQUOTE>
  <P>
  <HR SIZE=1>
  Yahoo! for Good<BR><A href="http://store.yahoo.com/redcross-donate3/">Click 
  here to donate</A> to the Hurricane Katrina relief effort. 
  <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></BLOCKQUOTE></BODY></HTML>