Filter Library Camera Interface Physics

ToolCilChannel.h

00001 /*
00002  * ToolCilChannel.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: ToolCilChannel.h 202 2005-05-12 11:00:48Z moene $
00013  */
00014 
00015 #ifndef CFL_TOOLCILCHANNEL_H
00016 #define CFL_TOOLCILCHANNEL_H
00017 
00018 #include <cil/Matrix.h>                 // for type cil::channel16
00019 
00020 #if _MSC_VER > 1000
00021 #pragma once
00022 #endif // _MSC_VER > 1000
00023 
00024 /**
00025  * a 16-bit channel (image).
00026  */
00027 typedef cil::channel16 Channel;
00028 
00029 /**
00030  * ScanBaseBuffer Channel conversion shim.
00031  */
00032 
00033 inline Channel to_channel( CScanBaseBufferPtr lpScanBuffer, bool bDoR2L = false )
00034 {
00035    return Channel(
00036       lpScanBuffer->m_pwData + bDoR2L * lpScanBuffer->GetFrameSize(),
00037          lpScanBuffer->m_dwSizeY, lpScanBuffer->m_dwSizeX
00038    );
00039 }
00040 
00041 #endif // #ifndef CFL_TOOLCILCHANNEL_H
00042 
00043 /*
00044  * end of file
00045  */
00046 

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