24 #ifndef _BASICALGORITHMS_CALCULATEOPTIMALROI_H
25 #define _BASICALGORITHMS_CALCULATEOPTIMALROI_H
45 m_bestRect = vigra::Rect2D(0,0,0,0);
46 o_optimalSize = vigra::Size2D(0,0);
52 m_bestRect = vigra::Rect2D(0, 0, 0, 0);
53 o_optimalSize = vigra::Size2D(0,0);
66 return calcOptimalROI(o_panorama);
72 if (hasRunSuccessfully())
78 return vigra::Rect2D();
83 void setStacks(std::vector<UIntSet> hdr_stacks);
93 std::map<unsigned int,PTools::Transform*>
transfMap;
99 bool imgPixel(
int i,
int j);
100 bool stackPixel(
int i,
int j,
UIntSet &stack);
104 void nonreccheck(
const vigra::Rect2D& rect,
int acc,
int searchStrategy,
long& maxvalue);
105 bool CheckRectCoversPano(
const vigra::Rect2D& rect);
106 void AddCheckingRects(std::list<vigra::Rect2D>& testingRects,
const vigra::Rect2D& rect,
const long maxvalue);
123 return CalcOutsideCrop(o_panorama, getProgressDisplay());
127 virtual vigra::Rect2D getResultOptimalROI();
void CleanUp(std::vector< InputImage * > &images)
CalculateOptimalROI(PanoramaData &panorama, AppBase::ProgressDisplay *progress, std::vector< UIntSet > hdr_stacks)
CalculateOptimalROI(PanoramaData &panorama, AppBase::ProgressDisplay *progress, bool intersect=false)
constructor
std::vector< bool > testedPixels
virtual bool modifiesPanoramaData() const
returns true if the algorithm changes the PanoramaData.
virtual bool modifiesPanoramaData() const
returns true if the algorithm changes the PanoramaData.
vigra::Size2D o_optimalSize
std::vector< UIntSet > stacks
std::set< unsigned int > UIntSet
std::vector< bool > pixels
virtual bool runAlgorithm()
runs the outside crop finding algorithm
virtual vigra::Rect2D getResultOptimalROI()
return the ROI structure?, for now area
virtual ~CalculateOptimalROI()
destructor
virtual bool runAlgorithm()
implementation of the algorithm.
CalculateOptimalROIOutside(PanoramaData &panorama, AppBase::ProgressDisplay *progress)
constructor
std::map< unsigned int, PTools::Transform * > transfMap