00001 #ifndef vil3d_switch_axes_h_
00002 #define vil3d_switch_axes_h_
00003 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00004 #pragma interface
00005 #endif
00006
00007
00008
00009
00010 #include <vil3d/vil3d_image_view.h>
00011
00012
00013
00014 template<class T>
00015 inline vil3d_image_view<T> vil3d_switch_axes_jik(const vil3d_image_view<T> &im)
00016 {
00017 return vil3d_image_view<T>(im.memory_chunk(),im.origin_ptr(),
00018 im.nj(),im.ni(),im.nk(),im.nplanes(),
00019 im.jstep(),im.istep(),im.kstep(),im.planestep());
00020 }
00021
00022
00023
00024 template<class T>
00025 inline vil3d_image_view<T> vil3d_switch_axes_jki(const vil3d_image_view<T> &im)
00026 {
00027 return vil3d_image_view<T>(im.memory_chunk(),im.origin_ptr(),
00028 im.nj(),im.nk(),im.ni(),im.nplanes(),
00029 im.jstep(),im.kstep(),im.istep(),im.planestep());
00030 }
00031
00032
00033
00034 template<class T>
00035 inline vil3d_image_view<T> vil3d_switch_axes_kij(const vil3d_image_view<T> &im)
00036 {
00037 return vil3d_image_view<T>(im.memory_chunk(),im.origin_ptr(),
00038 im.nk(),im.ni(),im.nj(),im.nplanes(),
00039 im.kstep(),im.istep(),im.jstep(),im.planestep());
00040 }
00041
00042
00043
00044 template<class T>
00045 inline vil3d_image_view<T> vil3d_switch_axes_kji(const vil3d_image_view<T> &im)
00046 {
00047 return vil3d_image_view<T>(im.memory_chunk(),im.origin_ptr(),
00048 im.nk(),im.nj(),im.ni(),im.nplanes(),
00049 im.kstep(),im.jstep(),im.istep(),im.planestep());
00050 }
00051
00052
00053
00054 template<class T>
00055 inline vil3d_image_view<T> vil3d_switch_axes_ikj(const vil3d_image_view<T> &im)
00056 {
00057 return vil3d_image_view<T>(im.memory_chunk(),im.origin_ptr(),
00058 im.ni(),im.nk(),im.nj(),im.nplanes(),
00059 im.istep(),im.kstep(),im.jstep(),im.planestep());
00060 }
00061
00062 #endif // vil3d_switch_axes_h_