Commit d8e78bd6 authored by kirov's avatar kirov
Browse files

+ fixed RoI application



git-svn-id: https://scm.blissgarden.org/svn/lima/trunk@48 45c4679d-1946-429d-baad-37912b19538b
parent 3dec410a
......@@ -121,6 +121,7 @@ void FrameBuilder::checkBin( Bin &bin ) const
bin = Bin(2,2);
}
void FrameBuilder::getRoi( Roi &roi ) const
{
roi = m_roi;
......@@ -184,16 +185,15 @@ void FrameBuilder::fillData( unsigned char *ptr )
if( m_roi.getSize() != 0 ) {
bx0 = m_roi.getTopLeft().x;
bxM = m_roi.getBottomRight().x;
bxM = m_roi.getBottomRight().x+1;
by0 = m_roi.getTopLeft().y;
byM = m_roi.getBottomRight().y;
byM = m_roi.getBottomRight().y+1;
} else {
bx0 = by0 = 0;
bxM = width/binX;
byM = height/binY;
}
max = (double) ((depth) -1);
for( by=by0; by<byM; by++ ) {
for( bx=bx0; bx<bxM; bx++ ) {
......
......@@ -23,12 +23,12 @@ int main( void )
Bin bin = Bin(2,2);
fb.setBin(bin);
// Roi roi = Roi(Point(128, 128), Point(384, 384));
// fb.setRoi(roi);
Roi roi = Roi(Point(128, 128), Point(384, 384));
fb.setRoi(roi);
// FrameDim fd = full_fd/bin;
FrameDim fd = FrameDim(roi.getSize(), full_fd.getImageType());
FrameDim fd = full_fd/bin;
// FrameDim fd = FrameDim(roi.getSize(), full_fd.getImageType());
BufferSave bs(BufferSave::EDF, "test");
bs.setTotFileFrames(1);
......
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