[vtkusers] vtkVolume16Reader

anast.jm at pg.com anast.jm at pg.com
Tue Apr 22 20:03:38 EDT 2003


Marc, first it looks like you have 8bit data so don't use vtkVolume16Reader. 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



Internet Mail Message
Received from host:     public.kitware.com [24.97.130.19]



"Marwan Adada" <adada_marwan at hotmail.com>
Sent by: vtkusers-admin at public.kitware.com
04/22/2003 07:42 PM

 
        To:     vtkusers at public.kitware.com
        cc:     (bcc: John Anast-JM/PGI)
        Subject:        [vtkusers] vtkVolume16Reader


Hello,
I have a raw data file of dimensions 205x233x251, I am trying to cut this 
file into slices to pass it to C, and the to 
vtkMarchingCubes;  When I make 251 slices each containg 
47765(205x233)bytes 
the vtkVolume16Reader can't read the data. When I double the size of the 
slice, v16 will read the data, but the output will include 4 objects 
instead 
of one.  There seems to be  something wrong with me trying to divide may 
data into slices.  Any Ideas??
Thanks in advance

This is my code for dividing my data(which is in buffer) into slices:

for(int k=0;k<251;k++)
                 {
                                 sprintf (fname, "slice.%d", k+1);
                                 fp = fopen (fname, "wb");
                                 for(int i = 0;i<47765;i++){
 fwrite(&(buffer[i+(k*47765)]),1,1,fp);
                                 }
                                 fclose(fp);
                 }


Marc




_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail

_______________________________________________
This is the private VTK discussion list. 
Please keep messages on-topic. Check the FAQ at: 
<http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030422/a1b2e510/attachment.htm>


More information about the vtkusers mailing list