<html>

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=Generator content="Microsoft Word 10 (filtered)">

<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Sorry about the reply, I was hitting the
reply to and not reply to all.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>I am trying to create a 3D volume (a 5x5x5
cube).</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>The data files (5 files &#8211; one for each
slice) consists of zero&#8217;s and one&#8217;s where the one&#8217;s indicate
there is an object in that particular cell of the cube, zero&#8217;s indicate
the cell is empty.&nbsp; I want to render the cube/object using the marching
cubes algorithm.</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Vetria</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> </span></font><font size=2
 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>Amy Henderson</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
[mailto:amy.henderson@kitware.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, April 05, 2004 1:42
PM<br>
<b><span style='font-weight:bold'>To:</span></b> </span></font><font size=2
 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>byrdv@cis.uab.edu</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>; '</span></font><font
 size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>Amy
 Henderson</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>'<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [</span></font><font
 size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>vtkusers</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>]
vtkVolumeReader</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>&nbsp;</span></font></p>

<p class=MsoNormal style='margin-left:.5in'><font size=3 face="Times New Roman"><span
style='font-size:12.0pt'>Vetria,<br>
<br>
I just noticed the you replied only to me and not the the </span></font>vtkusers
list. Please keep the discussion on the list so other people can help if
necessary and so there is a record of the solution to this problem if other
people encounter the same thing.<br>
<br>
What kind of data are you trying to load? Depending on the type of your data,
you might want to try loading it using one of the subclasses of
vtkImageReader2. These readers can handle 3D data by reading in a series of 2D
slices.<br>
<br>
- Amy<br>
<br>
At 02:32 PM 4/5/2004, Vetria Byrd wrote:<br>
<br>
</p>

<p class=MsoNormal style='margin-left:.5in'><font size=2 color=navy face=Arial><span
style='font-size:10.0pt;font-family:Arial;color:navy'>When I try creating an
instance of vtkVolume16Reader the code complies with no errors but when I try
to run it I get:<br>
&nbsp;<br>
ERROR: In C:\Program Files\vtk42\IO\vtkVolume16Reader.cxx, line 375<br>
vtkVolume16Reader (0x022B5400): Error reaading raw pgm data!<br>
&nbsp;<br>
So, I thought I would try vtkVolumeReader.<br>
&nbsp;<br>
Vetria<br>
&nbsp;<br>
</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> </span></font><font size=2
 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>Amy Henderson</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> [<a
href="mailto:amy.henderson@kitware.com" eudora=autourl>mailto:amy.henderson@kitware.com</a>]
<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, April 05, 2004 12:14
PM<br>
<b><span style='font-weight:bold'>To:</span></b> </span></font><font size=2
 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>byrdv@cis.uab.edu</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>; '</span></font><font
 size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>Amy
 Henderson</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>'<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: [</span></font><font
 size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>vtkusers</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>]
vtkVolumeReader<br>
</span></font>&nbsp;<br>
Did you intend to create an instance of vtkVolume16Reader? vtkVolumeReader has
a pure virtual method, so you can't instantiate it; you have to create an
instance of one of its concrete subclasses (e.g., vtkVolume16Reader, which I
see in your list of include files).<br>
<br>
- Amy<br>
<br>
At 01:08 PM 4/5/2004, Vetria Byrd wrote:<br>
<br>
<font size=2 color=navy face=Arial><span style='font-size:10.0pt;font-family:
Arial;color:navy'>Yes.<br>
&nbsp;<br>
Here&#8217;s the entire file:<br>
&nbsp;<br>
//<br>
// This example reads a volume dataset, extracts an isosurface and displays it.<br>
//<br>
&nbsp;<br>
#include &quot;vtkRenderer.h&quot;<br>
#include &quot;vtkRenderWindow.h&quot;<br>
#include &quot;vtkRenderWindowInteractor.h&quot;<br>
#include &quot;vtkVolume16Reader.h&quot;<br>
#include &quot;vtkVolumeReader.h&quot;<br>
#include &quot;vtkObject.h&quot;<br>
#include &quot;vtkMarchingCubes.h&quot;<br>
#include &quot;vtkPolyDataMapper.h&quot;<br>
#include &quot;vtkActor.h&quot;<br>
#include &quot;vtkOutlineFilter.h&quot;<br>
#include &quot;vtkCamera.h&quot;<br>
#include &quot;vtkProperty.h&quot;<br>
#include &quot;vtkPolyDataNormals.h&quot;<br>
#include &quot;vtkContourFilter.h&quot;<br>
&nbsp;<br>
int main (int argc, char **argv)<br>
{<br>
&nbsp; if (argc &lt; 2)<br>
&nbsp;&nbsp;&nbsp; {<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cout &lt;&lt; &quot;Usage: &quot; &lt;&lt;
argv[0] &lt;&lt; &quot; DATADIR/cube/slice&quot; &lt;&lt; endl;<br>
&nbsp;&nbsp;&nbsp; return 1;<br>
&nbsp;&nbsp;&nbsp; }<br>
&nbsp;<br>
&nbsp;<br>
&nbsp; vtkRenderer *ren = vtkRenderer::New();<br>
&nbsp; vtkRenderWindow *renWin = vtkRenderWindow::New();<br>
&nbsp;&nbsp;&nbsp; renWin-&gt;AddRenderer(ren);<br>
&nbsp; vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>
&nbsp;&nbsp;&nbsp; iren-&gt;SetRenderWindow(renWin);<br>
&nbsp; <br>
&nbsp;*vtkVolumeReader *volReader = vtkVolumeReader::New();<br>
&nbsp;&nbsp;&nbsp; volReader-&gt;SetImageRange (1,5);<br>
&nbsp;&nbsp;&nbsp; volReader-&gt;SetFilePrefix (argv[1]);<br>
&nbsp;&nbsp;&nbsp; volReader-&gt;SetDataSpacing (1,1,1);<br>
&nbsp;&nbsp;&nbsp; volReader-&gt;Update();<br>
&nbsp;<br>
&nbsp; // An isosurface, or contour value of 1 is known to correspond to the
object. <br>
&nbsp; vtkMarchingCubes *iso =vtkMarchingCubes::New();<br>
&nbsp;&nbsp;&nbsp;&nbsp; iso-&gt;SetInput(volReader-&gt;GetOutput() );<br>
&nbsp;&nbsp;&nbsp;&nbsp; iso-&gt;SetValue(0,1);&nbsp; <br>
&nbsp;<br>
&nbsp; vtkPolyDataMapper *isoMapper = vtkPolyDataMapper::New();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isoMapper-&gt;SetInput(iso-&gt;GetOutput() );<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isoMapper-&gt;ScalarVisibilityOff();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp; vtkActor *isoActor = vtkActor::New();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; isoActor-&gt;SetMapper(isoMapper);<br>
&nbsp; <br>
&nbsp; vtkOutlineFilter *outline = vtkOutlineFilter::New();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; outline-&gt;SetInput( (vtkDataSet *)
volReader-&gt;GetOutput() );<br>
&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp; vtkPolyDataMapper *outlineMapper = vtkPolyDataMapper::New();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
outlineMapper-&gt;SetInput(outline-&gt;GetOutput() );<br>
&nbsp;&nbsp; <br>
&nbsp;&nbsp; vtkActor *outlineActor = vtkActor::New();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; outlineActor-&gt;SetMapper(outlineMapper);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; outlineActor-&gt;VisibilityOff();<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp;&nbsp; //<br>
&nbsp;&nbsp; // Add the actors to the renderer, set the background and size<br>
&nbsp;&nbsp; //<br>
&nbsp;&nbsp; ren-&gt;AddActor(outlineActor);<br>
&nbsp;&nbsp; ren-&gt;AddActor(isoActor);<br>
&nbsp;&nbsp; ren-&gt;SetBackground(0.2,0.3,0.4);<br>
&nbsp;&nbsp; renWin-&gt;SetSize(450,450);<br>
&nbsp;&nbsp; ren-&gt;GetActiveCamera()-&gt;Elevation(90);<br>
&nbsp;&nbsp; ren-&gt;GetActiveCamera()-&gt;SetViewUp(0,0,-1);<br>
&nbsp;&nbsp; <br>
&nbsp;&nbsp; iren-&gt;Initialize();<br>
&nbsp;&nbsp; <br>
&nbsp;&nbsp; // render the image<br>
&nbsp;&nbsp; iren-&gt;Start();<br>
&nbsp;&nbsp; <br>
&nbsp;<br>
&nbsp;&nbsp; return 0;<br>
}<br>
&nbsp;<br>
</span></font><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma'>-----Original Message-----<br>
<b><span style='font-weight:bold'>From:</span></b> </span></font><font size=2
 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>Amy Henderson</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> [<a
href="mailto:amy.henderson@kitware.com" eudora=autourl>mailto:amy.henderson@kitware.com</a>]
<br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, April 05, 2004 11:59
AM<br>
<b><span style='font-weight:bold'>To:</span></b> </span></font><font size=2
 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>byrdv@cis.uab.edu</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>; '</span></font><font
 size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>vtkusers</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>'<br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [</span></font><font
 size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>vtkusers</span></font><font
size=2 face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>]
vtkVolumeReader<br>
</span></font>&nbsp;<br>
Vetria,<br>
<br>
Did you include the vtkVolumeReader header file (#include
&quot;vtkVolumeReader.h&quot;)?<br>
<br>
- Amy<br>
<br>
At 12:47 PM 4/5/2004, Vetria Byrd wrote:<br>
<br>
<font size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I have
manually created data files that consists of zero&#8217;s and one&#8217;s (no
header info) to resemble a (5x5x5) 3D cube.<br>
There are 5 data files.&nbsp; When I try to use vtkVolumeReader I get the
following error message:<br>
&nbsp;<br>
error C2440: 'initializing' : cannot convert from 'class vtkObject *' to 'class
vtkVolumeReader *'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Types pointed to are unrelated;
conversion requires reinterpret_cast, C-style cast or function-style cast<br>
&nbsp;<br>
This is where the error occurs:<br>
:<br>
:<br>
&nbsp;<br>
&nbsp; vtkVolumeReader *volReader = vtkVolumeReader::New();<br>
&nbsp;&nbsp;&nbsp; volReader-&gt;SetImageRange (1,5);<br>
&nbsp;&nbsp;&nbsp; volReader-&gt;SetFilePrefix (argv[1]);<br>
&nbsp;&nbsp;&nbsp; volReader-&gt;SetDataSpacing (1,1,1);<br>
&nbsp;&nbsp;&nbsp; volReader-&gt;Update();<br>
&nbsp;<br>
Any assistance will be greatly appreciated.<br>
Thanks,<br>
_______________<br>
Vetria L. Byrd<br>
</span></font>&nbsp;<br>
&nbsp;</p>

</div>

</body>

</html>