Thanks Matt! I didn't know about this other way of using the () operator, I thought I could only extract the pixel data (the template class) using the (int, int) function. That's exactly what I needed, and now the image is shown correctly. I got a little confused because there are two ways of extracting the pixels, depending on the template class. It could be only one form, couldn't it? Maybe that would be easier for beginners.

Well, thanks again!

See ya!

On Thu, Oct 2, 2008 at 12:57 PM, Matt Leotta <matt.leotta@gmail.com> wrote:
Crístian,

 Everything you are telling me suggest that vidl2 is working fine and
your problem is a result of how you are converting the
vil_image_view<vxl_byte> into a QImage.  As a side note, I don't think
vil_image_view<vil_rgb<vxl_byte> > is supported in vidl2 yet.

 To access the RGB data from a vil_image_view use:

image_view(i,j,0) for red
image_view(i,j,1) for green
image_view(i,j,2) for blue

 I'm not sure exactly what QImage is looking for, but it sounds like
you need to combine these 3 byte values somehow to get the data format
that QImage is expecting.

--Matt


--
Crístian Deives dos Santos Viana [aka CD1]
Google Talk: cristiandeives@gmail.com