<br><font size=2 face="sans-serif">Marc, first it looks like you have 8bit data so don't use </font><font size=2 face="Courier New">vtkVolume16Reader</font><font size=2 face="sans-serif">. Second, if you use vtkImageReader you can read your file as a raw 3D volume and not have to slice it up. Also look into vtkImageImport to get the data directly from your buffer into vtk....john</font>
<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>"Marwan Adada" <adada_marwan@hotmail.com></b></font>
<br><font size=1 face="sans-serif">Sent by: vtkusers-admin@public.kitware.com</font>
<p><font size=1 face="sans-serif">04/22/2003 07:42 PM</font>
<br>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> To: vtkusers@public.kitware.com</font>
<br><font size=1 face="sans-serif"> cc: (bcc: John Anast-JM/PGI)</font>
<br><font size=1 face="sans-serif"> Subject: [vtkusers] vtkVolume16Reader</font></table>
<br>
<br>
<br><font size=2 face="Courier New">Hello,<br>
I have a raw data file of dimensions 205x233x251, I am trying to cut this <br>
file into slices to pass it to C, and the to <br>
vtkMarchingCubes; When I make 251 slices each containg 47765(205x233)bytes <br>
the vtkVolume16Reader can't read the data. When I double the size of the <br>
slice, v16 will read the data, but the output will include 4 objects instead <br>
of one. There seems to be something wrong with me trying to divide may <br>
data into slices. Any Ideas??<br>
Thanks in advance<br>
<br>
This is my code for dividing my data(which is in buffer) into slices:<br>
<br>
for(int k=0;k<251;k++)<br>
{<br>
sprintf (fname, "slice.%d", k+1);<br>
fp = fopen (fname, "wb");<br>
for(int i = 0;i<47765;i++){<br>
fwrite(&(buffer[i+(k*47765)]),1,1,fp);<br>
}<br>
fclose(fp);<br>
}<br>
<br>
<br>
Marc<br>
<br>
<br>
<br>
<br>
_________________________________________________________________<br>
The new MSN 8: advanced junk mail protection and 2 months FREE* <br>
http://join.msn.com/?page=features/junkmail<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://public.kitware.com/mailman/listinfo/vtkusers<br>
</font>
<br>
<br>