<br><font size=2 face="sans-serif">Christos...also make sure your image data is indeed Short .... you indicated it was only 0-255 so it might be unsigned_char...this would definitley cause the reader to attempt to read past the end of the file....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><font size=2 face="sans-serif"><b>public.kitware.com [24.97.130.19]</b></font>
<td></table>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Christos Panagiotou &lt;cpanagio@cs.ucl.ac.uk&gt;</b></font>
<br><font size=1 face="sans-serif">Sent by: vtkusers-admin@vtk.org</font>
<p><font size=1 face="sans-serif">07/09/2003 10:52 AM</font>
<br>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To: &nbsp; &nbsp; &nbsp; &nbsp;vtkusers@vtk.org</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] HELP -- vtkImageReader2 ERROR!</font></table>
<br>
<br>
<br><font size=2 face="Courier New">hi there<br>
<br>
this follows a previous post:<br>
*****<br>
i am trying the past couple of days to volumize a set of raw data files <br>
containing medical data<br>
the files represent images of<br>
size 256x256<br>
binary (0-255)<br>
spacing 2.5<br>
voxel size (x,y) 1.1211<br>
(the above data comes from an independent header file / raw files -&gt; no <br>
header)<br>
<br>
first of all which reader should i use?<br>
vtkImageReader, vtkImageReader2, vtkBMPReader, ...?<br>
<br>
if someone has already some code that does something similar, i would <br>
appreciate if he/she could share it<br>
*****<br>
<br>
I have attempted to write the module however I there is a problem in the <br>
next block of calls:<br>
<br>
vtkImageReader2 *reader1 = vtkImageReader2::New();<br>
 <br>
 &nbsp;reader1-&gt;SetFileDimensionality(2);<br>
 &nbsp;reader1-&gt;SetNumberOfScalarComponents(1);<br>
 &nbsp;reader1-&gt;SetFilePrefix(&quot;/home/christos/VIVE02/data/countour1/ABDL <br>
15436 one contour&quot;); //filenames are ok<br>
 &nbsp;reader1-&gt;SetFilePattern(&quot;%s.l%.2d&quot;); //filenames are ok<br>
 &nbsp;reader1-&gt;SetDataByteOrderToBigEndian();<br>
 &nbsp;<br>
reader1-&gt;SetDataScalarTypeToShort(); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<br>
 &nbsp;reader1-&gt;SetDataExtent(0,245,0,245,0,93);<br>
 &nbsp;reader1-&gt;SetDataSpacing(1.1211,1.1211,2.5);<br>
 &nbsp;reader1-&gt;SetDataOrigin(120.1, -130.5, -60.5);<br>
<br>
<br>
The error I am getting in the console is:<br>
<br>
_-----------------------------------------------------------------------------------------<br>
_<br>
_Generic Warning: In /home/bellet/rpm/BUILD/VTK/IO/vtkImageReader2.cxx, <br>
line 668<br>
File operation failed. row = 140, Read = 492, FilePos = -1<br>
<br>
<br>
Press Enter to continue!<br>
-----------------------------------------------------------------------------------------_<br>
<br>
I have oppened the some of the files with a hex editor etc. and they <br>
seem ok!<br>
<br>
_<br>
_Any help would be really appreciated!<br>
Also if someone has a module that does the job, I would really be <br>
greatful if he/she could message me!<br>
<br>
thanks<br>
christos<br>
<br>
<br>
<br>
_______________________________________________<br>
This is the private VTK discussion list. <br>
Please keep messages on-topic. Check the FAQ at: &lt;http://public.kitware.com/cgi-bin/vtkfaq&gt;<br>
Follow this link to subscribe/unsubscribe:<br>
http://www.vtk.org/mailman/listinfo/vtkusers<br>
</font>
<br>
<br>