[vtkusers] HELP -- vtkImageReader2 ERROR!

anast.jm at pg.com anast.jm at pg.com
Wed Jul 9 12:57:48 EDT 2003


Christos,

Your extent doesn't match your image size (it will mess up the volume 
rendering if its not causing this error). Use the VOI method to limit the 
volume of interest if that was your intent.

reader1->SetDataExtent(0,245,0,245,0,93);

Also turn on the reader debug method and see if its really reading all the 
files (1 to 94)....sounds like maybe its running out of data to read. Try 
just a few slices and see if that works.

....john




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



Christos Panagiotou <cpanagio at cs.ucl.ac.uk>
Sent by: vtkusers-admin at vtk.org
07/09/2003 10:52 AM

 
        To:     vtkusers at vtk.org
        cc:     (bcc: John Anast-JM/PGI)
        Subject:        [vtkusers] HELP -- vtkImageReader2 ERROR!


hi there

this follows a previous post:
*****
i am trying the past couple of days to volumize a set of raw data files 
containing medical data
the files represent images of
size 256x256
binary (0-255)
spacing 2.5
voxel size (x,y) 1.1211
(the above data comes from an independent header file / raw files -> no 
header)

first of all which reader should i use?
vtkImageReader, vtkImageReader2, vtkBMPReader, ...?

if someone has already some code that does something similar, i would 
appreciate if he/she could share it
*****

I have attempted to write the module however I there is a problem in the 
next block of calls:

vtkImageReader2 *reader1 = vtkImageReader2::New();
 
  reader1->SetFileDimensionality(2);
  reader1->SetNumberOfScalarComponents(1);
  reader1->SetFilePrefix("/home/christos/VIVE02/data/countour1/ABDL 
15436 one contour"); //filenames are ok
  reader1->SetFilePattern("%s.l%.2d"); //filenames are ok
  reader1->SetDataByteOrderToBigEndian();
 
reader1->SetDataScalarTypeToShort();  
  reader1->SetDataExtent(0,245,0,245,0,93);
  reader1->SetDataSpacing(1.1211,1.1211,2.5);
  reader1->SetDataOrigin(120.1, -130.5, -60.5);


The error I am getting in the console is:

_-----------------------------------------------------------------------------------------
_
_Generic Warning: In /home/bellet/rpm/BUILD/VTK/IO/vtkImageReader2.cxx, 
line 668
File operation failed. row = 140, Read = 492, FilePos = -1


Press Enter to continue!
-----------------------------------------------------------------------------------------_

I have oppened the some of the files with a hex editor etc. and they 
seem ok!

_
_Any help would be really appreciated!
Also if someone has a module that does the job, I would really be 
greatful if he/she could message me!

thanks
christos



_______________________________________________
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://www.vtk.org/mailman/listinfo/vtkusers


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


More information about the vtkusers mailing list