From: Ian S. <ian...@st...> - 2002-10-14 19:33:31
|
At the meeting I agreed to write this short document to be included in the vxl 1.0 release notes. It is of more general interest - so here is an early copy. How to write code for vil that will be easy to convert to the new rewritten vil (currently mul/vil2) * Read the code in mul/vil2/examples and http://www.isbe.man.ac.uk/internal/software/c++/isbe_vxl_doc/mul/vil2/html/i ndex.html, * Use vil_memory_image_of<T> where possible. This wil be directly converted to vil2_image_view<T>. Use operator(i,j) as the primary means of accessing a pixel value. Your code will be more general if it thinks of the image in terms of planes. * Where you do use vil_image::get_section() and vil_image::put_section(), wrap the resulting buffer in a vil_memory_image_of<T> before further processing. vil2 will perform this wrapping automatically when image::get_section() is converted to vil2_image_resource::get_view(), etc. * Use vil_byte, vxl_uint_16, etc rather than short and unsigned char. Alternatively * Start using mul/vil2 now. The conversion will then just require the running of a perl script over your code. * Use the functions in vil2/vil2_vil.h to interface with any existing vil1 code you are using. |