[vtkusers] Volume Rendering

lappadj at libero.it lappadj at libero.it
Wed Oct 24 05:54:13 EDT 2001


Hi John,thank for your interest,but with this code i can't read the bmp 
image,i receive error in SetFilePattern("pat.%d").And i must specify 
the SetFilePrefix?To solve this problem is very important for me 
because is the only problem with vtk.

Thanks a lot

Massimiliano


> Massimiliano...I was able to view the bmp image with the code at 
bottom (I
> renamed the image to pat.bmp) I think part of the problem may be 
trying to use
> vtkImageReader with the bmp images. Note also I had to change the 
Window/Level
> values, since bmp images are 8 bit. For some reason SAVEVIEWERIMAGE 
is not
> working on my system. Also the two images you sent me, the bmp and 
the dicom are
> not the same image, however that doesn't make any programming 
difference for
> viewing.
> 
> vtkBMPReader can be used to read a volume consisting of bmp slices in 
much the
> same way vtkImageReader can (since its really a subclass). Perhaps 
you can try
> that approach. This is a tcl snippet from some volume rendering I do 
with bmp
> images
> 
> vtkBMPReader reader1
>     reader1 SetFilePattern "dik.%d"
>     reader1 SetDataSpacing 0.44 0.44 0.88
>     reader1 SetDataExtent 0 1023 0 1023 1 200
>     reader1 SetDataVOI 100 925 100 925 1 200
> 
> ...john
> 
> 
------------------------------------------------------------------------





More information about the vtkusers mailing list