contrib/mul/vil3d/vil3d_copy.h
Go to the documentation of this file.
00001 // This is mul/vil3d/vil3d_copy.h
00002 #ifndef vil3d_copy_h_
00003 #define vil3d_copy_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007 //:
00008 // \file
00009 // \brief Various image copying functions.
00010 // \author Ian Scott - Manchester
00011 // \date 2 Feb 2003
00012 
00013 #include <vil3d/vil3d_fwd.h>
00014 
00015 
00016 //: Copy src to dest, without changing dest's view parameters.
00017 // This is useful if you want to copy on image into a window on another image.
00018 // src and dest must have identical sizes, and types.
00019 //  O(size).
00020 // \relatesalso vil3d_image_view
00021 template<class T>
00022 void vil3d_copy_reformat(const vil3d_image_view<T> &src, vil3d_image_view<T> &dest);
00023 
00024 //: Copy src to window in dest.
00025 // Size of window is defined by src.
00026 //  O(src.size).
00027 // \relatesalso vil3d_image_view
00028 template<class T>
00029 void vil3d_copy_to_window(const vil3d_image_view<T> &src, vil3d_image_view<T> &dest,
00030                          unsigned i0, unsigned j0, unsigned k0);
00031 
00032 //: Deep copy src to dest.
00033 //  O(size).
00034 // \relatesalso vil3d_image_view
00035 template<class T>
00036 void vil3d_copy_deep(const vil3d_image_view<T> &src, vil3d_image_view<T> &dest);
00037 
00038 //: Create a deep copy of an image, with completely new underlying memory.
00039 //  O(size).
00040 // \relatesalso vil3d_image_view
00041 template<class T>
00042 vil3d_image_view<T> vil3d_copy_deep(const vil3d_image_view<T> &src);
00043 
00044 
00045 //: Copy src to dest.
00046 // This is useful if you want to copy on image into a window on another image.
00047 // src and dest must have identical sizes, and pixel-types. Returns false if the copy
00048 // failed.
00049 //  O(size).
00050 // \relatesalso vil3d_image_resource
00051 bool vil3d_copy_deep(const vil3d_image_resource_sptr &src, vil3d_image_resource_sptr &dest);
00052 
00053 
00054 #endif // vil3d_copy_h_