Go to the documentation of this file.00001
00002 #ifndef vimt3d_reflect_h_
00003 #define vimt3d_reflect_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012
00013 #include <vil3d/vil3d_reflect.h>
00014 #include <vimt3d/vimt3d_image_3d_of.h>
00015
00016
00017
00018 template<class T>
00019 inline void vimt3d_reflect_x(vimt3d_image_3d_of<T>& img)
00020 {
00021
00022 img.image() = vil3d_reflect_i(img.image());
00023
00024
00025 vcl_vector<double> bboxmin, bboxmax;
00026 img.world_bounds(bboxmin, bboxmax);
00027 vimt3d_transform_3d transl;
00028 transl.set_translation(bboxmin[0]+bboxmax[0], 0, 0);
00029 img.world2im() = img.world2im() * transl;
00030 }
00031
00032
00033
00034 template<class T>
00035 inline void vimt3d_reflect_y(vimt3d_image_3d_of<T>& img)
00036 {
00037
00038 img.image() = vil3d_reflect_j(img.image());
00039
00040
00041 vcl_vector<double> bboxmin, bboxmax;
00042 img.world_bounds(bboxmin, bboxmax);
00043 vimt3d_transform_3d transl;
00044 transl.set_translation(0, bboxmin[1]+bboxmax[1], 0);
00045 img.world2im() = img.world2im() * transl;
00046 }
00047
00048
00049
00050 template<class T>
00051 inline void vimt3d_reflect_z(vimt3d_image_3d_of<T>& img)
00052 {
00053
00054 img.image() = vil3d_reflect_k(img.image());
00055
00056
00057 vcl_vector<double> bboxmin, bboxmax;
00058 img.world_bounds(bboxmin, bboxmax);
00059 vimt3d_transform_3d transl;
00060 transl.set_translation(0, 0, bboxmin[2]+bboxmax[2]);
00061 img.world2im() = img.world2im() * transl;
00062 }
00063
00064
00065 #endif // vimt3d_reflect_h_