From: Ian Scott <ian.m.scott@st...> - 2004-10-18 09:25:54
Swati Setty wrote:
> Actually i want to know how can i get the image data from 2D array??
> I have a structure with me which contains the information abt the
> dimensions,data type of data & data???
You can wrap any array structured data in an image view using
vil_image_view<T>::vil_image_view (const T *top_left, unsigned ni,
unsigned nj, unsigned nplanes, vcl_ptrdiff_t i_step, vcl_ptrdiff_t
j_step, vcl_ptrdiff_t plane_step)
For example, if your data is structured as a compact array of unsigned
bytes, size 30x20, in row-major order, the following will work.
vil_image_view<vxl_byte> wrapper(array, 30, 20, 1, 1, 30, 600);