Hi,

I have struggled to find information on reading & writing a vil_image_view using vsl_b_read and vsl_b_write. I have included:

#include <vil/io/vil_io_image_view.h>

And used:

vsl_b_write(s, ROI);             // s is vsl_b_ofstream, ROI is vil_image_view<bool>
vsl_b_read(s, ROI);             // s is vsl_b_ifstream, ROI is vil_image_view<bool>

I have received these linking errors:

error LNK2019: unresolved external symbol "void __cdecl vsl_b_write<class vil_memory_chunk>(class vsl_b_ostream &,class vil_smart_ptr<class vil_memory_chunk> const &)" (??$vsl_b_write@Vvil_memory_chunk@@@@YAXAAVvsl_b_ostream@@ABV?$vil_smart_ptr@Vvil_memory_chunk@@@@@Z) referenced in function "void __cdecl vsl_b_write<bool>(class vsl_b_ostream &,class vil_image_view<bool> const &)" (??$vsl_b_write@_N@@YAXAAVvsl_b_ostream@@ABV?$vil_image_view@_N@@@Z)

error LNK2019: unresolved external symbol "void __cdecl vsl_b_read<class vil_memory_chunk>(class vsl_b_istream &,class vil_smart_ptr<class vil_memory_chunk> &)" (??$vsl_b_read@Vvil_memory_chunk@@@@YAXAAVvsl_b_istream@@AAV?$vil_smart_ptr@Vvil_memory_chunk@@@@@Z) referenced in function "void __cdecl vsl_b_read<bool>(class vsl_b_istream &,class vil_image_view<bool> &)" (??$vsl_b_read@_N@@YAXAAVvsl_b_istream@@AAV?$vil_image_view@_N@@@Z)


Since vil_image_view is a templated object, I believe need to follow these instructions:

http://public.kitware.com/vxl/doc/development/books/core/book_9.html#SEC106

However it's not clear to me what I should specifically be doing for a vil_image_view. Any help would be much appreciated.

Regards,
David.