Commit 06a3576b authored by kirov's avatar kirov
Browse files

+ added FrameBuilder::getGrowFactor() and

  FrameBuilder::setGrowFactor()

+ added FrameBuilder::checkRoi() to return the 
  closest inclusive roi multiple of 8



git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@49 45c4679d-1946-429d-baad-37912b19538b
parent d8e78bd6
......@@ -32,10 +32,14 @@ class FrameBuilder {
void getRoi( Roi &roi ) const;
void setRoi( const Roi &roi );
void checkRoi( Roi &roi ) const;
void getPeaks( std::vector<struct GaussPeak> &peaks ) const;
void setPeaks( const std::vector<struct GaussPeak> &peaks );
void getGrowFactor( double &grow_factor ) const;
void setGrowFactor( const double &grow_factor );
void getNextFrame( unsigned char *ptr ) throw (Exception);
unsigned long getFrameNr();
void resetFrameNr( int frame_nr=0 );
......
......@@ -136,6 +136,12 @@ void FrameBuilder::setRoi( const Roi &roi )
}
void FrameBuilder::checkRoi( Roi &roi ) const
{
roi.alignCornersTo(8, Ceil);
}
void FrameBuilder::getPeaks( std::vector<struct GaussPeak> &peaks ) const
{
peaks = m_peaks;
......@@ -150,6 +156,19 @@ void FrameBuilder::setPeaks( const std::vector<struct GaussPeak> &peaks )
}
void FrameBuilder::getGrowFactor( double &grow_factor ) const
{
grow_factor = m_grow_factor;
}
void FrameBuilder::setGrowFactor( const double &grow_factor )
{
// Any restrictions?
m_grow_factor = grow_factor;
}
#define SGM_FWHM 0.42466090014400952136075141705144 // 1/(2*sqrt(2*ln(2)))
double gauss2D( double x, double y, double x0, double y0, double fwhm, double max )
......
......@@ -24,6 +24,7 @@ int main( void )
fb.setBin(bin);
Roi roi = Roi(Point(128, 128), Point(384, 384));
fb.checkRoi(roi);
fb.setRoi(roi);
// FrameDim fd = full_fd/bin;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment