From: Mark J. <mr...@le...> - 2003-08-20 16:20:02
|
On Wed, Aug 20, 2003, Ian Scott wrote: > For example, you can solve Mark's original request as follows > // The image we want to store without worrying about pixel type > vil_image_view<T> input; > // The place we will store the image. > vil_image_resource_sptr container = vil_new_image_resource( > input.ni(), input.nj(), input.nplanes(), input.pixel_format()); > container->put_image(input); This is definitely the answer to my original question about "getting a vil_image_resource_sptr from a vil_image_view (such that both refer to the same image data)." > > At the monent there is an unecessary malloc/free present in the above code. > I will add a function to avoid this: > > vil_image_resource_sptr > vil_new_image_resource_of_view(vil_image_view_base &input) > And a function like the one you mention would make everything much simpler. > > Tim and I are not totally convinced that we have the right solution, and are > more than happy to debate this further. In particular if anybody feels we > haven't understood the problem/requirements we'd be grateful for any > corrections. > > Ian and Tim > ISBE, Manchester > As far as my needs are concerned, you seem to have addressed those in a very thorough manner. Thanks for sending out such a comprehensive email -- it definitely explains things well and the suggestions you made for additions to vil should definitely make things much more usable for the casual programmer. Thanks, Mark Johnson mr...@le... |