core/vil/vil_copy.h
Go to the documentation of this file.
00001 // This is core/vil/vil_copy.h
00002 #ifndef vil_copy_h_
00003 #define vil_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 4 Oct 2002
00012 
00013 #include <vil/vil_fwd.h>
00014 
00015 
00016 //: Copy src to dest, without changing dest's view parameters.
00017 // This is useful if you want to copy an image into a window on another image.
00018 // src and dest must have identical sizes, and types.
00019 //  O(size).
00020 // \relatesalso vil_image_view
00021 template<class T>
00022 void vil_copy_reformat(const vil_image_view<T> &src, vil_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 vil_image_view
00028 template<class T>
00029 void vil_copy_to_window(const vil_image_view<T> &src, vil_image_view<T> &dest,
00030                         unsigned i0, unsigned j0);
00031 
00032 //: Deep copy src to dest.
00033 //  O(size).
00034 // \relatesalso vil_image_view
00035 template<class T>
00036 void vil_copy_deep(const vil_image_view<T> &src, vil_image_view<T> &dest);
00037 
00038 //: Create a deep copy of an image, with completely new underlying memory.
00039 //  O(size).
00040 // \relatesalso vil_image_view
00041 template<class T>
00042 vil_image_view<T> vil_copy_deep(const vil_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 vil_image_resource
00051 bool vil_copy_deep(const vil_image_resource_sptr &src, vil_image_resource_sptr &dest);
00052 
00053 #endif // vil_copy_h_