Commit 47f57cac authored by kirov's avatar kirov
Browse files

Get/Set methods for Bin and FrameDim



git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@34 45c4679d-1946-429d-baad-37912b19538b
parent 462891fa
......@@ -17,21 +17,24 @@ struct GaussPeak {
class FrameBuilder {
public:
Bin m_bin;
FrameDim m_frame_dim;
FrameBuilder();
FrameBuilder( Bin &bin, FrameDim &frame_dim,
std::vector<struct GaussPeak> &peaks, double grow_factor );
~FrameBuilder();
void getNextFrame( unsigned char *ptr );
unsigned long getFrameNr();
void resetFrameNr( int frame_nr=0 );
void getBin( Bin &bin ) const;
void setBin( const Bin &bin );
void getFrameDim( FrameDim &dim ) const;
void setFrameDim( const FrameDim &dim );
private:
Bin m_bin;
FrameDim m_frame_dim;
std::vector<struct GaussPeak> m_peaks;
double m_grow_factor;
......
......@@ -49,6 +49,31 @@ unsigned long FrameBuilder::getFrameNr()
return m_frame_nr;
}
void FrameBuilder::getBin( Bin &bin ) const
{
bin = m_bin;
}
void FrameBuilder::setBin( const Bin &bin )
{
m_bin = bin;
}
void FrameBuilder::getFrameDim( FrameDim &dim ) const
{
dim = m_frame_dim;
}
void FrameBuilder::setFrameDim( const FrameDim &dim )
{
m_frame_dim = dim;
}
/*
FrameDim& FrameBuilder::getFrameDim() {
return m_frame_dim;
......
......@@ -105,12 +105,12 @@ void Simulator::getExpTime(double& exp_time)
void Simulator::setBin(const Bin& bin)
{
m_frame_builder.m_bin = bin;
m_frame_builder.setBin(bin);
}
void Simulator::getBin(Bin& bin)
{
bin = m_frame_builder.m_bin;
m_frame_builder.getBin(bin);
}
Simulator::Status Simulator::getStatus()
......
......@@ -12,16 +12,17 @@ int main( void )
{
FrameBuilder fb;
FrameDim fd = fb.m_frame_dim;
int width = fd.getSize().getWidth();
int height = fd.getSize().getHeight();
int depth = fd.getDepth();
Bin bin = Bin(2,2);
fb.m_bin = bin;
fb.setBin(bin);
int binX = bin.getX();
int binY = bin.getY();
FrameDim fd;
fb.getFrameDim(fd);
int width = fd.getSize().getWidth();
int height = fd.getSize().getHeight();
int depth = fd.getDepth();
BufferSave bs("boza", FMT_EDF);
unsigned char *buffer;
FrameInfoType finfo;
......
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