Filter Library Camera Interface Physics

ToolCilLine.h

00001 /*
00002  * ToolLine.h - convert CScanBaseBuffer to CIL types.
00003  *
00004  * This file is part of the Camera Filter Library.
00005  * Computer Aided Measurement Environment for Realtime Atomic imaging (Camera)
00006  *
00007  * Copyright (C) 2004-2005, Leiden Probe Microscopy.
00008  * Copyright (C) 2004-2005, Universiteit Leiden.
00009  *
00010  * Authors: Martin J. Moene (original)
00011  *
00012  * $Id: ToolCilLine.h 202 2005-05-12 11:00:48Z moene $
00013  */
00014 
00015 #ifndef CFL_TOOLCILLINE_H
00016 #define CFL_TOOLCILLINE_H
00017 
00018 #include <cil/Vector.h>                 // for type cil::line16
00019 
00020 #if _MSC_VER > 1000
00021 #pragma once
00022 #endif // _MSC_VER > 1000
00023 
00024 /**
00025  * a 16-bit line (image line).
00026  */
00027 typedef cil::line16    Line;
00028 
00029 /**
00030  * ScanBaseBuffer to Line conversion shim.
00031  */
00032 
00033 inline Line to_line( CScanBaseBufferPtr lpScanBuffer, int line, bool bDoR2L = false )
00034 {
00035    return cil::line16(
00036       lpScanBuffer->m_pwData + line * lpScanBuffer->m_dwSizeX + bDoR2L * FrameSize( lpScanBuffer ),
00037          lpScanBuffer->m_dwSizeX
00038    );
00039 }
00040 
00041 #endif // #ifndef CFL_TOOLCILLINE_H
00042 
00043 /*
00044  * end of file
00045  */
00046 

Camera Filter Library documentation © 2004-2007 by Leiden Probe Microscopy