ComputeImageROI.h

Go to the documentation of this file.
00001 // -*- c-basic-offset: 4 -*-
00026 #ifndef _COMPUTE_IMAGE_ROI_H
00027 #define _COMPUTE_IMAGE_ROI_H
00028 
00029 #include <hugin_shared.h>
00030 #include <vigra/diff2d.hxx>
00031 #include <algorithms/PanoramaAlgorithm.h>
00032 #include <panodata/Panorama.h>
00033 #include <panodata/PanoramaOptions.h>
00034 
00035 
00036 
00037 namespace HuginBase {
00038 
00039 IMPEX vigra::Rect2D estimateOutputROI(const PanoramaData & pano, const PanoramaOptions & opts, unsigned i);
00040 
00041 class IMPEX ComputeImageROI : public PanoramaAlgorithm
00042 {
00043 
00044     public:
00046         ComputeImageROI(PanoramaData& panorama, const UIntSet & images)
00047          : PanoramaAlgorithm(panorama), m_images(images)
00048         {};
00049 
00051         virtual ~ComputeImageROI() {};
00052 
00053     public:
00055         virtual bool modifiesPanoramaData() const
00056             { return false; }
00058         virtual bool runAlgorithm()
00059         {
00060             m_rois = computeROIS(o_panorama, o_panorama.getOptions(), m_images);
00061             return true; // let's hope so.
00062         }
00063 
00064         virtual std::vector<vigra::Rect2D> getROIS()
00065         {
00066             return m_rois;
00067         }
00068 
00069     public:
00071         static std::vector<vigra::Rect2D> computeROIS(const PanoramaData& panorama,
00072                                                       const PanoramaOptions & opts,
00073                                                       const UIntSet & images);
00074 
00075     protected:
00076         UIntSet m_images;
00077         std::vector<vigra::Rect2D> m_rois;
00078 };
00079 
00080 
00081 } // namespace
00082 #endif // _COMPUTE_IMAGE_ROI_H

Generated on 5 Dec 2014 for Hugintrunk by  doxygen 1.4.7