[vtkusers] How to read BMP files to form a volume?

Amy Henderson amy.henderson at kitware.com
Fri Jan 9 13:31:38 EST 2004


Hi BeeJay,

You should read BMP files with the vtkBMPReader.  SetImageRange is not a 
method of vtkBMPReader.  The default file pattern is %s.%d (file prefix, 
then a dot, then a number), which is what you want, given your file prefix 
and the file names you listed.  Set the file prefix for the BMP reader the 
same way you set it for the volume 16 reader.

- Amy

At 06:20 PM 1/9/2004 +0000, Sentil Balaji wrote:
>Hey,
>
>    I tried reading BMP files to form a volume using
>vtkVolume16reader as:
>
>         vtkVolume16Reader *v=vtkVolume16Reader::New();
>         v->SetDataDimensions(126,126);
>         v->SetFilePrefix("C:/p");
>         v->SetImageRange(1,7);
>         v->SetDataByteOrderToLittleEndian();
>         v->SetDataSpacing (3.2, 3.2, 1.5);
>where the BMP files are named as p.1,p.2 etc.,They are
>in the 'C:/'.But, the program gives me an error that
>the file is missing.
>    I also tried the medical.cxx files .I got the
>outline of the image volume I am supposed to but not
>the rendering of it.
>    I tried the vtkBMPreader but I am not clear is
>setting the file pattern or the ImageRange for the
>files..
>
>Awaiting your reply..
>
>Thanks
>BeeJay
>
>________________________________________________________________________
>Yahoo! India Mobile: Download the latest polyphonic ringtones.
>Go to http://in.mobile.yahoo.com
>_______________________________________________
>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






More information about the vtkusers mailing list