<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: </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 <cpanagio@cs.ucl.ac.uk></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"> </font>
<br><font size=1 face="sans-serif"> To: vtkusers@vtk.org</font>
<br><font size=1 face="sans-serif"> cc: (bcc: John Anast-JM/PGI)</font>
<br><font size=1 face="sans-serif"> Subject: [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 -> 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>
reader1->SetFileDimensionality(2);<br>
reader1->SetNumberOfScalarComponents(1);<br>
reader1->SetFilePrefix("/home/christos/VIVE02/data/countour1/ABDL <br>
15436 one contour"); //filenames are ok<br>
reader1->SetFilePattern("%s.l%.2d"); //filenames are ok<br>
reader1->SetDataByteOrderToBigEndian();<br>
<br>
reader1->SetDataScalarTypeToShort(); <br>
reader1->SetDataExtent(0,245,0,245,0,93);<br>
reader1->SetDataSpacing(1.1211,1.1211,2.5);<br>
reader1->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: <http://public.kitware.com/cgi-bin/vtkfaq><br>
Follow this link to subscribe/unsubscribe:<br>
http://www.vtk.org/mailman/listinfo/vtkusers<br>
</font>
<br>
<br>