00001
00002
00003
00004
00005
00006
00008
00009 #include "ApnCamData_CCD3011.h"
00010
00011 #include <stdlib.h>
00012 #include <string.h>
00013
00014
00016
00018
00019
00020 CApnCamData_CCD3011::CApnCamData_CCD3011()
00021 {
00022 }
00023
00024
00025 CApnCamData_CCD3011::~CApnCamData_CCD3011()
00026 {
00027 }
00028
00029
00030 void CApnCamData_CCD3011::Initialize()
00031 {
00032 strcpy( m_Sensor, "CCD3011" );
00033 strcpy( m_CameraModel, "30" );
00034 m_CameraId = 20;
00035 m_InterlineCCD = false;
00036 m_SupportsSerialA = true;
00037 m_SupportsSerialB = true;
00038 m_SensorTypeCCD = true;
00039 m_TotalColumns = 1040;
00040 m_ImagingColumns = 1024;
00041 m_ClampColumns = 8;
00042 m_PreRoiSkipColumns = 0;
00043 m_PostRoiSkipColumns = 0;
00044 m_OverscanColumns = 8;
00045 m_TotalRows = 256;
00046 m_ImagingRows = 256;
00047 m_UnderscanRows = 0;
00048 m_OverscanRows = 0;
00049 m_VFlushBinning = 1;
00050 m_EnableSingleRowOffset = false;
00051 m_RowOffsetBinning = 1;
00052 m_HFlushDisable = false;
00053 m_ShutterCloseDelay = 300;
00054 m_PixelSizeX = 26;
00055 m_PixelSizeY = 26;
00056 m_Color = false;
00057 m_ReportedGainSixteenBit = 2;
00058 m_MinSuggestedExpTime = 20.0;
00059 m_CoolingSupported = true;
00060 m_RegulatedCoolingSupported = true;
00061 m_TempSetPoint = -20.0;
00062 m_TempRampRateOne = 700;
00063 m_TempRampRateTwo = 4000;
00064 m_TempBackoffPoint = 2.0;
00065 m_PrimaryADType = ApnAdType_Alta_Sixteen;
00066 m_AlternativeADType = ApnAdType_Alta_Twelve;
00067 m_DefaultGainTwelveBit = 400;
00068 m_DefaultOffsetTwelveBit = 200;
00069 m_DefaultRVoltage = 1000;
00070
00071 set_vpattern();
00072
00073 set_hpattern_clamp_sixteen();
00074 set_hpattern_skip_sixteen();
00075 set_hpattern_roi_sixteen();
00076
00077 set_hpattern_clamp_twelve();
00078 set_hpattern_skip_twelve();
00079 set_hpattern_roi_twelve();
00080 }
00081
00082
00083 void CApnCamData_CCD3011::set_vpattern()
00084 {
00085 const unsigned short Mask = 0x0;
00086 const unsigned short NumElements = 247;
00087 unsigned short Pattern[NumElements] =
00088 {
00089 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
00090 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
00091 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
00092 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
00093 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
00094 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
00095 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
00096 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x000A, 0x000A, 0x000A, 0x000A, 0x000A,
00097 0x000A, 0x000A, 0x000A, 0x000A, 0x000A, 0x000A, 0x000A, 0x000A, 0x000A, 0x000A,
00098 0x000A, 0x000A, 0x000A, 0x000A, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002,
00099 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002, 0x0002,
00100 0x0002, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006,
00101 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006,
00102 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006,
00103 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0006, 0x0004, 0x0004,
00104 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004,
00105 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C,
00106 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C,
00107 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C,
00108 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C, 0x000C,
00109 0x000C, 0x000C, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
00110 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
00111 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008,
00112 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0000, 0x0000,
00113 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000
00114 };
00115
00116 m_VerticalPattern.Mask = Mask;
00117 m_VerticalPattern.NumElements = NumElements;
00118 m_VerticalPattern.PatternData =
00119 (unsigned short *)malloc(NumElements * sizeof(unsigned short));
00120
00121 for ( int i=0; i<NumElements; i++ )
00122 {
00123 m_VerticalPattern.PatternData[i] = Pattern[i];
00124 }
00125 }
00126
00127
00128 void CApnCamData_CCD3011::set_hpattern_skip_sixteen()
00129 {
00130 const unsigned short Mask = 0x0;
00131 const unsigned short BinningLimit = 1;
00132 const unsigned short RefNumElements = 22;
00133 const unsigned short SigNumElements = 8;
00134
00135 unsigned short RefPatternData[RefNumElements] =
00136 {
00137 0x006C, 0x0068, 0x006A, 0x006A, 0x1068, 0x1068, 0x1068, 0x0068, 0x00E8, 0x00C8,
00138 0x00D8, 0x00D8, 0x00D8, 0x00D8, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D4, 0x00D4,
00139 0x00D4, 0x00D4
00140 };
00141
00142 unsigned short SigPatternData[SigNumElements] =
00143 {
00144 0x0144, 0x0104, 0x0104, 0x0104, 0x0104, 0x0004, 0x0005, 0x0004
00145 };
00146
00147 unsigned short BinNumElements[APN_MAX_HBINNING] =
00148 {
00149 0x0002
00150 };
00151
00152 unsigned short BinPatternData[1][256] = {
00153 {
00154 0x0054, 0x0044
00155 } };
00156
00157 set_hpattern( &m_SkipPatternSixteen,
00158 Mask,
00159 BinningLimit,
00160 RefNumElements,
00161 SigNumElements,
00162 BinNumElements,
00163 RefPatternData,
00164 SigPatternData,
00165 BinPatternData );
00166 }
00167
00168
00169 void CApnCamData_CCD3011::set_hpattern_clamp_sixteen()
00170 {
00171 const unsigned short Mask = 0x0;
00172 const unsigned short BinningLimit = 1;
00173 const unsigned short RefNumElements = 22;
00174 const unsigned short SigNumElements = 8;
00175
00176 unsigned short RefPatternData[RefNumElements] =
00177 {
00178 0x006C, 0x0068, 0x006A, 0x006A, 0x1068, 0x1068, 0x1068, 0x0068, 0x00E8, 0x00C8,
00179 0x00D8, 0x00D8, 0x00D8, 0x00D8, 0x00D0, 0x00D0, 0x00D0, 0x00D0, 0x00D4, 0x00D4,
00180 0x00D4, 0x00D4
00181 };
00182
00183 unsigned short SigPatternData[SigNumElements] =
00184 {
00185 0x0144, 0x0104, 0x0104, 0x0104, 0x0104, 0x0004, 0x0005, 0x0004
00186 };
00187
00188 unsigned short BinNumElements[APN_MAX_HBINNING] =
00189 {
00190 0x0002
00191 };
00192
00193 unsigned short BinPatternData[1][256] = {
00194 {
00195 0x0054, 0x0044
00196 } };
00197
00198 set_hpattern( &m_ClampPatternSixteen,
00199 Mask,
00200 BinningLimit,
00201 RefNumElements,
00202 SigNumElements,
00203 BinNumElements,
00204 RefPatternData,
00205 SigPatternData,
00206 BinPatternData );
00207 }
00208
00209
00210 void CApnCamData_CCD3011::set_hpattern_roi_sixteen()
00211 {
00212 const unsigned short Mask = 0x0;
00213 const unsigned short BinningLimit = 6;
00214 const unsigned short RefNumElements = 49;
00215 const unsigned short SigNumElements = 26;
00216
00217 unsigned short RefPatternData[RefNumElements] =
00218 {
00219 0x006C, 0x006C, 0x0068, 0x0068, 0x0068, 0x0068, 0x0068, 0x0078, 0x0078, 0x0078,
00220 0x0078, 0x0078, 0x0070, 0x0070, 0x0074, 0x0074, 0x0076, 0x0076, 0x0076, 0x0074,
00221 0x0074, 0x0074, 0x0074, 0x0074, 0x0074, 0x1074, 0x1074, 0x0074, 0x0074, 0x0074,
00222 0x0074, 0x0074, 0x00F4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4,
00223 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4, 0x00D4
00224 };
00225
00226 unsigned short SigPatternData[SigNumElements] =
00227 {
00228 0x0044, 0x0044, 0x0044, 0x0144, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104,
00229 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x0104, 0x8104,
00230 0x8104, 0x0004, 0x0004, 0x0004, 0x0405, 0x0404
00231 };
00232
00233 unsigned short BinNumElements[APN_MAX_HBINNING] =
00234 {
00235 0x0002, 0x0024, 0x0048, 0x006C, 0x0090, 0x00B4
00236 };
00237
00238 unsigned short BinPatternData[6][256] = {
00239 {
00240 0x00C4, 0x0044
00241 },
00242 {
00243 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C,
00244 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058,
00245 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054,
00246 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044
00247 },
00248 {
00249 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C,
00250 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058,
00251 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054,
00252 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044,
00253 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048,
00254 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050,
00255 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044,
00256 0x0044, 0x0044
00257 },
00258 {
00259 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C,
00260 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058,
00261 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054,
00262 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044,
00263 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048,
00264 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050,
00265 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044,
00266 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C,
00267 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058,
00268 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054,
00269 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044
00270 },
00271 {
00272 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C,
00273 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058,
00274 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054,
00275 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044,
00276 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048,
00277 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050,
00278 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044,
00279 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C,
00280 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058,
00281 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054,
00282 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044,
00283 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048,
00284 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050,
00285 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044,
00286 0x0044, 0x0044, 0x0044, 0x0044
00287 },
00288 {
00289 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C,
00290 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058,
00291 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054,
00292 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044,
00293 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048,
00294 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050,
00295 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044,
00296 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C,
00297 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058,
00298 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054,
00299 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044,
00300 0x0044, 0x0044, 0x0044, 0x004C, 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048,
00301 0x0048, 0x0048, 0x0048, 0x0048, 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050,
00302 0x0050, 0x0050, 0x0050, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044,
00303 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044, 0x004C,
00304 0x004C, 0x004C, 0x004C, 0x004C, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048, 0x0048,
00305 0x0058, 0x0058, 0x0058, 0x0058, 0x0050, 0x0050, 0x0050, 0x0050, 0x0050, 0x0054,
00306 0x0054, 0x0054, 0x0054, 0x0054, 0x0054, 0x0044, 0x0044, 0x0044, 0x0044, 0x0044,
00307 } };
00308
00309 set_hpattern( &m_RoiPatternSixteen,
00310 Mask,
00311 BinningLimit,
00312 RefNumElements,
00313 SigNumElements,
00314 BinNumElements,
00315 RefPatternData,
00316 SigPatternData,
00317 BinPatternData );
00318 }
00319
00320
00321 void CApnCamData_CCD3011::set_hpattern_skip_twelve()
00322 {
00323 const unsigned short Mask = 0x0;
00324 const unsigned short BinningLimit = 1;
00325 const unsigned short RefNumElements = 0;
00326 const unsigned short SigNumElements = 0;
00327
00328 unsigned short *RefPatternData = NULL;
00329
00330 unsigned short *SigPatternData = NULL;
00331
00332 unsigned short BinNumElements[APN_MAX_HBINNING] =
00333 {
00334 0x0017
00335 };
00336
00337 unsigned short BinPatternData[1][256] = {
00338 {
00339 0x000C, 0x0008, 0x400A, 0x000A, 0x0008, 0x0008, 0x0218, 0x0018, 0x0018, 0x0018,
00340 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x2014, 0x0004, 0x0004, 0x0004, 0x0004,
00341 0x0004, 0x0005, 0x0004
00342 } };
00343
00344 set_hpattern( &m_SkipPatternTwelve,
00345 Mask,
00346 BinningLimit,
00347 RefNumElements,
00348 SigNumElements,
00349 BinNumElements,
00350 RefPatternData,
00351 SigPatternData,
00352 BinPatternData );
00353 }
00354
00355
00356 void CApnCamData_CCD3011::set_hpattern_clamp_twelve()
00357 {
00358 const unsigned short Mask = 0x0;
00359 const unsigned short BinningLimit = 3;
00360 const unsigned short RefNumElements = 0;
00361 const unsigned short SigNumElements = 0;
00362
00363 unsigned short *RefPatternData = NULL;
00364
00365 unsigned short *SigPatternData = NULL;
00366
00367 unsigned short BinNumElements[APN_MAX_HBINNING] =
00368 {
00369 0x0017, 0x002E, 0x0044
00370 };
00371
00372 unsigned short BinPatternData[3][256] = {
00373 {
00374 0x080C, 0x0808, 0x0A0A, 0x080A, 0x0808, 0x0808, 0x0818, 0x0818, 0x0818, 0x0818,
00375 0x0810, 0x0810, 0x2810, 0x0810, 0x0814, 0x0814, 0x0804, 0x0804, 0x0804, 0x0804,
00376 0x4804, 0x0805, 0x0804
00377 },
00378 {
00379 0x000C, 0x0008, 0x400A, 0x000A, 0x0008, 0x0008, 0x0218, 0x0018, 0x0018, 0x0018,
00380 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x2014, 0x0004, 0x0004, 0x0004, 0x0004,
00381 0x0004, 0x0004, 0x0004, 0x000C, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0018,
00382 0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x0014, 0x0004,
00383 0x0004, 0x0004, 0x0004, 0x0004, 0x8005, 0x8004
00384 },
00385 {
00386 0x000C, 0x0008, 0x400A, 0x000A, 0x0008, 0x0008, 0x0218, 0x0018, 0x0018, 0x0018,
00387 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x2014, 0x0004, 0x0004, 0x0004, 0x0004,
00388 0x0004, 0x0004, 0x0004, 0x000C, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0018,
00389 0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x0014, 0x0004,
00390 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0008, 0x0008, 0x0008, 0x0008,
00391 0x0008, 0x0018, 0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014,
00392 0x0014, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x8005, 0x8004
00393 } };
00394
00395 set_hpattern( &m_ClampPatternTwelve,
00396 Mask,
00397 BinningLimit,
00398 RefNumElements,
00399 SigNumElements,
00400 BinNumElements,
00401 RefPatternData,
00402 SigPatternData,
00403 BinPatternData );
00404 }
00405
00406
00407 void CApnCamData_CCD3011::set_hpattern_roi_twelve()
00408 {
00409 const unsigned short Mask = 0x6800;
00410 const unsigned short BinningLimit = 3;
00411 const unsigned short RefNumElements = 0;
00412 const unsigned short SigNumElements = 0;
00413
00414 unsigned short *RefPatternData = NULL;
00415
00416 unsigned short *SigPatternData = NULL;
00417
00418 unsigned short BinNumElements[APN_MAX_HBINNING] =
00419 {
00420 0x0017, 0x002E, 0x0044
00421 };
00422
00423 unsigned short BinPatternData[3][256] = {
00424 {
00425 0x000C, 0x0008, 0x020A, 0x000A, 0x0008, 0x0008, 0x0018, 0x0018, 0x0018, 0x0018,
00426 0x0010, 0x0010, 0x2010, 0x2010, 0x0014, 0x0014, 0x0004, 0x0004, 0x0004, 0x0004,
00427 0x0004, 0xC005, 0xC004
00428 },
00429 {
00430 0x000C, 0x0008, 0x400A, 0x000A, 0x0008, 0x0008, 0x0218, 0x0018, 0x0018, 0x0018,
00431 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x2014, 0x0004, 0x0004, 0x0004, 0x0004,
00432 0x0004, 0x0004, 0x0004, 0x000C, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0018,
00433 0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x0014, 0x0004,
00434 0x0004, 0x0004, 0x0004, 0x0004, 0x8005, 0x8004
00435 },
00436 {
00437 0x000C, 0x0008, 0x400A, 0x000A, 0x0008, 0x0008, 0x0218, 0x0018, 0x0018, 0x0018,
00438 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x2014, 0x0004, 0x0004, 0x0004, 0x0004,
00439 0x0004, 0x0004, 0x0004, 0x000C, 0x0008, 0x0008, 0x0008, 0x0008, 0x0008, 0x0018,
00440 0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014, 0x0014, 0x0004,
00441 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0008, 0x0008, 0x0008, 0x0008,
00442 0x0008, 0x0018, 0x0018, 0x0018, 0x0018, 0x0010, 0x0010, 0x0010, 0x0010, 0x0014,
00443 0x0014, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x8005, 0x8004
00444 } };
00445
00446 set_hpattern( &m_RoiPatternTwelve,
00447 Mask,
00448 BinningLimit,
00449 RefNumElements,
00450 SigNumElements,
00451 BinNumElements,
00452 RefPatternData,
00453 SigPatternData,
00454 BinPatternData );
00455 }
00456
00457
00458 void CApnCamData_CCD3011::set_hpattern( APN_HPATTERN_FILE *Pattern,
00459 unsigned short Mask,
00460 unsigned short BinningLimit,
00461 unsigned short RefNumElements,
00462 unsigned short SigNumElements,
00463 unsigned short BinNumElements[],
00464 unsigned short RefPatternData[],
00465 unsigned short SigPatternData[],
00466 unsigned short BinPatternData[][APN_MAX_PATTERN_ENTRIES] )
00467 {
00468 int i, j;
00469
00470 Pattern->Mask = Mask;
00471 Pattern->BinningLimit = BinningLimit;
00472 Pattern->RefNumElements = RefNumElements;
00473 Pattern->SigNumElements = SigNumElements;
00474
00475 if ( RefNumElements > 0 )
00476 {
00477 Pattern->RefPatternData =
00478 (unsigned short *)malloc(RefNumElements * sizeof(unsigned short));
00479
00480 for ( i=0; i<RefNumElements; i++ )
00481 {
00482 Pattern->RefPatternData[i] = RefPatternData[i];
00483 }
00484 }
00485
00486 if ( SigNumElements > 0 )
00487 {
00488 Pattern->SigPatternData =
00489 (unsigned short *)malloc(SigNumElements * sizeof(unsigned short));
00490
00491 for ( i=0; i<SigNumElements; i++ )
00492 {
00493 Pattern->SigPatternData[i] = SigPatternData[i];
00494 }
00495 }
00496
00497 if ( BinningLimit > 0 )
00498 {
00499 for ( i=0; i<BinningLimit; i++ )
00500 {
00501 Pattern->BinNumElements[i] = BinNumElements[i];
00502
00503 Pattern->BinPatternData[i] =
00504 (unsigned short *)malloc(BinNumElements[i] * sizeof(unsigned short));
00505
00506 for ( j=0; j<BinNumElements[i]; j++ )
00507 {
00508 Pattern->BinPatternData[i][j] = BinPatternData[i][j];
00509 }
00510 }
00511 }
00512 }