I have another question, slightly more sensible I think.


developing with VXL 1.0  and MSVC6.0.


I have been extracting information from avi files and I have a pointer to a buffer containing sets of rgb bytes.  I wish to copy this data to a VIL entity which it appears I can do using the following code.


1                      vil_image_view<vxl_byte> frame(p24buffer, avifileinfo.dwWidth, avifileinfo.dwHeight, 1,

2                                  i_step, j_step, plane_step);


I then wish to crop the image which I have successfully done using the next code snippet.

3                      vil_image_view<vxl_byte> croppedframe;



4                      croppedframe = vil_crop(frame, 1, 10, 1, 10);

5                      vil_print_all(vcl_cout, croppedframe);


My problem is this.


My data is a series of three byte chunks that are in a buffer.  To create a straight forward interface I have used the above code with

                                                                        i_step = 3;


This only provides access to the red values in the pixels.


What do I use in place of vxl_byte in line 1 above to achieve this?  Is is a case of simply substituting the correct variable type into the template or will I need further work to achieve this.


Thanks in advance.


Alex Sandison


PS. I have had to extract the rgb from the AVI file myself rather than using the vxl library functions as they do not cater for 8 bit or 32 bit AVI files.



Alex Sandison


Trainee Medical Physicist

Royal Victoria Infirmary

Newcastle upon Tyne