<br><font size=2 face="sans-serif">Yasser, you didn't supply the filename in the prefix so its trying to read a filename that is really the directory name</font>
<br>
<br><font size=2 face="Courier New">D:/ex/headsq.1</font>
<br>
<br><font size=2 face="sans-serif">I think what you want is</font>
<br>
<br><font size=2 face="Courier New">D:/ex/headsq/quarter.1 etc.</font>
<br>
<br><font size=2 face="Courier New">so the prefix should be</font>
<br>
<br><font size=2 face="Courier New">v16-&gt;SetFilePrefix (&quot;D:/ex/headsq/quarter&quot;);</font>
<br>
<br><font size=2 face="Courier New">I'm assuming you are using the vtkdata from version 4 (my headsq folder has the quarter data in it). If your filename is different just substitute the right one in...john</font>
<br>
<br>
<br>
<br>
<table>
<tr valign=top>
<td><font size=6 color=red face="Times New Roman"><b>Internet Mail Message</b></font>
<br><font size=2 color=red face="sans-serif">Received from host: &nbsp; &nbsp; &nbsp; &nbsp;</font>
<td></table>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>yasser salman &lt;yass@uscx.net&gt;</b></font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Sent by: vtkusers-admin@public.kitware.com</font>
<p><font size=1 face="sans-serif">02/20/2003 02:06 PM</font>
<br><font size=1 face="sans-serif">Please respond to yass</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;To: &nbsp; &nbsp; &nbsp; &nbsp;Jeremy Winston &lt;winston@cat.rpi.edu&gt;, vtk users &lt;vtkusers@public.kitware.com&gt;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc: &nbsp; &nbsp; &nbsp; &nbsp;(bcc: John Anast-JM/PGI)</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject: &nbsp; &nbsp; &nbsp; &nbsp;[vtkusers] NO DATA WHY?? medical2 again!!</font></table>
<br>
<br><font size=2 face="Courier New"><br>
<br>
Hi Jeremy.,<br>
<br>
i did As u told me but it seems no hope!!!<br>
i changed the path to v16-&gt;SetFilePrefix (&quot;D:/ex/headsq&quot;);<br>
and the data in the directory (D:ex\headsq) but the same problem( empty rectangle can be rendered with no data inside it <br>
and error message :<br>
<br>
&quot;:ERROR: In C:\martink\vtk40\VTK\IO\vtkVolume16Reader.cxx, line 390&quot;<br>
&quot;vtkVolume16Reader (0x00EC4B20): Can't find file: D:/ex/headsq.1&quot;<br>
<br>
<br>
may be the problem with somthing else like FilePatter or somthing like that?<br>
i'll attach u the Medical2.cxx and u can test it if u plz.. thanx jeremy any way..<br>
yasser..<br>
 <br>
<br>
_____________________________________________________________<br>
Free shareware + free products &amp; services at U.S. Computer Corporation - http://www.uscomputer.net/portal.htm<br>
<br>
_____________________________________________________________<br>
Select your own custom email address for FREE! Get you@yourchoice.com w/No Ads, 6MB, POP &amp; more! http://www.everyone.net/selectmail?campaign=tag<br>
/*=========================================================================<br>
<br>
 &nbsp;Program: &nbsp; Visualization Toolkit<br>
 &nbsp;Module: &nbsp; &nbsp;$RCSfile: Medical2.cxx,v $<br>
 &nbsp;Language: &nbsp;C++<br>
 &nbsp;Date: &nbsp; &nbsp; &nbsp;$Date: 2002/11/27 16:06:38 $<br>
 &nbsp;Version: &nbsp; $Revision: 1.2 $<br>
<br>
 &nbsp;Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen <br>
 &nbsp;All rights reserved.<br>
 &nbsp;See Copyright.txt or http://www.kitware.com/Copyright.htm for details.<br>
</font>
<br><font size=2 face="Courier New">&nbsp; &nbsp; &nbsp;This software is distributed WITHOUT ANY WARRANTY; without even <br>
 &nbsp; &nbsp; the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR <br>
 &nbsp; &nbsp; PURPOSE. &nbsp;See the above copyright notice for more information.<br>
<br>
=========================================================================*/<br>
//<br>
// This example reads a volume dataset, extracts two isosurfaces that<br>
// represent the skin and bone, and then displays them.<br>
//<br>
<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;vtkPolyDataMapper.h&quot;<br>
#include &quot;vtkActor.h&quot;<br>
#include &quot;vtkProperty.h&quot;<br>
#include &quot;vtkOutlineFilter.h&quot;<br>
#include &quot;vtkCamera.h&quot;<br>
#include &quot;vtkPolyDataMapper.h&quot;<br>
#include &quot;vtkStripper.h&quot;<br>
#include &quot;vtkPolyDataNormals.h&quot;<br>
#include &quot;vtkContourFilter.h&quot;<br>
<br>
int main (int argc, char **argv)<br>
{<br>
 &nbsp;<br>
<br>
 &nbsp;// Create the renderer, the render window, and the interactor. The renderer<br>
 &nbsp;// draws into the render window, the interactor enables mouse- and <br>
 &nbsp;// keyboard-based interaction with the data within the render window.<br>
 &nbsp;//<br>
 &nbsp;vtkRenderer *aRenderer = vtkRenderer::New();<br>
 &nbsp;vtkRenderWindow *renWin = vtkRenderWindow::New();<br>
 &nbsp; &nbsp;renWin-&gt;AddRenderer(aRenderer);<br>
 &nbsp;vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>
 &nbsp; &nbsp;iren-&gt;SetRenderWindow(renWin);<br>
<br>
 &nbsp;// The following reader is used to read a series of 2D slices (images)<br>
 &nbsp;// that compose the volume. The slice dimensions are set, and the<br>
 &nbsp;// pixel spacing. The data Endianness must also be specified. The reader<br>
 &nbsp;// usese the FilePrefix in combination with the slice number to construct<br>
 &nbsp;// filenames using the format FilePrefix.%d. (In this case the FilePrefix<br>
 &nbsp;// is the root name of the file: quarter.)<br>
 &nbsp;vtkVolume16Reader *v16 = vtkVolume16Reader::New();<br>
 &nbsp; &nbsp;v16-&gt;SetDataDimensions(64,64);<br>
 &nbsp; &nbsp;v16-&gt;SetDataByteOrderToLittleEndian();<br>
 &nbsp; &nbsp;v16-&gt;SetFilePrefix (&quot;D:/ex/headsq&quot;);<br>
 &nbsp; &nbsp;v16-&gt;SetImageRange(1, 93);<br>
 &nbsp; &nbsp;v16-&gt;SetDataSpacing (3.2, 3.2, 1.5);<br>
<br>
 &nbsp;// An isosurface, or contour value of 500 is known to correspond to the<br>
 &nbsp;// skin of the patient. Once generated, a vtkPolyDataNormals filter is<br>
 &nbsp;// is used to create normals for smooth surface shading during rendering.<br>
 &nbsp;// The triangle stripper is used to create triangle strips from the<br>
 &nbsp;// isosurface; these render much faster on may systems.<br>
 &nbsp;vtkContourFilter *skinExtractor = vtkContourFilter::New();<br>
 &nbsp; &nbsp;skinExtractor-&gt;SetInput((vtkDataSet *) v16-&gt;GetOutput());<br>
 &nbsp; &nbsp;skinExtractor-&gt;SetValue(0, 500);<br>
 &nbsp;vtkPolyDataNormals *skinNormals = vtkPolyDataNormals::New();<br>
 &nbsp; &nbsp;skinNormals-&gt;SetInput(skinExtractor-&gt;GetOutput());<br>
 &nbsp; &nbsp;skinNormals-&gt;SetFeatureAngle(60.0);<br>
 &nbsp;vtkStripper *skinStripper = vtkStripper::New();<br>
 &nbsp; &nbsp;skinStripper-&gt;SetInput(skinNormals-&gt;GetOutput());<br>
 &nbsp;vtkPolyDataMapper *skinMapper = vtkPolyDataMapper::New();<br>
 &nbsp; &nbsp;skinMapper-&gt;SetInput(skinStripper-&gt;GetOutput());<br>
 &nbsp; &nbsp;skinMapper-&gt;ScalarVisibilityOff();<br>
 &nbsp;vtkActor *skin = vtkActor::New();<br>
 &nbsp; &nbsp;skin-&gt;SetMapper(skinMapper);<br>
 &nbsp; &nbsp;skin-&gt;GetProperty()-&gt;SetDiffuseColor(1, .49, .25);<br>
 &nbsp; &nbsp;skin-&gt;GetProperty()-&gt;SetSpecular(.3);<br>
 &nbsp; &nbsp;skin-&gt;GetProperty()-&gt;SetSpecularPower(20);<br>
 &nbsp; &nbsp;skin-&gt;GetProperty()-&gt;SetOpacity(1.0);<br>
<br>
 &nbsp;// An isosurface, or contour value of 1150 is known to correspond to the<br>
 &nbsp;// skin of the patient. Once generated, a vtkPolyDataNormals filter is<br>
 &nbsp;// is used to create normals for smooth surface shading during rendering.<br>
 &nbsp;// The triangle stripper is used to create triangle strips from the<br>
 &nbsp;// isosurface; these render much faster on may systems.<br>
 &nbsp;vtkContourFilter *boneExtractor = vtkContourFilter::New();<br>
 &nbsp; &nbsp;boneExtractor-&gt;SetInput((vtkDataSet *) v16-&gt;GetOutput());<br>
 &nbsp; &nbsp;boneExtractor-&gt;SetValue(0, 1150);<br>
 &nbsp;vtkPolyDataNormals *boneNormals = vtkPolyDataNormals::New();<br>
 &nbsp; &nbsp;boneNormals-&gt;SetInput(boneExtractor-&gt;GetOutput());<br>
 &nbsp; &nbsp;boneNormals-&gt;SetFeatureAngle(60.0);<br>
 &nbsp;vtkStripper *boneStripper = vtkStripper::New();<br>
 &nbsp; &nbsp;boneStripper-&gt;SetInput(boneNormals-&gt;GetOutput());<br>
 &nbsp;vtkPolyDataMapper *boneMapper = vtkPolyDataMapper::New();<br>
 &nbsp; &nbsp;boneMapper-&gt;SetInput(boneStripper-&gt;GetOutput());<br>
 &nbsp; &nbsp;boneMapper-&gt;ScalarVisibilityOff();<br>
 &nbsp;vtkActor *bone = vtkActor::New();<br>
 &nbsp; &nbsp;bone-&gt;SetMapper(boneMapper);<br>
 &nbsp; &nbsp;bone-&gt;GetProperty()-&gt;SetDiffuseColor(1, 1, .9412);<br>
<br>
 &nbsp;// An outline provides context around the data.<br>
 &nbsp;//<br>
 &nbsp;vtkOutlineFilter *outlineData = vtkOutlineFilter::New();<br>
 &nbsp; &nbsp;outlineData-&gt;SetInput((vtkDataSet *) v16-&gt;GetOutput());<br>
 &nbsp;vtkPolyDataMapper *mapOutline = vtkPolyDataMapper::New();<br>
 &nbsp; &nbsp;mapOutline-&gt;SetInput(outlineData-&gt;GetOutput());<br>
 &nbsp;vtkActor *outline = vtkActor::New();<br>
 &nbsp; &nbsp;outline-&gt;SetMapper(mapOutline);<br>
 &nbsp; &nbsp;outline-&gt;GetProperty()-&gt;SetColor(0,0,0);<br>
<br>
 &nbsp;// It is convenient to create an initial view of the data. The FocalPoint<br>
 &nbsp;// and Position form a vector direction. Later on (ResetCamera() method)<br>
 &nbsp;// this vector is used to position the camera to look at the data in</font>
<br><font size=2 face="Courier New">&nbsp; // this direction.<br>
 &nbsp;vtkCamera *aCamera = vtkCamera::New();<br>
 &nbsp; &nbsp;aCamera-&gt;SetViewUp (0, 0, -1);<br>
 &nbsp; &nbsp;aCamera-&gt;SetPosition (0, 1, 0);<br>
 &nbsp; &nbsp;aCamera-&gt;SetFocalPoint (0, 0, 0);<br>
 &nbsp; &nbsp;aCamera-&gt;ComputeViewPlaneNormal();<br>
<br>
 &nbsp;// Actors are added to the renderer. An initial camera view is created.<br>
 &nbsp;// The Dolly() method moves the camera towards the FocalPoint,<br>
 &nbsp;// thereby enlarging the image.<br>
 &nbsp;aRenderer-&gt;AddActor(outline);<br>
 &nbsp;aRenderer-&gt;AddActor(skin);<br>
 &nbsp;aRenderer-&gt;AddActor(bone);<br>
 &nbsp;aRenderer-&gt;SetActiveCamera(aCamera);<br>
 &nbsp;aRenderer-&gt;ResetCamera ();<br>
 &nbsp;aCamera-&gt;Dolly(1.5);<br>
<br>
 &nbsp;// Set a background color for the renderer and set the size of the<br>
 &nbsp;// render window (expressed in pixels).<br>
 &nbsp;aRenderer-&gt;SetBackground(1,1,1);<br>
 &nbsp;renWin-&gt;SetSize(640, 480);<br>
<br>
 &nbsp;// Note that when camera movement occurs (as it does in the Dolly()<br>
 &nbsp;// method), the clipping planes often need adjusting. Clipping planes<br>
 &nbsp;// consist of two planes: near and far along the view direction. The <br>
 &nbsp;// near plane clips out objects in front of the plane; the far plane<br>
 &nbsp;// clips out objects behind the plane. This way only what is drawn<br>
 &nbsp;// between the planes is actually rendered.<br>
 &nbsp;aRenderer-&gt;ResetCameraClippingRange ();<br>
<br>
 &nbsp;// Set a background color for the renderer and set the size of the<br>
 &nbsp;// render window (expressed in pixels).<br>
 &nbsp;iren-&gt;Initialize();<br>
 &nbsp;iren-&gt;Start(); <br>
<br>
 &nbsp;// It is important to delete all objects created previously to prevent<br>
 &nbsp;// memory leaks. In this case, since the program is on its way to<br>
 &nbsp;// exiting, it is not so important. But in applications it is<br>
 &nbsp;// essential.<br>
 &nbsp;v16-&gt;Delete();<br>
 &nbsp;skinExtractor-&gt;Delete();<br>
 &nbsp;skinNormals-&gt;Delete();<br>
 &nbsp;skinStripper-&gt;Delete();<br>
 &nbsp;skinMapper-&gt;Delete();<br>
 &nbsp;skin-&gt;Delete();<br>
 &nbsp;boneExtractor-&gt;Delete();<br>
 &nbsp;boneNormals-&gt;Delete();<br>
 &nbsp;boneStripper-&gt;Delete();<br>
 &nbsp;boneMapper-&gt;Delete();<br>
 &nbsp;bone-&gt;Delete();<br>
 &nbsp;outlineData-&gt;Delete();<br>
 &nbsp;mapOutline-&gt;Delete();<br>
 &nbsp;outline-&gt;Delete();<br>
 &nbsp;aCamera-&gt;Delete();<br>
 &nbsp;aRenderer-&gt;Delete();<br>
 &nbsp;renWin-&gt;Delete();<br>
 &nbsp;iren-&gt;Delete();<br>
<br>
 &nbsp;return 0;<br>
}<br>
<br>
<br>
</font>
<br>
<br>