HuginBase::CalculateOptimalROI Class Reference

#include <CalculateOptimalROI.h>

Inheritance diagram for HuginBase::CalculateOptimalROI:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 CalculateOptimalROI (PanoramaData &panorama, bool intersect=false)
 CalculateOptimalROI (PanoramaData &panorama, std::vector< UIntSet > hdr_stacks)
virtual ~CalculateOptimalROI ()
virtual bool modifiesPanoramaData () const
 returns true if the algorithm changes the PanoramaData.
virtual bool runAlgorithm ()
 implementation of the algorithm.
bool calcOptimalROI (PanoramaData &panorama)
virtual vigra::Rect2D getResultOptimalROI ()
 return the ROI structure?, for now area
virtual vigra::Size2D getResultOptimalSize ()
 return the ROI structure?, for now area
void setStacks (std::vector< UIntSet > hdr_stacks)
 sets the stack vector

Private Member Functions

bool imgPixel (int i, int j)
bool stackPixel (int i, int j, UIntSet &stack)
void makecheck (int left, int top, int right, int bottom)
int autocrop ()
void nonreccheck (int left, int top, int right, int bottom, int acc, int searchStrategy)

Private Attributes

vigra::Rect2D o_optimalROI
vigra::Size2D o_optimalSize
bool intersection
std::vector< UIntSetstacks
UIntSet activeImages
std::map< unsigned int, PTools::Transform * > transfMap
boost::dynamic_bitset testedPixels
boost::dynamic_bitset pixels
int count
nonrechead
nonrectail
nonrec best
long maxvalue

Classes

struct  nonrec

Detailed Description

Definition at line 36 of file CalculateOptimalROI.h.


Constructor & Destructor Documentation

HuginBase::CalculateOptimalROI::CalculateOptimalROI ( PanoramaData panorama,
bool  intersect = false 
) [inline]

Definition at line 40 of file CalculateOptimalROI.h.

HuginBase::CalculateOptimalROI::CalculateOptimalROI ( PanoramaData panorama,
std::vector< UIntSet hdr_stacks 
) [inline]

Definition at line 48 of file CalculateOptimalROI.h.

virtual HuginBase::CalculateOptimalROI::~CalculateOptimalROI (  )  [inline, virtual]

Definition at line 57 of file CalculateOptimalROI.h.


Member Function Documentation

int HuginBase::CalculateOptimalROI::autocrop (  )  [private]

Definition at line 379 of file CalculateOptimalROI.cpp.

References best, HuginBase::CalculateOptimalROI::nonrec::bottom, count, head, HuginBase::CalculateOptimalROI::nonrec::left, log2(), maxvalue, celeste::min(), nonreccheck(), o_optimalSize, vigra_ext::pow(), HuginBase::CalculateOptimalROI::nonrec::right, tail, and HuginBase::CalculateOptimalROI::nonrec::top.

Referenced by calcOptimalROI().

bool HuginBase::CalculateOptimalROI::calcOptimalROI ( PanoramaData panorama  ) 

Definition at line 36 of file CalculateOptimalROI.cpp.

References activeImages, autocrop(), best, HuginBase::CalculateOptimalROI::nonrec::bottom, HuginBase::PTools::Transform::createTransform(), HuginBase::PanoramaData::getActiveImages(), HuginBase::PanoramaData::getImage(), HuginBase::PanoramaData::getOptions(), HuginBase::PanoramaOptions::getSize(), HuginBase::CalculateOptimalROI::nonrec::left, o_optimalROI, o_optimalSize, pixels, HuginBase::CalculateOptimalROI::nonrec::right, testedPixels, HuginBase::CalculateOptimalROI::nonrec::top, and transfMap.

virtual vigra::Rect2D HuginBase::CalculateOptimalROI::getResultOptimalROI (  )  [inline, virtual]

return the ROI structure?, for now area

Definition at line 78 of file CalculateOptimalROI.h.

Referenced by autoCrop(), PT::Panorama::calcOptimalROI(), PT::Panorama::calcOptimalStackROI(), and main().

virtual vigra::Size2D HuginBase::CalculateOptimalROI::getResultOptimalSize (  )  [inline, virtual]

return the ROI structure?, for now area

Definition at line 87 of file CalculateOptimalROI.h.

Referenced by PT::Panorama::calcOptimalROI(), and PT::Panorama::calcOptimalStackROI().

bool HuginBase::CalculateOptimalROI::imgPixel ( int  i,
int  j 
) [private]

Definition at line 125 of file CalculateOptimalROI.cpp.

References activeImages, o_optimalSize, pixels, stackPixel(), stacks, and testedPixels.

Referenced by nonreccheck().

void HuginBase::CalculateOptimalROI::makecheck ( int  left,
int  top,
int  right,
int  bottom 
) [private]

Definition at line 163 of file CalculateOptimalROI.cpp.

References HuginBase::CalculateOptimalROI::nonrec::bottom, count, head, HuginBase::CalculateOptimalROI::nonrec::left, maxvalue, HuginBase::CalculateOptimalROI::nonrec::next, o_optimalSize, HuginBase::CalculateOptimalROI::nonrec::right, tail, and HuginBase::CalculateOptimalROI::nonrec::top.

Referenced by nonreccheck().

virtual bool HuginBase::CalculateOptimalROI::modifiesPanoramaData (  )  const [inline, virtual]

returns true if the algorithm changes the PanoramaData.

Implements HuginBase::PanoramaAlgorithm.

Definition at line 62 of file CalculateOptimalROI.h.

void HuginBase::CalculateOptimalROI::nonreccheck ( int  left,
int  top,
int  right,
int  bottom,
int  acc,
int  searchStrategy 
) [private]

Definition at line 209 of file CalculateOptimalROI.cpp.

References best, HuginBase::CalculateOptimalROI::nonrec::bottom, count, head, imgPixel(), HuginBase::CalculateOptimalROI::nonrec::left, makecheck(), maxvalue, HuginBase::CalculateOptimalROI::nonrec::next, HuginBase::CalculateOptimalROI::nonrec::right, tail, and HuginBase::CalculateOptimalROI::nonrec::top.

Referenced by autocrop().

virtual bool HuginBase::CalculateOptimalROI::runAlgorithm (  )  [inline, virtual]

implementation of the algorithm.

You should override with your algorithm's implementiation.

Implements HuginBase::PanoramaAlgorithm.

Definition at line 66 of file CalculateOptimalROI.h.

void HuginBase::CalculateOptimalROI::setStacks ( std::vector< UIntSet hdr_stacks  ) 

sets the stack vector

Definition at line 432 of file CalculateOptimalROI.cpp.

References intersection, and stacks.

Referenced by PT::Panorama::calcOptimalStackROI(), and main().

bool HuginBase::CalculateOptimalROI::stackPixel ( int  i,
int  j,
UIntSet stack 
) [private]

Definition at line 95 of file CalculateOptimalROI.cpp.

References HuginBase::PanoramaData::getImage(), intersection, HuginBase::SrcPanoImage::isInside(), HuginBase::PanoramaAlgorithm::o_panorama, and transfMap.

Referenced by imgPixel().


Member Data Documentation

UIntSet HuginBase::CalculateOptimalROI::activeImages [private]

Definition at line 105 of file CalculateOptimalROI.h.

Referenced by calcOptimalROI(), and imgPixel().

struct nonrec HuginBase::CalculateOptimalROI::best [private]

Definition at line 128 of file CalculateOptimalROI.h.

Referenced by autocrop(), calcOptimalROI(), and nonreccheck().

int HuginBase::CalculateOptimalROI::count [private]

Definition at line 125 of file CalculateOptimalROI.h.

Referenced by autocrop(), makecheck(), and nonreccheck().

struct nonrec* HuginBase::CalculateOptimalROI::head [private]

Definition at line 126 of file CalculateOptimalROI.h.

Referenced by autocrop(), makecheck(), and nonreccheck().

bool HuginBase::CalculateOptimalROI::intersection [private]

Definition at line 101 of file CalculateOptimalROI.h.

Referenced by setStacks(), and stackPixel().

long HuginBase::CalculateOptimalROI::maxvalue [private]

Definition at line 130 of file CalculateOptimalROI.h.

Referenced by autocrop(), makecheck(), and nonreccheck().

vigra::Rect2D HuginBase::CalculateOptimalROI::o_optimalROI [private]

Definition at line 98 of file CalculateOptimalROI.h.

Referenced by calcOptimalROI().

vigra::Size2D HuginBase::CalculateOptimalROI::o_optimalSize [private]

Definition at line 99 of file CalculateOptimalROI.h.

Referenced by autocrop(), calcOptimalROI(), imgPixel(), and makecheck().

boost::dynamic_bitset HuginBase::CalculateOptimalROI::pixels [private]

Definition at line 109 of file CalculateOptimalROI.h.

Referenced by calcOptimalROI(), and imgPixel().

std::vector<UIntSet> HuginBase::CalculateOptimalROI::stacks [private]

Definition at line 103 of file CalculateOptimalROI.h.

Referenced by imgPixel(), and setStacks().

struct nonrec* HuginBase::CalculateOptimalROI::tail [private]

Definition at line 127 of file CalculateOptimalROI.h.

Referenced by autocrop(), makecheck(), and nonreccheck().

boost::dynamic_bitset HuginBase::CalculateOptimalROI::testedPixels [private]

Definition at line 108 of file CalculateOptimalROI.h.

Referenced by calcOptimalROI(), and imgPixel().

std::map<unsigned int,PTools::Transform*> HuginBase::CalculateOptimalROI::transfMap [private]

Definition at line 106 of file CalculateOptimalROI.h.

Referenced by calcOptimalROI(), and stackPixel().


The documentation for this class was generated from the following files:
Generated on 21 Oct 2014 for Hugintrunk by  doxygen 1.4.7